Async 1.8.0
Async::AudioMixer Class Reference

A class for mixing audio streams. More...

#include <AsyncAudioMixer.h>

Inheritance diagram for Async::AudioMixer:
Async::AudioSource

Public Member Functions

 AudioMixer (void)
 Default constuctor.
 
 ~AudioMixer (void)
 Destructor.
 
void addSource (AudioSource *source)
 Add an audio source to the mixer.
 
void resumeOutput (void)
 Resume audio output to the sink.
 
- Public Member Functions inherited from Async::AudioSource
 AudioSource (void)
 Default constuctor.
 
virtual ~AudioSource (void)
 Destructor.
 
bool registerSink (AudioSink *sink, bool managed=false)
 Register an audio sink to provide samples to.
 
void unregisterSink (void)
 Unregister the previously registered audio sink.
 
bool isRegistered (void) const
 Check if an audio sink has been registered.
 
AudioSinksink (void) const
 Get the registered audio sink.
 
bool sinkManaged (void) const
 Check if the sink is managed or not.
 
void handleAllSamplesFlushed (void)
 The registered sink has flushed all samples.
 

Protected Member Functions

void allSamplesFlushed (void)
 The registered sink has flushed all samples.
 
- Protected Member Functions inherited from Async::AudioSource
int sinkWriteSamples (const float *samples, int len)
 
void sinkFlushSamples (void)
 
bool setHandler (AudioSource *handler)
 Setup another source to handle the outgoing audio.
 
AudioSourcehandler (void) const
 
void clearHandler (void)
 Clear a handler that was previously setup with setHandler.
 

Friends

class MixerSrc
 

Detailed Description

A class for mixing audio streams.

Author
Tobias Blomberg / SM0SVX
Date
2007-10-05

This class is used to mix audio streams together.

Definition at line 114 of file AsyncAudioMixer.h.

Constructor & Destructor Documentation

◆ AudioMixer()

Async::AudioMixer::AudioMixer ( void )

Default constuctor.

◆ ~AudioMixer()

Async::AudioMixer::~AudioMixer ( void )

Destructor.

Member Function Documentation

◆ addSource()

void Async::AudioMixer::addSource ( AudioSource * source)

Add an audio source to the mixer.

Parameters
sourceThe audio source to add

◆ allSamplesFlushed()

void Async::AudioMixer::allSamplesFlushed ( void )
protectedvirtual

The registered sink has flushed all samples.

This function will be called when all samples have been flushed in the registered sink. This function is normally only called from a connected sink object.

Reimplemented from Async::AudioSource.

◆ resumeOutput()

void Async::AudioMixer::resumeOutput ( void )
virtual

Resume audio output to the sink.

This function will be called when the registered audio sink is ready to accept more samples. This function is normally only called from a connected sink object.

Reimplemented from Async::AudioSource.

Friends And Related Symbol Documentation

◆ MixerSrc

friend class MixerSrc
friend

Definition at line 175 of file AsyncAudioMixer.h.


The documentation for this class was generated from the following file: