TRSpeex.h 660 B

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. #ifndef _TRSPEEX_
  2. #define _TRSPEEX_
  3. #include "speex/speex.h"
  4. #include "fifo.h"
  5. #ifdef __cplusplus
  6. extern "C"
  7. {
  8. #endif
  9. #ifndef NULL
  10. #define NULL ((void *)0)
  11. #endif
  12. #define MAX_FRAME_SIZE 2000
  13. #define MAX_FRAME_BYTES 2000
  14. typedef struct _TRSpeexDecodeContex
  15. {
  16. void *st;
  17. SpeexBits bits;
  18. int frame_size;
  19. PCMFifoBuffer* pFifo;
  20. }TRSpeexDecodeContex;
  21. int TRSpeexDecodeInit(TRSpeexDecodeContex* stDecode);
  22. int TRSpeexDecode(TRSpeexDecodeContex* stDecode, char* pInput, int nInputSize, char* pOutput, int* nOutSize);
  23. int TRSpeexDecodeRelease(TRSpeexDecodeContex* stDecode);
  24. #ifdef __cplusplus
  25. }
  26. #endif
  27. #endif