1
0

avi_ima_adpcm_decoder.h 759 B

123456789101112131415161718192021222324
  1. #pragma once
  2. #include "../Plugins/Input/in_avi/ifc_aviaudiodecoder.h"
  3. #include "../nsavi/avi_header.h"
  4. struct ima_adpcm_format;
  5. class IMA_ADPCM_AVIDecoder : public ifc_aviaudiodecoder
  6. {
  7. public:
  8. IMA_ADPCM_AVIDecoder(const ima_adpcm_format *adpcmformat, const nsavi::STRH *stream_header);
  9. protected:
  10. RECVS_DISPATCH;
  11. private:
  12. /* ifc_aviaudiodecoder implementation */
  13. int OutputFrameSize(size_t *frame_size);
  14. int GetOutputProperties(unsigned int *sampleRate, unsigned int *channels, unsigned int *bitsPerSample, bool *isFloat);
  15. int DecodeChunk(uint16_t type, void **inputBuffer, size_t *inputBufferBytes, void *outputBuffer, size_t *outputBufferBytes);
  16. void Close();
  17. private:
  18. const ima_adpcm_format *adpcmformat;
  19. const nsavi::STRH *stream_header;
  20. };