file
engine.hThe audio engine.
Classes
- struct AudioEngineEvent
- Audio engine event.
- struct AudioEngine
- The audio engine.
Enums
- enum AudioEngineEventType { AUDIO_ENGINE_EVENT_BUFFER_SIZE_CHANGE, AUDIO_ENGINE_EVENT_SAMPLE_RATE_CHANGE }
- Audio engine event type.
- enum AudioEngineBufferSize { AUDIO_ENGINE_BUFFER_SIZE_16, AUDIO_ENGINE_BUFFER_SIZE_32, AUDIO_ENGINE_BUFFER_SIZE_64, AUDIO_ENGINE_BUFFER_SIZE_128, AUDIO_ENGINE_BUFFER_SIZE_256, AUDIO_ENGINE_BUFFER_SIZE_512, AUDIO_ENGINE_BUFFER_SIZE_1024, AUDIO_ENGINE_BUFFER_SIZE_2048, AUDIO_ENGINE_BUFFER_SIZE_4096, NUM_AUDIO_ENGINE_BUFFER_SIZES }
- Buffer sizes to be used in combo boxes.
- enum AudioEngineSamplerate { AUDIO_ENGINE_SAMPLERATE_22050, AUDIO_ENGINE_SAMPLERATE_32000, AUDIO_ENGINE_SAMPLERATE_44100, AUDIO_ENGINE_SAMPLERATE_48000, AUDIO_ENGINE_SAMPLERATE_88200, AUDIO_ENGINE_SAMPLERATE_96000, AUDIO_ENGINE_SAMPLERATE_192000, NUM_AUDIO_ENGINE_SAMPLERATES }
- Samplerates to be used in comboboxes.
- enum BounceMode { BOUNCE_OFF, BOUNCE_ON, BOUNCE_INHERIT }
- Mode used when bouncing, either during exporting or when bouncing tracks or regions to audio.
Typedefs
- using AudioEngineEventType = enum AudioEngineEventType
- Audio engine event type.
- using AudioEngineEvent = struct AudioEngineEvent
- Audio engine event.
- using AudioEngineBufferSize = enum AudioEngineBufferSize
- Buffer sizes to be used in combo boxes.
- using AudioEngineSamplerate = enum AudioEngineSamplerate
- Samplerates to be used in comboboxes.
- using BounceMode = enum BounceMode
- Mode used when bouncing, either during exporting or when bouncing tracks or regions to audio.
- using AudioEngine = struct AudioEngine
- The audio engine.
Functions
- auto engine_new(Project* project) -> AudioEngine*
- Create a new audio engine.
- void engine_pre_setup(AudioEngine* self)
- Sets up the audio engine before the project is initialized/loaded.
- void engine_setup(AudioEngine* self)
- Sets up the audio engine after the project is initialized/loaded.
- void engine_activate(AudioEngine* self, bool activate)
- Activates the audio engine to start processing and 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.
- auto engine_process_events(AudioEngine* self) -> int
- GSourceFunc to be added using idle add.
-
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.
- auto engine_buffer_size_enum_to_int(AudioEngineBufferSize buffer_size) -> int
- Returns the int value correesponding to the given AudioEngineBufferSize.
- auto engine_samplerate_enum_to_int(AudioEngineSamplerate samplerate) -> int
- Returns the int value correesponding to the given AudioEngineSamplerate.
- void engine_set_buffer_size(AudioEngine* self, uint32_t buf_size)
- Request the backend to set the buffer size.
- 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_reset_bounce_mode(AudioEngine* self)
- Reset the bounce mode on the engine, all tracks and regions to OFF.
- void engine_free(AudioEngine* self)
- Closes any connections and free's data.
Defines
- #define engine_set_run(engine, _run)
- Set whether engine should process (true) or skip (false).
- #define ENGINE_EVENTS_PUSH(et, _arg, _uint_arg)
- Push events.
- #define engine_is_port_own(self, port)
- Returns 1 if the port is an engine port or control room port, otherwise 0.