ima_enc.h 497 B

1234567891011121314151617181920212223242526
  1. #ifndef _IMA_ADPCM_H_
  2. #define _IMA_ADPCM_H_
  3. typedef unsigned int uint;
  4. typedef unsigned char u8;
  5. typedef unsigned short u16;
  6. typedef unsigned int u32;
  7. typedef signed char s8;
  8. typedef signed short s16;
  9. typedef signed int s32;
  10. typedef struct
  11. {
  12. int valprev;
  13. int index;
  14. }CodecState;
  15. extern CodecState mg;
  16. void adpcm_init();
  17. void encode(CodecState* state, s16* input, int numSamples, u8* output);
  18. void decode(CodecState* state, u8* input, int numSamples, s16* output);
  19. #endif //_IMA_ADPCM_H_