X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;f=source%2Foggdecoder.h;h=e194736a40207a09710fccec8ce37a72d4b512cc;hb=1e7141871d33e3e184456ba063fcf3448a8cc12a;hp=a3f5504c4c00bac79a4d46f61ea703c13e6eabc0;hpb=10cdb043b613d60c5de8f1cce0f7a5512b0d0074;p=libs%2Fal.git diff --git a/source/oggdecoder.h b/source/oggdecoder.h index a3f5504..e194736 100644 --- a/source/oggdecoder.h +++ b/source/oggdecoder.h @@ -1,11 +1,27 @@ #ifndef MSP_AL_OGGDECODER_H_ #define MSP_AL_OGGDECODER_H_ +#include #include "sounddecoder.h" namespace Msp { namespace AL { +class ogg_error: public std::runtime_error +{ +public: + ogg_error(const std::string &, int); + virtual ~ogg_error() throw() { } + +private: + static std::string get_message(int); +}; + + +/** +Decoder for Ogg Vorbis files. Normally you should use one of the +SoundDecoder::open_* functions to create a decoder. +*/ class OggDecoder: public SoundDecoder { private: @@ -17,7 +33,9 @@ public: OggDecoder(IO::Seekable &); ~OggDecoder(); - virtual void rewind(); + static bool detect(const std::string &); + + virtual void seek(unsigned); virtual unsigned read(char *, unsigned); };