60 unsigned int _sample_count_hint,
61 const std::string & name =
"AudioIfc") {
77 virtual int send(
void * buf,
unsigned int len,
bool when_ready =
false) = 0;
95 virtual int recv(std::vector<float> & buf,
bool when_ready =
false) = 0;
The Baseclass for all SoDa objects, and useful commonly used classes.
Generic Audio Interface Class.
virtual bool sendBufferReady(unsigned int len)=0
sendBufferReady – is there enough space in the audio device send buffer for a call from send?
virtual bool setOutGain(float gain)
set the gain for the output device.
virtual bool setInGain(float gain)
set the gain for the input device.
virtual void wakeIn()=0
start the input stream
virtual void wakeOut()=0
start the output stream
virtual int send(void *buf, unsigned int len, bool when_ready=false)=0
send – send a buffer to the audio output
virtual void sleepOut()=0
stop the output stream so that we don't encounter a buffer underflow while the reciever is muted.
virtual float getOutGain()
get the gain for the output device.
virtual std::string currentPlaybackState()
virtual void sleepIn()=0
stop the input stream so that we don't encounter a buffer overflow while the transmitter is inactive.
virtual float getInGain()
get the gain for the input device.
AudioIfc(unsigned int _sample_rate, unsigned int _sample_count_hint, const std::string &name="AudioIfc")
unsigned int sample_count_hint
virtual bool recvBufferReady(unsigned int len)=0
recvBufferReady – is there enough space in the audio device recv buffer for a call from recv?
virtual std::string currentCaptureState()
virtual int recv(std::vector< float > &buf, bool when_ready=false)=0
recv – get a buffer of data from the audio input
std::shared_ptr< AudioIfc > AudioIfcPtr