#ifndef VORBIS_ENCODER_H #define VORBIS_ENCODER_H #include "encoder.h" #include #include class VorbisEncoder : public Encoder { private: vorbis_info vi; vorbis_dsp_state dsp; vorbis_block vb; ogg_stream_state os; ogg_page og; RawAudioSource::p source; //! Set to true when ogg stream headers are written. bool headers_written; protected: std::size_t write_pages(char *buf, std::size_t buf_size); std::size_t encode(char *buf, std::size_t buf_size); public: VorbisEncoder(RawAudioSource::p source_); virtual ~VorbisEncoder (); virtual std::size_t read(char* buf, std::size_t buf_size); }; #endif