Class Audio
The audio service used for music and sound effects playback.
Inheritance
System.Object
Audio
Namespace: FlaxEngine
Assembly: FlaxEngine.CSharp.dll
Syntax
[Unmanaged]
public static class Audio : Object
Properties
ActiveDevice
Gets the active device.
Declaration
[Unmanaged]
public static AudioDevice ActiveDevice { get; }
Property Value
AudioDevice
|
ActiveDeviceIndex
Gets or sets the index of the active device.
Declaration
[Unmanaged]
public static int ActiveDeviceIndex { get; set; }
Property Value
System.Int32
|
Devices
The all audio devices.
Declaration
[Unmanaged]
public static AudioDevice[] Devices { get; }
Property Value
AudioDevice[]
|
DopplerFactor
Sets the doppler effect factor. Scale for source and listener velocities. Default is 1.
Declaration
[Unmanaged]
public static float DopplerFactor { set; }
Property Value
System.Single
|
EnableHRTF
Gets or sets the preference to use HRTF audio (when available on platform). Default is true.
Declaration
[Unmanaged]
public static bool EnableHRTF { get; set; }
Property Value
System.Boolean
|
MasterVolume
Gets or sets the master volume applied to all the audio sources (normalized to range 0-1).
Declaration
[Unmanaged]
public static float MasterVolume { get; set; }
Property Value
System.Single
|
Volume
Gets the actual master volume (including all side effects and mute effectors).
Declaration
[Unmanaged]
public static float Volume { get; }
Property Value
System.Single
|
Events
ActiveDeviceChanged
Event called when the active audio device gets changed.
Declaration
[Unmanaged]
public static event Action ActiveDeviceChanged
Event Type
System.Action
|
DevicesChanged
Event called when audio devices collection gets changed.
Declaration
[Unmanaged]
public static event Action DevicesChanged
Event Type
System.Action
|