SPDIFAudioSink.h 591 B

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