AACDecoder.h 617 B

12345678910111213141516171819202122232425
  1. #pragma once
  2. #include <stdint.h> // for uint8_t, uint32_t, int16_t
  3. #include "BaseCodec.h" // for BaseCodec
  4. #include "aacdec.h" // for AACFrameInfo, HAACDecoder
  5. namespace bell {
  6. class AudioContainer;
  7. class AACDecoder : public BaseCodec {
  8. private:
  9. HAACDecoder aac;
  10. int16_t* pcmData;
  11. AACFrameInfo frame = {};
  12. public:
  13. AACDecoder();
  14. ~AACDecoder();
  15. bool setup(uint32_t sampleRate, uint8_t channelCount,
  16. uint8_t bitDepth) override;
  17. bool setup(AudioContainer* container) override;
  18. uint8_t* decode(uint8_t* inData, uint32_t& inLen, uint32_t& outLen) override;
  19. };
  20. } // namespace bell