// $Id: WavWriter.hh 5988 2007-01-10 20:54:16Z m9710797 $ #ifndef WAVWRITER_HH #define WAVWRITER_HH #include "noncopyable.hh" #include #include namespace openmsx { class WavWriter : private noncopyable { public: WavWriter(const std::string& filename, unsigned channels, unsigned bits, unsigned frequency); ~WavWriter(); void write8mono(unsigned char val); void write8mono(unsigned char* buf, unsigned len); void write16stereo(short* buffer, unsigned samples); /** Flush data to file and update header. Try to make (possibly) * incomplete file already usable for external programs. */ void flush(); private: FILE* wavfp; unsigned bytes; }; } // namespace openmsx #endif