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

◆ RtAudioStream()

MayaFlux::Core::RtAudioStream::RtAudioStream ( RtAudio *  context,
unsigned int  output_device_id,
unsigned int  input_device_id,
const GlobalStreamInfo streamInfo,
void *  userData 
)

Initializes an audio stream with the specified configuration.

Parameters
contextPointer to an active RtAudio instance
output_device_idSystem identifier for the target audio output device
input_device_idSystem identifier for the target audio input device
streamInfoConfiguration parameters for the audio stream
userDataOptional context pointer passed to callbacks

Creates an audio stream configuration but does not open the stream. The stream must be explicitly opened with open() before use.

Definition at line 132 of file RtAudioBackend.cpp.

138 : m_context(context)
140 , m_options()
141 , m_userData(userData)
142 , m_isOpen(false)
143 , m_isRunning(false)
144 , m_stream_info(streamInfo)
145{
146 if (!context) {
147 throw std::invalid_argument("RtAudioStream: context must not be null");
148 }
149
150 m_out_parameters.deviceId = output_device_id;
151 m_out_parameters.nChannels = streamInfo.output.channels;
152
153 m_in_parameters.deviceId = input_device_id;
154
156}
RtAudio::StreamOptions m_options
RtAudio-specific stream options.
GlobalStreamInfo m_stream_info
Copy of the stream configuration for reference.
void * m_userData
User-provided context pointer for callbacks.
void configure_stream_options()
Configures RtAudio stream options based on GlobalStreamInfo.
bool m_isOpen
Flag indicating if the stream is currently open.
bool m_isRunning
Flag indicating if the stream is currently running.
RtAudio::StreamParameters m_in_parameters
RtAudio-specific stream input configuration parameters.
RtAudio::StreamParameters m_out_parameters
RtAudio-specific stream output configuration parameters.
RtAudio * m_context
Pointer to the underlying RtAudio context.

References MayaFlux::Core::GlobalStreamInfo::ChannelConfig::channels, configure_stream_options(), m_in_parameters, m_out_parameters, and MayaFlux::Core::GlobalStreamInfo::output.

+ Here is the call graph for this function: