Async 1.8.0
Async::SigCAudioSource Class Reference

An adapter class to connect to an AudioSink class using SigC. More...

#include <AsyncSigCAudioSource.h>

Inheritance diagram for Async::SigCAudioSource:
Async::AudioSource

Public Member Functions

 SigCAudioSource (void)
 Default constuctor.
 
 ~SigCAudioSource (void)
 Destructor.
 
virtual void resumeOutput (void)
 Resume audio output to the sink.
 
virtual void allSamplesFlushed (void)
 The registered sink has flushed all samples.
 
int writeSamples (float *samples, int count)
 Write samples into this audio sink.
 
void flushSamples (void)
 Tell the sink to flush the previously written samples.
 
- 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.
 

Public Attributes

sigc::signal< void > sigResumeOutput
 A signal that is emitted when more samples can be written.
 
sigc::signal< void > sigAllSamplesFlushed
 Signal that is emitted when the connected sink is done flushing.
 

Additional Inherited Members

- 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.
 

Detailed Description

An adapter class to connect to an AudioSink class using SigC.

Author
Tobias Blomberg
Date
2005-04-17

This is an adapter class that can be used to interact with an AudioSink class using SigC signals and slots.

Definition at line 114 of file AsyncSigCAudioSource.h.

Constructor & Destructor Documentation

◆ SigCAudioSource()

Async::SigCAudioSource::SigCAudioSource ( void )
inline

Default constuctor.

Definition at line 120 of file AsyncSigCAudioSource.h.

◆ ~SigCAudioSource()

Async::SigCAudioSource::~SigCAudioSource ( void )
inline

Destructor.

Definition at line 125 of file AsyncSigCAudioSource.h.

Member Function Documentation

◆ allSamplesFlushed()

virtual void Async::SigCAudioSource::allSamplesFlushed ( void )
inlinevirtual

The registered sink has flushed all samples.

This function will be called when all samples have been flushed in the registered sink. It will then emit the sigAllSamplesFlushed signal.

Reimplemented from Async::AudioSource.

Definition at line 144 of file AsyncSigCAudioSource.h.

References sigAllSamplesFlushed.

◆ flushSamples()

void Async::SigCAudioSource::flushSamples ( void )
inline

Tell the sink to flush the previously written samples.

This function is used to tell this object to flush previously written samples. When done flushing, the sigAllSamplesFlushed signal will be emitted.

Definition at line 171 of file AsyncSigCAudioSource.h.

References Async::AudioSource::sinkFlushSamples().

◆ resumeOutput()

virtual void Async::SigCAudioSource::resumeOutput ( void )
inlinevirtual

Resume audio output to the sink.

This function will be called when the registered audio sink is ready to accept more samples. It will then emit the sigResumeOutput signal.

Reimplemented from Async::AudioSource.

Definition at line 133 of file AsyncSigCAudioSource.h.

References sigResumeOutput.

◆ writeSamples()

int Async::SigCAudioSource::writeSamples ( float * samples,
int count )
inline

Write samples into this audio sink.

Parameters
samplesThe buffer containing the samples
countThe 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 object. If it returns 0, no more samples should be written until the sigResumeOutput signal have been emitted.

Definition at line 159 of file AsyncSigCAudioSource.h.

References Async::AudioSource::sinkWriteSamples().

Member Data Documentation

◆ sigAllSamplesFlushed

sigc::signal<void> Async::SigCAudioSource::sigAllSamplesFlushed

Signal that is emitted when the connected sink is done flushing.

This signal will be emitted when all samples have been flushed in the registered sink.

Definition at line 190 of file AsyncSigCAudioSource.h.

Referenced by allSamplesFlushed().

◆ sigResumeOutput

sigc::signal<void> Async::SigCAudioSource::sigResumeOutput

A signal that is emitted when more samples can be written.

This signal will be emitted when the registered audio sink is ready to accept more samples.

Definition at line 182 of file AsyncSigCAudioSource.h.

Referenced by resumeOutput().


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