audio/pool.h file

Audio file pool.

Contents

Classes

struct AudioPool
An audio pool is a pool of audio files and their corresponding float arrays in memory that are referenced by regions.

Typedefs

using AudioPool = struct AudioPool
An audio pool is a pool of audio files and their corresponding float arrays in memory that are referenced by regions.

Functions

void audio_pool_init_loaded(AudioPool* self)
Inits after loading a project.
auto audio_pool_new(void) -> AudioPool*
Creates a new audio pool.
auto audio_pool_add_clip(AudioPool* self, AudioClip* clip) -> int
Adds an audio clip to the pool.
auto audio_pool_duplicate_clip(AudioPool* self, int clip_id, bool write_file) -> int
Duplicates the clip with the given ID and returns the duplicate.
auto audio_pool_get_clip(AudioPool* self, int clip_id) -> AudioClip*
Returns the clip for the given ID.
void audio_pool_remove_clip(AudioPool* self, int clip_id, bool free_and_remove_file)
Removes the clip with the given ID from the pool and optionally frees it (and removes the file).
void audio_pool_ensure_unique_clip_name(AudioPool* pool, AudioClip* clip)
Ensures that the name of the clip is unique.
auto audio_pool_gen_name_for_recording_clip(AudioPool* pool, Track* track, int lane) -> char*
Generates a name for a recording clip.
void audio_pool_reload_clip_frame_bufs(AudioPool* self)
Loads the frame buffers of clips currently in use in the project from their files and frees the buffers of clips not currently in use.