8#include "utils/audio.h"
10namespace zrythm::utils::audio
13struct AudioFileMetadata
16 AudioFileMetadata () =
default;
18 AudioFileMetadata (
const std::string &path);
54 AudioFile (std::filesystem::path filepath,
bool for_writing =
false);
56 AudioFile (AudioFile &&other)
noexcept;
57 AudioFile &operator= (AudioFile &&other)
noexcept;
84 size_t num_frames_to_read);
100 std::optional<size_t> samplerate);
104 std::unique_ptr<Impl> impl_;
AudioFileMetadata read_metadata()
Reads the metadata for the specified file.
void read_samples_interleaved(bool in_parts, float *samples, size_t start_from, size_t num_frames_to_read)
Reads the file into an internal float array (interleaved).
AudioFile(std::filesystem::path filepath, bool for_writing=false)
Creates a new instance of an AudioFile for the given path.
void read_full(zrythm::utils::audio::AudioBuffer &buffer, std::optional< size_t > samplerate)
Simple blocking API for reading and optionally resampling audio files.