Search Results for

    Show / Hide Table of Contents

    Class Audio

    The audio service used for music and sound effects playback.

    Inheritance
    Audio
    Assembly: FlaxEngine.dll
    File: Engine/Audio/Audio.h
    Syntax
    public class Audio

    Fields

    ActiveDeviceChanged

    Event called when the active audio device gets changed.

    Declaration
    public static Action ActiveDeviceChanged
    Field Value
    Action

    Devices

    The all audio devices.

    Declaration
    public static Array<AudioDevice> Devices
    Field Value
    Array<AudioDevice>

    DevicesChanged

    Event called when audio devices collection gets changed.

    Declaration
    public static Action DevicesChanged
    Field Value
    Action

    Listeners

    The audio listeners collection registered by the service.

    Declaration
    public static Array<AudioListener* > Listeners
    Field Value
    Array<AudioListener >

    Sources

    The audio sources collection registered by the service.

    Declaration
    public static Array<AudioSource* > Sources
    Field Value
    Array<AudioSource >

    Methods

    GetActiveDevice()

    Gets the active device.

    Declaration
    public static AudioDevice* GetActiveDevice()
    Returns
    AudioDevice

    The active device.

    GetActiveDeviceIndex()

    Gets the index of the active device.

    Declaration
    public static int32 GetActiveDeviceIndex()
    Returns
    int32

    The active device index.

    GetEnableHRTF()

    Gets the preference to use HRTF audio (when available on platform). Default is true.

    Declaration
    public static bool GetEnableHRTF()
    Returns
    bool

    GetMasterVolume()

    Gets the master volume applied to all the audio sources (normalized to range 0-1).

    Declaration
    public static float GetMasterVolume()
    Returns
    float

    The value

    GetVolume()

    Gets the actual master volume (including all side effects and mute effectors).

    Declaration
    public static float GetVolume()
    Returns
    float

    The final audio volume applied to all the listeners.

    SetActiveDeviceIndex(int32 index)

    Sets the index of the active device.

    Declaration
    public static void SetActiveDeviceIndex(int32 index)
    Parameters
    int32 index

    The index.

    SetDopplerFactor(float value)

    Sets the doppler effect factor. Scale for source and listener velocities. Default is 1.

    Declaration
    public static void SetDopplerFactor(float value)
    Parameters
    float value

    The value.

    SetEnableHRTF(bool value)

    Sets the preference to use HRTF audio (when available on platform). Default is true.

    Declaration
    public static void SetEnableHRTF(bool value)
    Parameters
    bool value

    The value.

    SetMasterVolume(float value)

    Sets the master volume applied to all the audio sources (normalized to range 0-1).

    Declaration
    public static void SetMasterVolume(float value)
    Parameters
    float value

    The value.

    • Improve this Doc
    • View Source
    In This Article
    Back to top Copyright © 2012-2024 Wojciech Figat