PortAudioSink.h 425 B

12345678910111213141516171819
  1. #pragma once
  2. #include <vector>
  3. #include "portaudio.h"
  4. #include <cstdint>
  5. #include <iostream>
  6. #include "AudioSink.h"
  7. class PortAudioSink : public AudioSink
  8. {
  9. public:
  10. PortAudioSink();
  11. ~PortAudioSink() override;
  12. void feedPCMFrames(const uint8_t *buffer, size_t bytes) override;
  13. bool setParams(uint32_t sampleRate, uint8_t channelCount, uint8_t bitDepth) override;
  14. private:
  15. PaStream *stream = nullptr;
  16. };