Defined in carb/audio/IAudioDevice.h

enum class carb::audio::DeviceBackend

Which device backend is being used for audio.


IAudioCapture will always use DirectSound as a backend on Windows. This behavior will be changed eventually so that IAudioCapture uses the same device backend as other systems.


enumerator eNull

The null audio device backend was selected.

Audio playback and capture will still function as expected, but the output audio will be dropped and input audio will be silence. This will only be used if manually selected via the audio/deviceBackend settings key or in the case where a system is missing its core audio libraries.

enumerator eWindowsAudioServices

Windows Audio Services device API (aka WASAPI).

This is the only device backend on Windows. This is fairly user-friendly and should not require any special handling.

enumerator ePulseAudio

Pulse Audio sound server for Linux.

This is the standard sound server on Linux for consumer audio. This API is fairly user-friendly and should not require any special handling. Each of the audio streams through Pulse Audio will be visible through programs such as pavucontrol (volume control program). The name of these streams can be set for IAudioPlayback with PlaybackContextDesc::outputDisplayName; if that was not set, a generic name will be used.

enumerator eAlsa

Advance Linux Audio System (ALSA).

This is the underlying kernel sound system as well as an array of plugins. Some users may use ALSA so they can use the JACK plugin for professional audio applications. Some users also prefer to use the dmix and dsnoop sound servers instead of Pulse Audio. ALSA is not user-friendly, so the following issues may appear:

  • ALSA devices are sensitive to latency because, for the most part, they use a fixed-size ring buffer, so it is possible to get audio underruns or overruns on a heavily loaded system or a device configured with an extremely small buffer.

  • Some ALSA devices are exclusive access, so there is no guaranteed that they will open properly.

  • Multiple configurations of each physical device show up as a separate audio device, so a system with two audio devices will have ~40 ALSA devices.

  • Opening an ALSA device can take hundreds of milliseconds. Combined with the huge device count, this can mean that manually enumerating all devices on the system can take several seconds.

  • Some versions of libasound will automatically create devices with invalid configurations, such as dmix devices that are flagged as supporting playback and capture but will fail to open for capture.

  • ALSA devices can be configured with some formats that does not support, such as big endian formats, ULAW or 64 bit float. Users should use a plug (format conversion) plugin for ALSA if they need to use a device that requires a format such as this.

enumerator eCoreAudio

The Mac OS CoreAudio system.

This is the standard sound system used on Mac OS. This is fairly user-friendly and should not require any special handling.