A class that splits an audio stream into multiple streams.
More...
#include <AsyncAudioSplitter.h>
A class that splits an audio stream into multiple streams.
- Author
- Tobias Blomberg
- Date
- 2005-05-05
This class is part of the audio pipe framework. It is used to split one incoming audio source into multiple outgoing sources.
- Examples
- AsyncAudioContainer_demo.cpp.
Definition at line 117 of file AsyncAudioSplitter.h.
◆ AudioSplitter()
Async::AudioSplitter::AudioSplitter |
( |
void | | ) |
|
◆ ~AudioSplitter()
Async::AudioSplitter::~AudioSplitter |
( |
void | | ) |
|
◆ addSink()
void Async::AudioSplitter::addSink |
( |
AudioSink * | sink, |
|
|
bool | managed = false ) |
Add an audio sink to the splitter.
- Parameters
-
sink | The sink object to add |
managed | If managed is true the attached sink will be deleted when the splitter is deleted |
- Examples
- AsyncAudioContainer_demo.cpp.
◆ enableSink()
void Async::AudioSplitter::enableSink |
( |
AudioSink * | sink, |
|
|
bool | enable ) |
Enable or disable audio output to the given audio sink.
- Parameters
-
sink | The audio sink to enable/disable |
enable | Set to true to enable the sink or false to disable it |
◆ flushSamples()
void Async::AudioSplitter::flushSamples |
( |
void | | ) |
|
|
overridevirtual |
Tell the sink to flush the previously written samples.
This function is used to tell the sink to flush previously written samples. When done flushing, the sink should call the sourceAllSamplesFlushed function. This function is normally only called from a connected source object.
Reimplemented from Async::AudioSink.
◆ removeAllSinks()
void Async::AudioSplitter::removeAllSinks |
( |
void | | ) |
|
Remove all audio sinks from this splitter.
◆ removeSink()
void Async::AudioSplitter::removeSink |
( |
AudioSink * | sink | ) |
|
Remove an audio sink from the splitter.
- Parameters
-
sink | The sink object to remove |
◆ writeSamples()
int Async::AudioSplitter::writeSamples |
( |
const float * | samples, |
|
|
int | len ) |
|
overridevirtual |
Write samples into this audio sink.
- Parameters
-
samples | The buffer containing the samples |
len | The number of samples in the buffer |
- Returns
- Returns the number of samples that has been taken care of
This function is used to write audio into this audio sink. If it returns 0, no more samples should be written until the resumeOutput function in the source have been called. This function is normally only called from a connected source object.
Reimplemented from Async::AudioSink.
◆ Branch
The documentation for this class was generated from the following file: