AudioClip struct

Audio clips for the pool.

Contents

These should be loaded in the project's sample rate.

Public variables

char* name
Name of the clip.
sample_t* frames
The audio frames, interleaved.
long num_frames
Number of frames per channel.
sample_t* ch_frames
Per-channel frames for convenience.
channels_t channels
Number of channels.
bpm_t bpm
BPM of the clip, or BPM of the project when the clip was first loaded.
int samplerate
Samplerate of the clip, or samplerate when the clip was imported into the project.
BitDepth bit_depth
Bit depth of the clip when the clip was imported into the project.
bool use_flac
Whether the clip should use FLAC when being serialized.
int pool_id
ID in the audio pool.
char* file_hash
File hash, used for checking if a clip is already written to the pool.
long frames_written
Frames already written to the file, per channel.
gint64 last_write
Time the last write took place.

Variable documentation

long AudioClip::frames_written

Frames already written to the file, per channel.

Used when writing in chunks/parts.

gint64 AudioClip::last_write

Time the last write took place.

This is used so that we can write every x ms instead of all the time.