MP3Decoder.h 425 B

12345678910111213141516171819
  1. // Copyright (c) Kuba Szczodrzyński 2022-1-14.
  2. #pragma once
  3. #include "BaseCodec.h"
  4. #include "mp3dec.h"
  5. class MP3Decoder : public BaseCodec {
  6. private:
  7. HMP3Decoder mp3;
  8. int16_t *pcmData;
  9. MP3FrameInfo frame = {};
  10. public:
  11. MP3Decoder();
  12. ~MP3Decoder();
  13. bool setup(uint32_t sampleRate, uint8_t channelCount, uint8_t bitDepth) override;
  14. uint8_t *decode(uint8_t *inData, uint32_t inLen, uint32_t &outLen) override;
  15. };