MayaFlux 0.1.0
Digital-First Multimedia Processing Framework
Loading...
Searching...
No Matches

◆ convert_device_info()

static DeviceInfo MayaFlux::Core::convert_device_info ( const RtAudio::DeviceInfo &  rtInfo,
unsigned int  id,
unsigned int  defaultOutputDevice,
unsigned int  defaultInputDevice 
)
static

Converts RtAudio-specific device information to the engine's device model.

Parameters
rtInfoNative RtAudio device information structure
idSystem identifier for the device
defaultOutputDeviceSystem identifier for the default output device
defaultInputDeviceSystem identifier for the default input device
Returns
Standardized DeviceInfo structure with platform-agnostic representation

Maps the vendor-specific device information format to the engine's standardized representation, enabling consistent device handling across different audio backends.

Definition at line 23 of file RtAudioBackend.hpp.

28{
29 DeviceInfo info;
30 info.name = rtInfo.name;
31 info.input_channels = rtInfo.inputChannels;
32 info.output_channels = rtInfo.outputChannels;
33 info.duplex_channels = rtInfo.duplexChannels;
34 info.preferred_sample_rate = rtInfo.preferredSampleRate;
35 info.supported_samplerates = rtInfo.sampleRates;
36 info.is_default_output = (id == defaultOutputDevice);
37 info.is_default_input = (id == defaultInputDevice);
38 return info;
39}
std::string name
System identifier for the audio endpoint.
uint32_t duplex_channels
Number of channels supporting simultaneous input and output.
std::vector< uint32_t > supported_samplerates
Collection of all sample rates supported by this device.
bool is_default_output
Indicates if this device is the system's primary output endpoint.
uint32_t input_channels
Number of discrete input channels available for signal capture.
bool is_default_input
Indicates if this device is the system's primary input endpoint.
uint32_t output_channels
Number of discrete output channels available for signal playback.
uint32_t preferred_sample_rate
Optimal sample rate for this device as reported by the system.
Contains digital audio device configuration parameters.

References MayaFlux::Core::DeviceInfo::duplex_channels, MayaFlux::Core::DeviceInfo::input_channels, MayaFlux::Core::DeviceInfo::is_default_input, MayaFlux::Core::DeviceInfo::is_default_output, MayaFlux::Core::DeviceInfo::name, MayaFlux::Core::DeviceInfo::output_channels, MayaFlux::Core::DeviceInfo::preferred_sample_rate, and MayaFlux::Core::DeviceInfo::supported_samplerates.

Referenced by MayaFlux::Core::RtAudioDevice::RtAudioDevice().

+ Here is the caller graph for this function: