comparison adpcm.h @ 4854:4a6dde59834c

fixed, strengthened, rewrote, and renamed a variety of the ADPCM decoders (including MS, DK4 and DK3 ADPCM)
author melanson
date Mon, 25 Feb 2002 02:48:37 +0000
parents ae6f97724b84
children f9cd6381e327
comparison
equal deleted inserted replaced
4853:2853640cea58 4854:4a6dde59834c
8 8
9 #define MS_ADPCM_PREAMBLE_SIZE 7 9 #define MS_ADPCM_PREAMBLE_SIZE 7
10 #define MS_ADPCM_SAMPLES_PER_BLOCK \ 10 #define MS_ADPCM_SAMPLES_PER_BLOCK \
11 ((sh_audio->wf->nBlockAlign - MS_ADPCM_PREAMBLE_SIZE) * 2) 11 ((sh_audio->wf->nBlockAlign - MS_ADPCM_PREAMBLE_SIZE) * 2)
12 12
13 #define FOX61_ADPCM_PREAMBLE_SIZE 4 13 #define DK4_ADPCM_PREAMBLE_SIZE 4
14 #define FOX61_ADPCM_BLOCK_SIZE 0x200 14 #define DK4_ADPCM_SAMPLES_PER_BLOCK \
15 #define FOX61_ADPCM_SAMPLES_PER_BLOCK \ 15 (((sh_audio->wf->nBlockAlign - DK4_ADPCM_PREAMBLE_SIZE) * 2) + 1)
16 (((FOX61_ADPCM_BLOCK_SIZE - FOX61_ADPCM_PREAMBLE_SIZE) * 2) + 1)
17 16
18 // pretend there's such a thing as mono for this format 17 // pretend there's such a thing as mono for this format
19 #define FOX62_ADPCM_PREAMBLE_SIZE 8 18 #define DK3_ADPCM_PREAMBLE_SIZE 8
20 #define FOX62_ADPCM_BLOCK_SIZE 0x400 19 #define DK3_ADPCM_BLOCK_SIZE 0x400
21 // this isn't exact 20 // this isn't exact
22 #define FOX62_ADPCM_SAMPLES_PER_BLOCK 6000 21 #define DK3_ADPCM_SAMPLES_PER_BLOCK 6000
23 22
24 int ima_adpcm_decode_block(unsigned short *output, unsigned char *input, 23 int ima_adpcm_decode_block(unsigned short *output, unsigned char *input,
25 int channels); 24 int channels);
26 int ms_adpcm_decode_block(unsigned short *output, unsigned char *input, 25 int ms_adpcm_decode_block(unsigned short *output, unsigned char *input,
27 int channels, int block_size); 26 int channels, int block_size);
28 int fox61_adpcm_decode_block(unsigned short *output, unsigned char *input); 27 int dk4_adpcm_decode_block(unsigned short *output, unsigned char *input,
29 int fox62_adpcm_decode_block(unsigned short *output, unsigned char *input); 28 int channels, int block_size);
29 int dk3_adpcm_decode_block(unsigned short *output, unsigned char *input);
30
30 #endif 31 #endif