|
Zrythm v2.0.0-DEV
a highly automated and intuitive digital audio workstation
|
Abstraction for hardware audio interface. More...
#include <src/dsp/hardware_audio_interface.h>

Public Member Functions | |
| virtual nframes_t | get_block_length () const =0 |
| Returns the current block length (buffer size) in frames. | |
| virtual units::sample_rate_t | get_sample_rate () const =0 |
| Returns the current sample rate. | |
| virtual void | add_audio_callback (IAudioCallback *callback)=0 |
| Adds an audio callback to receive audio I/O events. | |
| virtual void | remove_audio_callback (IAudioCallback *callback)=0 |
| Removes a previously added audio callback. | |
Abstraction for hardware audio interface.
This interface decouples AudioEngine and DspGraphDispatcher from juce::AudioDeviceManager, allowing for easier testing and flexibility.
Definition at line 20 of file hardware_audio_interface.h.
|
pure virtual |
Adds an audio callback to receive audio I/O events.
The caller must ensure callback remains alive until after remove_audio_callback() is called with the same pointer.
Implemented in zrythm::dsp::JuceHardwareAudioInterface, zrythm::test_helpers::MockHardwareAudioInterface, and zrythm::test_helpers::ThreadedMockHardwareAudioInterface.
|
pure virtual |
Returns the current block length (buffer size) in frames.
Implemented in zrythm::dsp::JuceHardwareAudioInterface, zrythm::test_helpers::MockHardwareAudioInterface, and zrythm::test_helpers::ThreadedMockHardwareAudioInterface.
|
pure virtual |
Returns the current sample rate.
Implemented in zrythm::dsp::JuceHardwareAudioInterface, zrythm::test_helpers::MockHardwareAudioInterface, and zrythm::test_helpers::ThreadedMockHardwareAudioInterface.
|
pure virtual |
Removes a previously added audio callback.
callback must be the same pointer passed to add_audio_callback().
Implemented in zrythm::dsp::JuceHardwareAudioInterface, zrythm::test_helpers::MockHardwareAudioInterface, and zrythm::test_helpers::ThreadedMockHardwareAudioInterface.