Add OpenAL AL_SOFT_source_spatialize extension support for stereo spatial audio playback
Add `AllowSpatialization` option to `AudioSource`
This commit is contained in:
@@ -50,6 +50,7 @@ private:
|
||||
float _attenuation;
|
||||
bool _loop;
|
||||
bool _playOnStart;
|
||||
bool _allowSpatialization;
|
||||
|
||||
bool _isActuallyPlayingSth = false;
|
||||
bool _needToUpdateStreamingBuffers = false;
|
||||
@@ -163,6 +164,20 @@ public:
|
||||
/// </summary>
|
||||
API_PROPERTY() void SetAttenuation(float value);
|
||||
|
||||
/// <summary>
|
||||
/// If checked, source can play spatial 3d audio (when audio clip supports it), otherwise will always play as 2d sound. At 0, no distance attenuation ever occurs.
|
||||
/// </summary>
|
||||
API_PROPERTY(Attributes="EditorOrder(80), DefaultValue(true), EditorDisplay(\"Audio Source\")")
|
||||
FORCE_INLINE bool GetAllowSpatialization() const
|
||||
{
|
||||
return _allowSpatialization;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// If checked, source can play spatial 3d audio (when audio clip supports it), otherwise will always play as 2d sound.
|
||||
/// </summary>
|
||||
API_PROPERTY() void SetAllowSpatialization(bool value);
|
||||
|
||||
public:
|
||||
/// <summary>
|
||||
/// Starts playing the currently assigned audio clip.
|
||||
|
||||
Reference in New Issue
Block a user