36 #ifndef ASYNC_AUDIO_IO_INCLUDED 37 #define ASYNC_AUDIO_IO_INCLUDED 292 float gain(
void)
const {
return m_gain; }
348 class DelayedFlushAudioReader;
356 InputFifo *input_fifo;
357 DelayedFlushAudioReader *audio_reader;
361 AudioDevice *device(
void)
const {
return audio_dev; }
362 int readSamples(
float *samples,
int count);
363 bool doFlush(
void)
const;
364 bool isIdle(
void)
const;
365 int audioRead(
float *samples,
int count);
366 unsigned samplesAvailable(
void);
float gain(void) const
Return the gain.
static void setChannels(int channels)
Set the number of channels used when doing future opens.
static void setBlockCount(int count)
Set the block count used when opening audio devices.
virtual int writeSamples(const float *samples, int count)
Write samples into this audio sink.
virtual void flushSamples(void)
Tell the sink to flush the previously written samples.
A class for handling audio input/output to an audio device.
void resumeOutput(void)
Resume audio output to the sink.
int readBlocksize(void)
Find out what the read (recording) blocksize is set to.
void close(void)
Close the adio device.
bool open(Mode mode)
Open the audio device in the specified mode.
This file contains the base class for an audio source.
bool isFullDuplexCapable(void)
Check if the audio device is capable of full duplex operation.
int writeBlocksize(void)
Find out what the write (playback) blocksize is set to.
No mode. The same as close.
Contains a single shot or periodic timer that emits a signal on timeout.
~AudioIO(void)
Destructor.
static void setSampleRate(int rate)
Set the sample rate used when doing future opens.
This file contains the base class for an audio sink.
Mode mode(void) const
Find out how many samples there are in the output buffer.
Base class for handling audio devices.
Mode
The different modes to open a device in.
int channel(void) const
Return the audio channel used.
AudioIO(const std::string &dev_name, int channel)
Constructor.
int sampleRate(void) const
Return the sample rate.
The base class for an audio sink.
Namespace for the asynchronous programming classes.
void allSamplesFlushed(void)
The registered sink has flushed all samples.
void setGain(float gain)
Set the gain to use.
static void setBlocksize(int size)
Set the blocksize used when opening audio devices.
Contains a watch for file descriptors.
The base class for an audio source.
Implements a "valve" for audio.