trunk 20080912
[gitenigma.git] / include / lib / codecs / codec.h
blob50926bfcba19dbb5b77452ac47d817c55ee2ad0d
1 #ifndef DISABLE_FILE
3 #ifndef __codec_h
4 #define __codec_h
6 #include <libsig_comp.h>
8 class eIOBuffer;
10 class eAudioDecoder
12 protected:
13 int speed;
14 public:
15 eAudioDecoder();
16 virtual ~eAudioDecoder();
18 virtual int decodeMore(int last, int maxsamples, Signal1<void,unsigned int>*cb=0)=0; // returns number of samples(!) written to IOBuffer (out)
19 virtual void resync()=0; // clear (secondary) decoder buffers
21 struct pcmSettings
23 unsigned int samplerate;
24 unsigned int channels;
25 unsigned int format;
26 int reconfigure;
27 } pcmsettings;
28 virtual int getMinimumFramelength()=0;
29 void setSpeed(int _speed) { speed=_speed; }
30 virtual int getAverageBitrate()=0;
33 #endif
35 #endif //DISABLE_FILE