Struct thl::AudioDeviceInfo#

struct AudioDeviceInfo#

Collaboration diagram for thl::AudioDeviceInfo:

digraph { graph [bgcolor="#00000000"] node [shape=rectangle style=filled fillcolor="#FFFFFF" font=Helvetica padding=2] edge [color="#1414CE"] "3" [label="std::basic_string< Char >" tooltip="std::basic_string< Char >"] "2" [label="std::string" tooltip="std::string"] "1" [label="thl::AudioDeviceInfo" tooltip="thl::AudioDeviceInfo" fillcolor="#BFBFBF"] "4" [label="std::vector< uint32_t >" tooltip="std::vector< uint32_t >"] "2" -> "3" [dir=forward tooltip="public-inheritance"] "1" -> "2" [dir=forward tooltip="usage"] "1" -> "4" [dir=forward tooltip="usage"] }

Contains information about an audio device available on the system.

AudioDeviceInfo encapsulates the essential properties of an audio device, including its display name, unique identifier, type (input/output), and supported sample rates. This structure is primarily used when enumerating available devices and selecting a device for initialisation.

See also

AudioDeviceManager::enumerateInputDevices()

See also

AudioDeviceManager::enumerateOutputDevices()

Public Functions

inline const void *device_id_ptr() const#

Gets a pointer to the device ID for internal use.

Note

This is primarily used internally when initialising devices.

Returns:

Pointer to the internal device ID storage.

inline void *device_id_storage_ptr()#

Public Members

std::string m_name#

Human-readable name of the audio device.

This is the display name provided by the operating system or driver, suitable for showing to users in device selection interfaces.

DeviceType m_device_type = DeviceType::Playback#

Type of the audio device (input, output, or duplex).

Indicates whether this device is capable of audio capture (input), playback (output), or both (duplex).

std::vector<uint32_t> m_sample_rates#

List of sample rates supported by the device.

Contains the discrete sample rates that this device can operate at. Common values include 44100, 48000, 88200, 96000, etc.

Public Static Attributes

static constexpr size_t k_device_id_storage_size = 256#