Zrythm v2.0.0-DEV
a highly automated and intuitive digital audio workstation
Loading...
Searching...
No Matches
zrythm::dsp::AudioCallback Class Reference
Inheritance diagram for zrythm::dsp::AudioCallback:
Collaboration diagram for zrythm::dsp::AudioCallback:

Public Types

using EngineProcessCallback
using DeviceAboutToStartCallback = std::function<void ()>
using DeviceStoppedCallback = std::function<void ()>

Public Member Functions

 AudioCallback (EngineProcessCallback process_cb, DeviceAboutToStartCallback device_about_to_start_cb, DeviceStoppedCallback device_stopped_cb)
void process_audio (std::span< const float *const > input_channels, std::span< float *const > output_channels, units::sample_u32_t num_samples) noexcept override
 Called when the audio device wants to process a block of audio data.
void about_to_start () override
 Called when the audio device is about to start processing.
void stopped () override
 Called when the audio device has stopped.
void error (std::string_view error_message) override
 Called when an error occurs with the audio device.

Detailed Description

Definition at line 13 of file audio_callback.h.

Member Typedef Documentation

◆ DeviceAboutToStartCallback

using zrythm::dsp::AudioCallback::DeviceAboutToStartCallback = std::function<void ()>

Definition at line 20 of file audio_callback.h.

◆ DeviceStoppedCallback

using zrythm::dsp::AudioCallback::DeviceStoppedCallback = std::function<void ()>

Definition at line 21 of file audio_callback.h.

◆ EngineProcessCallback

using zrythm::dsp::AudioCallback::EngineProcessCallback
Initial value:
std::function<void (
std::span<const float * const> inputChannels,
std::span<float * const> outputChannels,
units::sample_u32_t numSamples)>

Definition at line 16 of file audio_callback.h.

Member Function Documentation

◆ about_to_start()

void zrythm::dsp::AudioCallback::about_to_start ( )
overridevirtual

Called when the audio device is about to start processing.

Implements zrythm::dsp::IAudioCallback.

◆ error()

void zrythm::dsp::AudioCallback::error ( std::string_view error_message)
overridevirtual

Called when an error occurs with the audio device.

Implements zrythm::dsp::IAudioCallback.

◆ process_audio()

void zrythm::dsp::AudioCallback::process_audio ( std::span< const float *const > input_channels,
std::span< float *const > output_channels,
units::sample_u32_t num_samples )
overridevirtualnoexcept

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

Implements zrythm::dsp::IAudioCallback.

◆ stopped()

void zrythm::dsp::AudioCallback::stopped ( )
overridevirtual

Called when the audio device has stopped.

Implements zrythm::dsp::IAudioCallback.


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