2001-12-26 06:13:17 +00:00
|
|
|
#ifndef ADPCM_H
|
|
|
|
#define ADPCM_H
|
|
|
|
|
2001-12-28 06:47:15 +00:00
|
|
|
#define IMA_ADPCM_PREAMBLE_SIZE 2
|
2001-12-26 06:13:17 +00:00
|
|
|
#define IMA_ADPCM_BLOCK_SIZE 0x22
|
2001-12-28 06:47:15 +00:00
|
|
|
#define IMA_ADPCM_SAMPLES_PER_BLOCK \
|
|
|
|
((IMA_ADPCM_BLOCK_SIZE - IMA_ADPCM_PREAMBLE_SIZE) * 2)
|
2001-12-26 06:13:17 +00:00
|
|
|
|
2001-12-28 06:47:15 +00:00
|
|
|
#define MS_ADPCM_PREAMBLE_SIZE 7
|
|
|
|
#define MS_ADPCM_SAMPLES_PER_BLOCK \
|
2001-12-29 04:20:29 +00:00
|
|
|
((sh_audio->wf->nBlockAlign - MS_ADPCM_PREAMBLE_SIZE) * 2)
|
2001-12-28 06:47:15 +00:00
|
|
|
|
2002-01-01 20:04:54 +00:00
|
|
|
#define FOX61_ADPCM_PREAMBLE_SIZE 4
|
|
|
|
#define FOX61_ADPCM_BLOCK_SIZE 0x200
|
|
|
|
#define FOX61_ADPCM_SAMPLES_PER_BLOCK \
|
|
|
|
(((FOX61_ADPCM_BLOCK_SIZE - FOX61_ADPCM_PREAMBLE_SIZE) * 2) + 1)
|
|
|
|
|
2001-12-28 06:47:15 +00:00
|
|
|
// pretend there's such a thing as mono for this format
|
|
|
|
#define FOX62_ADPCM_PREAMBLE_SIZE 8
|
|
|
|
#define FOX62_ADPCM_BLOCK_SIZE 0x400
|
|
|
|
#define FOX62_ADPCM_SAMPLES_PER_BLOCK \
|
|
|
|
((FOX62_ADPCM_BLOCK_SIZE - FOX62_ADPCM_PREAMBLE_SIZE) * 2)
|
2001-12-26 06:13:17 +00:00
|
|
|
|
2001-12-27 05:09:43 +00:00
|
|
|
int ima_adpcm_decode_block(unsigned short *output, unsigned char *input,
|
|
|
|
int channels);
|
|
|
|
int ms_adpcm_decode_block(unsigned short *output, unsigned char *input,
|
2001-12-29 04:20:29 +00:00
|
|
|
int channels, int block_size);
|
2002-01-01 20:04:54 +00:00
|
|
|
int fox61_adpcm_decode_block(unsigned short *output, unsigned char *input);
|
2001-12-28 06:47:15 +00:00
|
|
|
int fox62_adpcm_decode_block(unsigned short *output, unsigned char *input,
|
|
|
|
int channels);
|
2001-12-26 06:13:17 +00:00
|
|
|
#endif
|