Zrythm v2.0.0-DEV
a highly automated and intuitive digital audio workstation
Loading...
Searching...
No Matches
iaudio_callback.h
1// SPDX-FileCopyrightText: © 2026 Alexandros Theodotou <alex@zrythm.org>
2// SPDX-License-Identifier: LicenseRef-ZrythmLicense
3
4#pragma once
5
6#include <string_view>
7
8namespace zrythm::dsp
9{
10
19{
20public:
21 virtual ~IAudioCallback () = default;
22
32 virtual void process_audio (
33 const float * const * input_channel_data,
34 int num_input_channels,
35 float * const * output_channel_data,
36 int num_output_channels,
37 int num_samples) noexcept = 0;
38
42 virtual void about_to_start () = 0;
43
47 virtual void stopped () = 0;
48
52 virtual void error (std::string_view error_message) = 0;
53};
54
55} // namespace zrythm::dsp
Pure-abstract audio callback interface.
virtual void stopped()=0
Called when the audio device has stopped.
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 error(std::string_view error_message)=0
Called when an error occurs with the audio device.