11namespace tracktion {
inline namespace engine
37 bool isOpen()
const noexcept;
61 int samplesUntilFlush;
Smart wrapper for writing to an audio file.
double getSampleRate() const noexcept
Returns the sample rate of the writer, should only be called on an open writer.
~AudioFileWriter()
Destructor, calls closeForWriting.
bool appendBuffer(juce::AudioBuffer< float > &buffer, int numSamples)
Appends an AudioBuffer to the file.
int getNumChannels() const noexcept
Returns the num channels of the writer, should only be called on an open writer.
bool writeFromAudioReader(juce::AudioFormatReader &, SampleCount startSample, SampleCount numSamples)
Appends a block of samples to the file from an audio format reader.
bool isOpen() const noexcept
Returns true if the file is open and ready to write to.
void closeForWriting()
Deletes the writer and releases the file handle.