Created
December 4, 2020 19:49
-
-
Save sehraf/75aa1cfe2609367f71418bf2eacf7da7 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#pragma once | |
#include <AudioOutput.h> | |
class AudioOutputFixedRates : public AudioOutput | |
{ | |
public: | |
AudioOutputFixedRates(AudioOutput *dest); | |
virtual ~AudioOutputFixedRates() override; | |
virtual bool SetRate(int hz) override { return true; } | |
virtual bool SetBitsPerSample(int bits) override { return true; } | |
virtual bool SetChannels(int channels) override { return true; } | |
virtual bool begin() override; | |
virtual bool ConsumeSample(int16_t sample[2]) override; | |
virtual bool stop() override; | |
bool SetFixedRate(int hz); | |
bool SetFixedBitsPerSample(int bits); | |
bool SetFixedChannels(int channels); | |
protected: | |
AudioOutput *sink; | |
};% |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment