1 #ifndef MSP_AL_MP3DECODER_H_
2 #define MSP_AL_MP3DECODER_H_
5 #include <msp/al/sounddecoder.h>
10 class mp3_error: public std::runtime_error
13 mp3_error(const std::string &, int);
14 virtual ~mp3_error() throw() { }
17 static std::string get_message(int);
22 Decoder for MPEG-2 audio files, a.k.a. MP2 and MP3 files. Normally you should
23 use one of the SoundDecoder::open_* functions to create a decoder.
25 class Mp3Decoder: public SoundDecoder
37 Mp3Decoder(IO::Seekable &);
38 virtual ~Mp3Decoder();
40 static bool detect(const std::string &);
42 virtual void seek(unsigned);
43 virtual unsigned read(char *, unsigned);
47 bool try_decode(bool);