Async::AudioDelayLine Class Reference

This class implements an audio delay line. More...

#include <AsyncAudioDelayLine.h>

Inheritance diagram for Async::AudioDelayLine:
Async::AudioSink Async::AudioSource

List of all members.

Public Member Functions


Detailed Description

This class implements an audio delay line.

Author:
Tobias Blomberg / SM0SVX
Date:
2006-07-08

This class implements an audio delay line. It simple delays the audio with the specified amount of time. This can be useful if you want to mute audio based on a slow detector. With a delay line you have the possibility to mute audio that have passed the detector but have not yet passed through the delay line.

Definition at line 117 of file AsyncAudioDelayLine.h.


Constructor & Destructor Documentation

Async::AudioDelayLine::AudioDelayLine ( int  length_ms  )  [explicit]

Constuctor.

Parameters:
length_ms The length in milliseconds of the delay line
Async::AudioDelayLine::~AudioDelayLine ( void   ) 

Destructor.


Member Function Documentation

void Async::AudioDelayLine::allSamplesFlushed ( void   )  [virtual]

The registered sink has flushed all samples.

This function must be implemented by the inheriting class. It 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.

void Async::AudioDelayLine::clear ( int  time_ms = -1  ) 

Clear samples in the delay line.

Parameters:
time_ms How long time in milliseconds to clear

Will clear the specified amount of samples in the delay line. If a clear is issued right before the delay line is flushed, the cleared samles will not be flushed. They will be thrown away.

void Async::AudioDelayLine::flushSamples ( void   )  [virtual]

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.

void Async::AudioDelayLine::mute ( bool  do_mute,
int  time_ms = 0 
)

Mute audio.

Parameters:
do_mute If true mute else unmute
time_ms How much more time in milliseconds to mute (see below)

This function is used to mute audio in the delay line. With time_ms equal to zero its function is trivial. Mute incoming audio until mute is called with do_mute = false. The time_ms paramter specify how much time before (do_mute = true) or time after (do_mute = false) should be muted. Negative values are not allowed.

void Async::AudioDelayLine::resumeOutput ( void   )  [virtual]

Resume audio output to the sink.

This function must be reimplemented by the inheriting class. It 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.

int Async::AudioDelayLine::writeSamples ( const float *  samples,
int  count 
) [virtual]

Write samples into the delay line.

Parameters:
samples The buffer containing the samples
count The number of samples in the buffer
Returns:
Returns the number of samples that has been taken care of

This function will write samples into the delay line. It's normally only called from a connected source object.

Reimplemented from Async::AudioSink.


The documentation for this class was generated from the following file:
Generated by  doxygen 1.6.2-20100208