summaryrefslogtreecommitdiff
path: root/core/multimedia/opieplayer/libflash/adpcm.h
Unidiff
Diffstat (limited to 'core/multimedia/opieplayer/libflash/adpcm.h') (more/less context) (ignore whitespace changes)
-rw-r--r--core/multimedia/opieplayer/libflash/adpcm.h36
1 files changed, 36 insertions, 0 deletions
diff --git a/core/multimedia/opieplayer/libflash/adpcm.h b/core/multimedia/opieplayer/libflash/adpcm.h
new file mode 100644
index 0000000..5714c0c
--- a/dev/null
+++ b/core/multimedia/opieplayer/libflash/adpcm.h
@@ -0,0 +1,36 @@
1#ifndef _ADPCM_H_
2#define _ADPCM_H_
3
4class Adpcm {
5
6 // Destination format - note we always decompress to 16 bit
7 long stereo;
8 int nBits; // number of bits in each sample
9
10 long valpred[2]; // Current state
11 int index[2];
12
13 long nSamples; // number of samples decompressed so far
14
15 // Parsing Info
16 unsigned char *src;
17 long bitBuf; // this should always contain at least 24 bits of data
18 int bitPos;
19
20 void FillBuffer();
21
22 long GetBits(int n);
23
24 long GetSBits(int n);
25
26public:
27 Adpcm(unsigned char *buffer, long isStereo);
28
29 void Decompress(short * dst, long n); // return number of good samples
30#ifdef DUMP
31 void dump(BitStream *bs);
32 void Compress(short *pcm, long n, int bits);
33#endif
34};
35
36#endif /* _ADPCM_H_ */