#ifndef DECODER_H #define DECODER_H #include #include //! Interface for classes outputting raw audio. class RawAudioSource { public: typedef boost::shared_ptr p; //! Virtual destructor. virtual ~RawAudioSource() {} //! Read into provided buffer. virtual std::size_t read(char* buf, std::size_t buf_size) = 0; }; //! Decoder base class. class Decoder : public RawAudioSource { public: typedef boost::shared_ptr p; //! Initialize decoders. static void init(); //! Construct and return requested decoder. static p get(const std::string& name, const std::string& filename); }; #endif