2001-12-26 07:13:17 +01:00
|
|
|
#ifndef ADPCM_H
|
|
|
|
#define ADPCM_H
|
|
|
|
|
2001-12-28 07:47:15 +01:00
|
|
|
#define IMA_ADPCM_PREAMBLE_SIZE 2
|
2001-12-26 07:13:17 +01:00
|
|
|
#define IMA_ADPCM_BLOCK_SIZE 0x22
|
2001-12-28 07:47:15 +01:00
|
|
|
#define IMA_ADPCM_SAMPLES_PER_BLOCK \
|
|
|
|
((IMA_ADPCM_BLOCK_SIZE - IMA_ADPCM_PREAMBLE_SIZE) * 2)
|
2001-12-26 07:13:17 +01:00
|
|
|
|
2001-12-28 07:47:15 +01:00
|
|
|
#define MS_ADPCM_PREAMBLE_SIZE 7
|
|
|
|
#define MS_ADPCM_SAMPLES_PER_BLOCK \
|
2001-12-29 05:20:29 +01:00
|
|
|
((sh_audio->wf->nBlockAlign - MS_ADPCM_PREAMBLE_SIZE) * 2)
|
2001-12-28 07:47:15 +01:00
|
|
|
|
2002-02-25 03:48:37 +01:00
|
|
|
#define DK4_ADPCM_PREAMBLE_SIZE 4
|
|
|
|
#define DK4_ADPCM_SAMPLES_PER_BLOCK \
|
|
|
|
(((sh_audio->wf->nBlockAlign - DK4_ADPCM_PREAMBLE_SIZE) * 2) + 1)
|
2002-01-01 21:04:54 +01:00
|
|
|
|
2001-12-28 07:47:15 +01:00
|
|
|
// pretend there's such a thing as mono for this format
|
2002-02-25 03:48:37 +01:00
|
|
|
#define DK3_ADPCM_PREAMBLE_SIZE 8
|
|
|
|
#define DK3_ADPCM_BLOCK_SIZE 0x400
|
2002-01-06 02:56:27 +01:00
|
|
|
// this isn't exact
|
2002-02-25 03:48:37 +01:00
|
|
|
#define DK3_ADPCM_SAMPLES_PER_BLOCK 6000
|
2001-12-26 07:13:17 +01:00
|
|
|
|
2002-03-30 23:27:45 +01:00
|
|
|
int qt_ima_adpcm_decode_block(unsigned short *output, unsigned char *input,
|
2001-12-27 06:09:43 +01:00
|
|
|
int channels);
|
2002-03-30 23:27:45 +01:00
|
|
|
int ms_ima_adpcm_decode_block(unsigned short *output, unsigned char *input,
|
|
|
|
int channels, int block_size);
|
2001-12-27 06:09:43 +01:00
|
|
|
int ms_adpcm_decode_block(unsigned short *output, unsigned char *input,
|
2001-12-29 05:20:29 +01:00
|
|
|
int channels, int block_size);
|
2002-02-25 03:48:37 +01:00
|
|
|
int dk4_adpcm_decode_block(unsigned short *output, unsigned char *input,
|
|
|
|
int channels, int block_size);
|
|
|
|
int dk3_adpcm_decode_block(unsigned short *output, unsigned char *input);
|
|
|
|
|
2001-12-26 07:13:17 +01:00
|
|
|
#endif
|