Zrythm v2.0.0-DEV
a highly automated and intuitive digital audio workstation
Loading...
Searching...
No Matches
zrythm::dsp::IAudioCallback Class Referenceabstract

Pure-abstract audio callback interface. More...

#include <src/dsp/iaudio_callback.h>

Inheritance diagram for zrythm::dsp::IAudioCallback:

Public Member Functions

virtual void process_audio (const float *const *input_channel_data, int num_input_channels, float *const *output_channel_data, int num_output_channels, int num_samples) noexcept=0
 Called when the audio device wants to process a block of audio data.
virtual void about_to_start ()=0
 Called when the audio device is about to start processing.
virtual void stopped ()=0
 Called when the audio device has stopped.
virtual void error (std::string_view error_message)=0
 Called when an error occurs with the audio device.

Detailed Description

Pure-abstract audio callback interface.

Decouples the audio engine from any specific audio backend (e.g., JUCE). Implementations receive audio I/O callbacks from the hardware audio interface.

Definition at line 18 of file iaudio_callback.h.

Member Function Documentation

◆ about_to_start()

virtual void zrythm::dsp::IAudioCallback::about_to_start ( )
pure virtual

Called when the audio device is about to start processing.

Implemented in zrythm::dsp::AudioCallback.

◆ error()

virtual void zrythm::dsp::IAudioCallback::error ( std::string_view error_message)
pure virtual

Called when an error occurs with the audio device.

Implemented in zrythm::dsp::AudioCallback.

◆ process_audio()

virtual void zrythm::dsp::IAudioCallback::process_audio ( const float *const * input_channel_data,
int num_input_channels,
float *const * output_channel_data,
int num_output_channels,
int num_samples )
pure virtualnoexcept

Called when the audio device wants to process a block of audio data.

Parameters
input_channel_dataArray of pointers to input channel data
num_input_channelsNumber of input channels
output_channel_dataArray of pointers to output channel data
num_output_channelsNumber of output channels
num_samplesNumber of samples in this block

Implemented in zrythm::dsp::AudioCallback.

◆ stopped()

virtual void zrythm::dsp::IAudioCallback::stopped ( )
pure virtual

Called when the audio device has stopped.

Implemented in zrythm::dsp::AudioCallback.


The documentation for this class was generated from the following file: