comparison adpcm.h @ 3875:e3caff2daa98

fixed stereo MS ADPCM decoder and reinstated opensource decoder as the default handler for MS ADPCM data
author melanson
date Sat, 29 Dec 2001 04:20:29 +0000
parents 8a88ed2473aa
children 60db4273246d
comparison
equal deleted inserted replaced
3874:8b76388de734 3875:e3caff2daa98
5 #define IMA_ADPCM_BLOCK_SIZE 0x22 5 #define IMA_ADPCM_BLOCK_SIZE 0x22
6 #define IMA_ADPCM_SAMPLES_PER_BLOCK \ 6 #define IMA_ADPCM_SAMPLES_PER_BLOCK \
7 ((IMA_ADPCM_BLOCK_SIZE - IMA_ADPCM_PREAMBLE_SIZE) * 2) 7 ((IMA_ADPCM_BLOCK_SIZE - IMA_ADPCM_PREAMBLE_SIZE) * 2)
8 8
9 #define MS_ADPCM_PREAMBLE_SIZE 7 9 #define MS_ADPCM_PREAMBLE_SIZE 7
10 #define MS_ADPCM_BLOCK_SIZE 256
11 #define MS_ADPCM_SAMPLES_PER_BLOCK \ 10 #define MS_ADPCM_SAMPLES_PER_BLOCK \
12 ((MS_ADPCM_BLOCK_SIZE - MS_ADPCM_PREAMBLE_SIZE) * 2) 11 ((sh_audio->wf->nBlockAlign - MS_ADPCM_PREAMBLE_SIZE) * 2)
13 12
14 // pretend there's such a thing as mono for this format 13 // pretend there's such a thing as mono for this format
15 #define FOX62_ADPCM_PREAMBLE_SIZE 8 14 #define FOX62_ADPCM_PREAMBLE_SIZE 8
16 #define FOX62_ADPCM_BLOCK_SIZE 0x400 15 #define FOX62_ADPCM_BLOCK_SIZE 0x400
17 #define FOX62_ADPCM_SAMPLES_PER_BLOCK \ 16 #define FOX62_ADPCM_SAMPLES_PER_BLOCK \
18 ((FOX62_ADPCM_BLOCK_SIZE - FOX62_ADPCM_PREAMBLE_SIZE) * 2) 17 ((FOX62_ADPCM_BLOCK_SIZE - FOX62_ADPCM_PREAMBLE_SIZE) * 2)
19 18
20 int ima_adpcm_decode_block(unsigned short *output, unsigned char *input, 19 int ima_adpcm_decode_block(unsigned short *output, unsigned char *input,
21 int channels); 20 int channels);
22 int ms_adpcm_decode_block(unsigned short *output, unsigned char *input, 21 int ms_adpcm_decode_block(unsigned short *output, unsigned char *input,
23 int channels); 22 int channels, int block_size);
24 int fox62_adpcm_decode_block(unsigned short *output, unsigned char *input, 23 int fox62_adpcm_decode_block(unsigned short *output, unsigned char *input,
25 int channels); 24 int channels);
26 25
27 #endif 26 #endif