audio/engine.h file

The audio engine.



void engine_init(AudioEngine* self, int loading)
Init audio engine.
void engine_activate(AudioEngine* self)
Activates the audio engine to start receiving events.
void engine_update_frames_per_tick(AudioEngine* self, const int beats_per_bar, const float bpm, const sample_rate_t sample_rate)
Updates frames per tick based on the time sig, the BPM, and the sample rate.
void engine_process_prepare(AudioEngine* self, nframes_t nframes)
To be called by each implementation to prepare the structures before processing.
auto engine_process(AudioEngine* self, nframes_t nframes) -> int
Processes current cycle.
void engine_post_process(AudioEngine* self, const nframes_t nframes)
To be called after processing for common logic.
void engine_fill_out_bufs(AudioEngine* self, const nframes_t nframes)
Called to fill in the external buffers at the end of the processing cycle.
static auto engine_audio_backend_to_string(AudioBackend backend) -> const char*
Returns the audio backend as a string.
static auto engine_midi_backend_to_string(MidiBackend backend) -> const char*
Returns the MIDI backend as a string.
void engine_tear_down(AudioEngine* self)
Closes any connections and free's data.


#define engine_is_port_own(self, port)
Returns 1 if the port is an engine port or control room port, otherwise 0.