25 #ifndef CPP3DS_SOUNDFILEWRITEROGG_HPP
26 #define CPP3DS_SOUNDFILEWRITEROGG_HPP
31 #include <cpp3ds/Audio/SoundFileWriter.hpp>
32 #include <vorbis/vorbisenc.h>
44 class SoundFileWriterOgg :
public SoundFileWriter
56 static bool check(
const std::string& filename);
70 ~SoundFileWriterOgg();
82 virtual bool open(
const std::string& filename,
unsigned int sampleRate,
unsigned int channelCount);
91 virtual void write(
const Int16* samples, Uint64 count);
110 unsigned int m_channelCount;
111 std::ofstream m_file;
112 ogg_stream_state m_ogg;
113 vorbis_info m_vorbis;
114 vorbis_dsp_state m_state;
122 #endif // CPP3DS_SOUNDFILEWRITEROGG_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.