utils/audio.h file

Audio utils.



enum BitDepth { BIT_DEPTH_16, BIT_DEPTH_24, BIT_DEPTH_32 }
Bit depth.


using BitDepth = enum BitDepth
Bit depth.


auto audio_write_raw_file(float* buff, size_t frames_already_written, size_t nframes, uint32_t samplerate, bool flac, BitDepth bit_depth, channels_t channels, const char* filename) -> void int
Writes the buffer as a raw file to the given path.
auto audio_get_num_frames(const char* filepath) -> unsigned_frame_t
Returns the number of frames in the given audio file.
auto audio_frames_equal(float* src1, float* src2, size_t num_frames, float epsilon) -> bool
Returns whether the frame buffers are equal.
auto audio_frames_empty(float* src, size_t num_frames) -> bool
Returns whether the frame buffer is empty (zero).
auto audio_detect_bpm(float* src, size_t num_frames, unsigned int samplerate, GArray* candidates) -> float
Detect BPM.
auto audio_get_num_cores(void) -> int
Returns the number of CPU cores.


#define STRIP_SIZE
Number of plugin slots per channel.