|
Zrythm v2.0.0-DEV
a highly automated and intuitive digital audio workstation
|
JUCE-based implementation of IHardwareAudioInterface. More...
#include <src/dsp/juce_hardware_audio_interface.h>


Public Member Functions | |
| JuceHardwareAudioInterface (std::shared_ptr< juce::AudioDeviceManager > device_manager) | |
| nframes_t | get_block_length () const override |
| Returns the current block length (buffer size) in frames. | |
| units::sample_rate_t | get_sample_rate () const override |
| Returns the current sample rate. | |
| void | add_audio_callback (IAudioCallback *callback) override |
| Adds an audio callback to receive audio I/O events. | |
| void | remove_audio_callback (IAudioCallback *callback) override |
| Removes a previously added audio callback. | |
| std::optional< juce::AudioWorkgroup > | get_device_audio_workgroup () const |
| Returns the audio workgroup for the current device. | |
Static Public Member Functions | |
| static std::unique_ptr< IHardwareAudioInterface > | create (std::shared_ptr< juce::AudioDeviceManager > device_manager) |
| Creates a JUCE-based hardware audio interface. | |
JUCE-based implementation of IHardwareAudioInterface.
Wraps a juce::AudioDeviceManager to provide the hardware audio interface. Bridges IAudioCallback to juce::AudioIODeviceCallback via an internal adapter.
Definition at line 25 of file juce_hardware_audio_interface.h.
|
overridevirtual |
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.
Implements zrythm::dsp::IHardwareAudioInterface.
|
nodiscardoverridevirtual |
Returns the current block length (buffer size) in frames.
Implements zrythm::dsp::IHardwareAudioInterface.
|
nodiscard |
Returns the audio workgroup for the current device.
This is not part of the IHardwareAudioInterface interface to avoid JUCE dependencies in the interface. Callers that need the workgroup should use this method on the concrete type.
|
nodiscardoverridevirtual |
Returns the current sample rate.
Implements zrythm::dsp::IHardwareAudioInterface.
|
overridevirtual |
Removes a previously added audio callback.
callback must be the same pointer passed to add_audio_callback().
Implements zrythm::dsp::IHardwareAudioInterface.