PortAudioSink.h 433 B

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