annotate adpcm.h @ 5013:52c008dd6e93

min() moved out of #if, applied brightness/contrast patch by Brian J. Murrell
author arpi
date Sun, 10 Mar 2002 03:36:16 +0000
parents 4a6dde59834c
children f9cd6381e327
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
3756
734d0c0a8ab0 Initial support for unified ADPCM decoder
melanson
parents:
diff changeset
1 #ifndef ADPCM_H
734d0c0a8ab0 Initial support for unified ADPCM decoder
melanson
parents:
diff changeset
2 #define ADPCM_H
734d0c0a8ab0 Initial support for unified ADPCM decoder
melanson
parents:
diff changeset
3
3826
8a88ed2473aa added initial, not-yet-functional, support for fox62 audio
melanson
parents: 3787
diff changeset
4 #define IMA_ADPCM_PREAMBLE_SIZE 2
3756
734d0c0a8ab0 Initial support for unified ADPCM decoder
melanson
parents:
diff changeset
5 #define IMA_ADPCM_BLOCK_SIZE 0x22
3826
8a88ed2473aa added initial, not-yet-functional, support for fox62 audio
melanson
parents: 3787
diff changeset
6 #define IMA_ADPCM_SAMPLES_PER_BLOCK \
8a88ed2473aa added initial, not-yet-functional, support for fox62 audio
melanson
parents: 3787
diff changeset
7 ((IMA_ADPCM_BLOCK_SIZE - IMA_ADPCM_PREAMBLE_SIZE) * 2)
3756
734d0c0a8ab0 Initial support for unified ADPCM decoder
melanson
parents:
diff changeset
8
3826
8a88ed2473aa added initial, not-yet-functional, support for fox62 audio
melanson
parents: 3787
diff changeset
9 #define MS_ADPCM_PREAMBLE_SIZE 7
8a88ed2473aa added initial, not-yet-functional, support for fox62 audio
melanson
parents: 3787
diff changeset
10 #define MS_ADPCM_SAMPLES_PER_BLOCK \
3875
e3caff2daa98 fixed stereo MS ADPCM decoder and reinstated opensource decoder as the
melanson
parents: 3826
diff changeset
11 ((sh_audio->wf->nBlockAlign - MS_ADPCM_PREAMBLE_SIZE) * 2)
3826
8a88ed2473aa added initial, not-yet-functional, support for fox62 audio
melanson
parents: 3787
diff changeset
12
4854
4a6dde59834c fixed, strengthened, rewrote, and renamed a variety of the ADPCM decoders
melanson
parents: 4001
diff changeset
13 #define DK4_ADPCM_PREAMBLE_SIZE 4
4a6dde59834c fixed, strengthened, rewrote, and renamed a variety of the ADPCM decoders
melanson
parents: 4001
diff changeset
14 #define DK4_ADPCM_SAMPLES_PER_BLOCK \
4a6dde59834c fixed, strengthened, rewrote, and renamed a variety of the ADPCM decoders
melanson
parents: 4001
diff changeset
15 (((sh_audio->wf->nBlockAlign - DK4_ADPCM_PREAMBLE_SIZE) * 2) + 1)
3933
60db4273246d added initial support for format 0x61 ADPCM (sounds good, but still pops)
melanson
parents: 3875
diff changeset
16
3826
8a88ed2473aa added initial, not-yet-functional, support for fox62 audio
melanson
parents: 3787
diff changeset
17 // pretend there's such a thing as mono for this format
4854
4a6dde59834c fixed, strengthened, rewrote, and renamed a variety of the ADPCM decoders
melanson
parents: 4001
diff changeset
18 #define DK3_ADPCM_PREAMBLE_SIZE 8
4a6dde59834c fixed, strengthened, rewrote, and renamed a variety of the ADPCM decoders
melanson
parents: 4001
diff changeset
19 #define DK3_ADPCM_BLOCK_SIZE 0x400
4001
ae6f97724b84 fixed format 0x62 ADPCM audio
melanson
parents: 3933
diff changeset
20 // this isn't exact
4854
4a6dde59834c fixed, strengthened, rewrote, and renamed a variety of the ADPCM decoders
melanson
parents: 4001
diff changeset
21 #define DK3_ADPCM_SAMPLES_PER_BLOCK 6000
3756
734d0c0a8ab0 Initial support for unified ADPCM decoder
melanson
parents:
diff changeset
22
3787
55603340d1b2 implemented open source MS ADPCM decoder
melanson
parents: 3756
diff changeset
23 int ima_adpcm_decode_block(unsigned short *output, unsigned char *input,
55603340d1b2 implemented open source MS ADPCM decoder
melanson
parents: 3756
diff changeset
24 int channels);
55603340d1b2 implemented open source MS ADPCM decoder
melanson
parents: 3756
diff changeset
25 int ms_adpcm_decode_block(unsigned short *output, unsigned char *input,
3875
e3caff2daa98 fixed stereo MS ADPCM decoder and reinstated opensource decoder as the
melanson
parents: 3826
diff changeset
26 int channels, int block_size);
4854
4a6dde59834c fixed, strengthened, rewrote, and renamed a variety of the ADPCM decoders
melanson
parents: 4001
diff changeset
27 int dk4_adpcm_decode_block(unsigned short *output, unsigned char *input,
4a6dde59834c fixed, strengthened, rewrote, and renamed a variety of the ADPCM decoders
melanson
parents: 4001
diff changeset
28 int channels, int block_size);
4a6dde59834c fixed, strengthened, rewrote, and renamed a variety of the ADPCM decoders
melanson
parents: 4001
diff changeset
29 int dk3_adpcm_decode_block(unsigned short *output, unsigned char *input);
4a6dde59834c fixed, strengthened, rewrote, and renamed a variety of the ADPCM decoders
melanson
parents: 4001
diff changeset
30
3756
734d0c0a8ab0 Initial support for unified ADPCM decoder
melanson
parents:
diff changeset
31 #endif