Server interface for low level audio access.
    public static class AudioServer

AudioServer is a low level server interface for audio access. It is in charge of creating sample data (playable audio) as well as its playback via a voice interface.

Inheritance Chain

Static Methods

    public static void AddBus(int atPosition = -1)

Adds a bus at atPosition.

    public static void AddBusEffect(int busIdx, AudioEffect effect, int atPosition = -1)

Adds an AudioEffect effect to the bus busIdx at atPosition.

    public static AudioBusLayout GenerateBusLayout()

Generates an AudioBusLayout using the available busses and effects.

    public static int GetBusCount()

Returns the number of available busses.

    public static AudioEffect GetBusEffect(int busIdx, int effectIdx)

Returns the AudioEffect at position effectIdx in bus busIdx.

    public static int GetBusEffectCount(int busIdx)

Returns the number of effects on the bus at busIdx.

    public static int GetBusIndex(string busName)

Returns the index of the bus with the name busName.

    public static string GetBusName(int busIdx)

Returns the name of the bus with the index busIdx.

    public static float GetBusPeakVolumeLeftDb(int busIdx, int channel)

Returns the peak volume of the left speaker at bus index busIdx and channel index channel.

    public static float GetBusPeakVolumeRightDb(int busIdx, int channel)

Returns the peak volume of the right speaker at bus index busIdx and channel index channel.

    public static string GetBusSend(int busIdx)

Returns the name of the bus that the bus at index busIdx sends to.

    public static float GetBusVolumeDb(int busIdx)

Returns the volume of the bus at index busIdx in dB.

    public static string GetDevice()

    public static object[] GetDeviceList()

    public static float GetMixRate()

Returns the sample rate at the output of the audioserver.

    public static SpeakerMode GetSpeakerMode()

Returns the speaker configuration.

    public static bool IsBusBypassingEffects(int busIdx)

If true the bus at index busIdx is bypassing effects.

    public static bool IsBusEffectEnabled(int busIdx, int effectIdx)

If true the effect at index effectIdx on the bus at index busIdx is enabled.

    public static bool IsBusMute(int busIdx)

If true the bus at index busIdx is muted.

    public static bool IsBusSolo(int busIdx)

If true the bus at index busIdx is in solo mode.

    public static void Lock()

Locks the audio drivers mainloop. Remember to unlock it afterwards.

    public static void MoveBus(int index, int toIndex)

Moves the bus from index index to index toIndex.

    public static void RemoveBus(int index)

Removes the bus at index index.

    public static void RemoveBusEffect(int busIdx, int effectIdx)

Removes the effect at index effectIdx from the bus at index busIdx.

    public static void SetBusBypassEffects(int busIdx, bool enable)

If true the bus at index busIdx is bypassing effects.

    public static void SetBusCount(int amount)

Adds and removes busses to make the number of busses match amount.

    public static void SetBusEffectEnabled(int busIdx, int effectIdx, bool enabled)

If true the effect at index effectIdx on the bus at index busIdx is enabled.

    public static void SetBusLayout(AudioBusLayout busLayout)

Overwrites the currently used AudioBusLayout.

    public static void SetBusMute(int busIdx, bool enable)

If true the bus at index busIdx is muted.

    public static void SetBusName(int busIdx, string name)

Sets the name of the bus at index busIdx to name.

    public static void SetBusSend(int busIdx, string send)

Connects the output of the bus at busIdx to the bus named send.

    public static void SetBusSolo(int busIdx, bool enable)

If true the bus at index busIdx is in solo mode.

    public static void SetBusVolumeDb(int busIdx, float volumeDb)

Sets the volume of the bus at index busIdx to volumeDb.

    public static void SetDevice(string arg0)

    public static void SwapBusEffects(int busIdx, int effectIdx, int byEffectIdx)

Swaps the position of two effects in bus busIdx.

    public static void Unlock()

Unlocks the audiodriver’s main loop. After locking it always unlock it.

Signals

    "bus_layout_changed" ()

Emitted when the AudioBusLayout changes.

Inner Types

SpeakerMode

Name Value Description
ModeStereo 0 Two or fewer speakers are detected.
Surround51 2 A 5.1 channel surround setup detected.
Surround71 3 A 7.1 channel surround setup detected.
Tags: