35 unsigned channels,
unsigned bits,
unsigned frequency);
49 :
WavWriter(filename, channels, 8, frequency) {}
51 void write(std::span<const uint8_t> buffer);
60 :
WavWriter(filename, channels, 16, frequency) {}
62 void write(std::span<const int16_t> buffer);
63 void write(std::span<const float> buffer,
float amp = 1.0f);
64 void write(std::span<const StereoFloat> buffer,
float ampLeft = 1.0f,
float ampRight = 1.0f);
This class represents a filename.
void write(std::span< const int16_t > buffer)
Wav16Writer(const Filename &filename, unsigned channels, unsigned frequency)
void writeSilence(uint32_t samples)
Wav8Writer(const Filename &filename, unsigned channels, unsigned frequency)
void write(std::span< const uint8_t > buffer)
Base class for writing WAV files.
void flush()
Flush data to file and update header.
bool isEmpty() const
Returns false if there has been data written to the wav image.
uint32_t getBytes() const
Returns the number of bytes (not samples) written so far.
This file implemented 3 utility functions: