36 #ifndef ASYNC_AUDIO_IO_INCLUDED 37 #define ASYNC_AUDIO_IO_INCLUDED 269 Mode
mode(
void)
const {
return io_mode; }
286 float gain(
void)
const {
return m_gain; }
342 class DelayedFlushAudioReader;
350 InputFifo *input_fifo;
351 DelayedFlushAudioReader *audio_reader;
355 AudioDevice *device(
void)
const {
return audio_dev; }
356 int readSamples(
float *samples,
int count);
357 bool doFlush(
void)
const;
358 bool isIdle(
void)
const;
359 int audioRead(
float *samples,
int count);
360 unsigned samplesAvailable(
void);
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.
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.
int blocksize(void)
Find out what the blocksize is set to.
bool isFullDuplexCapable(void)
Check if the audio device is capable of full duplex operation.
No mode. The same as close.
float gain(void) const
Return the gain.
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.
int sampleRate(void) const
Return the sample rate.
Base class for handling audio devices.
int channel(void) const
Return the audio channel used.
Mode
The different modes to open a device in.
AudioIO(const std::string &dev_name, int channel)
Constructor.
Mode mode(void) const
Find out how many samples there are in the output buffer.
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.