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

◆ rtAudioCallback()

int MayaFlux::Core::RtAudioStream::rtAudioCallback ( void *  output_buffer,
void *  input_buffer,
unsigned int  num_frames,
double  stream_time,
RtAudioStreamStatus  status,
void *  user_data 
)
staticprivate

Static callback function for the RtAudio API.

Parameters
output_bufferPointer to the output sample buffer
input_bufferPointer to the input sample buffer
num_framesNumber of frames to process
stream_timeCurrent stream time in seconds
statusStream status flags
user_dataPointer to the RtAudioStream instance
Returns
0 on success, non-zero on error

This static function serves as the entry point for the RtAudio callback system. It unpacks the parameters and delegates to the user-provided callback function registered with set_process_callback.

Definition at line 359 of file RtAudioBackend.cpp.

366{
367 auto stream = static_cast<RtAudioStream*>(user_data);
368
369 if (stream && stream->m_process_callback) {
370 return stream->m_process_callback(output_buffer, input_buffer, num_frames);
371 }
372
373 return 0;
374}
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.

References m_process_callback.

Referenced by open().

+ Here is the caller graph for this function: