SPDIFAudioSink.h 607 B

12345678910111213141516171819202122232425262728
  1. #ifndef SPDIFAUDIOSINK_H
  2. #define SPDIFAUDIOSINK_H
  3. #include <stdio.h>
  4. #include <string.h>
  5. #include <sys/stat.h>
  6. #include <sys/unistd.h>
  7. #include <iostream>
  8. #include <vector>
  9. #include "BufferedAudioSink.h"
  10. #include "esp_err.h"
  11. #include "esp_log.h"
  12. class SPDIFAudioSink : public BufferedAudioSink {
  13. private:
  14. uint8_t spdifPin;
  15. public:
  16. explicit SPDIFAudioSink(uint8_t spdifPin);
  17. ~SPDIFAudioSink() override;
  18. void feedPCMFrames(const uint8_t* buffer, size_t bytes) override;
  19. bool setParams(uint32_t sampleRate, uint8_t channelCount,
  20. uint8_t bitDepth) override;
  21. private:
  22. };
  23. #endif