25 #ifndef CPP3DS_SOUNDFILEWRITERWAV_HPP
26 #define CPP3DS_SOUNDFILEWRITERWAV_HPP
31 #include <cpp3ds/Audio/SoundFileWriter.hpp>
44 class SoundFileWriterWav :
public SoundFileWriter
56 static bool check(
const std::string& filename);
70 ~SoundFileWriterWav();
82 virtual bool open(
const std::string& filename,
unsigned int sampleRate,
unsigned int channelCount);
91 virtual void write(
const Int16* samples, Uint64 count);
104 bool writeHeader(
unsigned int sampleRate,
unsigned int channelCount);
115 std::ofstream m_file;
116 Uint64 m_sampleCount;
117 unsigned int m_channelCount;
125 #endif // CPP3DS_SOUNDFILEWRITERWAV_HPP
virtual bool open(const std::string &filename, unsigned int sampleRate, unsigned int channelCount)=0
Open a sound file for writing.
virtual void write(const Int16 *samples, Uint64 count)=0
Write audio samples to the open file.