+ virtual ~SoundDecoder();
+
+ /** Opens a file and creates a decoder of an appropriate type for it. */
+ static SoundDecoder *open_file(const std::string &);
+
+ /** Creates a decoder for an already-opened audio file. */
+ static SoundDecoder *open_io(IO::Seekable &);
+
+ /** Restarts decoding from the beginning of the file. */
+ virtual void rewind() { seek(0); }
+
+ /** Sets decoding position expressed in PCM bytes. This may involve seeking
+ to the beginning and skipping until the desired position is reached.*/
+ virtual void seek(unsigned) = 0;
+
+ /** Reads decoded sound data. Length is specified in bytes. */
+ virtual unsigned read(char *, unsigned) = 0;
+