view adpcm.h @ 4395:817530449706

New logic of HW equalizing: 1) Check HW capability. 2) If HW equalizer is capable control value then use it. In this case value of control is in range -100 : +100 (10x) 3) If not then try use SW equalizing (currently only divxds). Use old range (0 : +100) for that. Well, you shouldn't watch OSD bar if neighter HW nor SW equalizers are not capable control value. TODO: find out keys (maybe Rr Bb Gg) or 'on screen menu' for RGB intensity and OEM effects (fx).
author nick
date Mon, 28 Jan 2002 07:29:17 +0000
parents ae6f97724b84
children 4a6dde59834c
line wrap: on
line source

#ifndef ADPCM_H
#define ADPCM_H

#define IMA_ADPCM_PREAMBLE_SIZE 2
#define IMA_ADPCM_BLOCK_SIZE 0x22
#define IMA_ADPCM_SAMPLES_PER_BLOCK \
  ((IMA_ADPCM_BLOCK_SIZE - IMA_ADPCM_PREAMBLE_SIZE) * 2)

#define MS_ADPCM_PREAMBLE_SIZE 7
#define MS_ADPCM_SAMPLES_PER_BLOCK \
  ((sh_audio->wf->nBlockAlign - MS_ADPCM_PREAMBLE_SIZE) * 2)

#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)

// pretend there's such a thing as mono for this format
#define FOX62_ADPCM_PREAMBLE_SIZE 8
#define FOX62_ADPCM_BLOCK_SIZE 0x400
// this isn't exact
#define FOX62_ADPCM_SAMPLES_PER_BLOCK 6000

int ima_adpcm_decode_block(unsigned short *output, unsigned char *input,
  int channels);
int ms_adpcm_decode_block(unsigned short *output, unsigned char *input,
  int channels, int block_size);
int fox61_adpcm_decode_block(unsigned short *output, unsigned char *input);
int fox62_adpcm_decode_block(unsigned short *output, unsigned char *input);
#endif