openMSX
|
Writes 16-bit WAV files. More...
#include <WavWriter.hh>
Public Member Functions | |
Wav16Writer (const Filename &filename, unsigned channels, unsigned frequency) | |
void | write (std::span< const int16_t > buffer) |
void | write (std::span< const float > buffer, float amp=1.0f) |
void | write (std::span< const StereoFloat > buffer, float ampLeft=1.0f, float ampRight=1.0f) |
void | writeSilence (uint32_t samples) |
Public Member Functions inherited from openmsx::WavWriter | |
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. | |
void | flush () |
Flush data to file and update header. | |
Additional Inherited Members | |
Protected Member Functions inherited from openmsx::WavWriter | |
WavWriter (const Filename &filename, unsigned channels, unsigned bits, unsigned frequency) | |
~WavWriter () | |
Protected Attributes inherited from openmsx::WavWriter | |
File | file |
uint32_t | bytes = 0 |
Writes 16-bit WAV files.
Definition at line 56 of file WavWriter.hh.
|
inline |
Definition at line 59 of file WavWriter.hh.
void openmsx::Wav16Writer::write | ( | std::span< const float > | buffer, |
float | amp = 1.0f |
||
) |
Definition at line 106 of file WavWriter.cc.
References openmsx::WavWriter::bytes, openmsx::WavWriter::file, ranges::transform(), and openmsx::File::write().
void openmsx::Wav16Writer::write | ( | std::span< const int16_t > | buffer | ) |
Definition at line 90 of file WavWriter.cc.
References Endian::BIG, openmsx::WavWriter::bytes, openmsx::WavWriter::file, and openmsx::File::write().
void openmsx::Wav16Writer::write | ( | std::span< const StereoFloat > | buffer, |
float | ampLeft = 1.0f , |
||
float | ampRight = 1.0f |
||
) |
Definition at line 115 of file WavWriter.cc.
References openmsx::WavWriter::bytes, enumerate(), openmsx::WavWriter::file, and openmsx::File::write().
void openmsx::Wav16Writer::writeSilence | ( | uint32_t | samples | ) |
Definition at line 127 of file WavWriter.cc.
References openmsx::WavWriter::bytes, openmsx::WavWriter::file, and openmsx::File::write().