Main Page   Class Hierarchy   Compound List   File List   Compound Members   File Members  

aflibAudioConstantSrc Class Reference

Inserts a constant audio source in a chain for test purposes. More...

#include <aflibAudioConstantSrc.h>

Inheritance diagram for aflibAudioConstantSrc::

aflibAudio aflibChain aflibMemCache List of all members.

Public Types

enum  waveform_type { WAVEFORM_DCLEVEL, WAVEFORM_TRIANGLE, WAVEFORM_SQUAREWAVE, WAVEFORM_SINEWAVE }

Public Methods

 aflibAudioConstantSrc (aflibAudio &audio)
 Constructor - defaults to a DC level fullscale signal.

 aflibAudioConstantSrc ()
 Constructor - defaults to a DC level fullscale signal.

 ~aflibAudioConstantSrc ()
 Destructor.

void setWaveformType (aflibAudioConstantSrc::waveform_type wave, double max_amp, double min_amp, int frequency)
 
  • Sets the type of waveform to be output.
More...


aflibStatus compute_segment (list< aflibData *> &data, long long position=-1)
 Work function, must be implemented by derived class.

const char* getName () const
 Returns the name of the derived class.


Detailed Description

Inserts a constant audio source in a chain for test purposes.

This class allows one to insert a test signal anywhere in an audio chain. It is mainly used for debugging other audio objects that work on audio data. When it is inserted in a chain it takes on the characteristics of everything before it in the chain. For instance a parent that is outputting a 22050 sample rate mono signal will cause this object to throw away the data from the parent and instead insert a test signal that is 22050 mono.

One can select a DC level, triangle wave, square wave, or sine wave. One can also adjust the frequency and amplitude.


Member Enumeration Documentation

enum aflibAudioConstantSrc::waveform_type
 

Enumeration values:
WAVEFORM_DCLEVEL  
WAVEFORM_TRIANGLE  
WAVEFORM_SQUAREWAVE  
WAVEFORM_SINEWAVE  


Constructor & Destructor Documentation

aflibAudioConstantSrc::aflibAudioConstantSrc ( aflibAudio & audio )
 

Constructor - defaults to a DC level fullscale signal.

aflibAudioConstantSrc::aflibAudioConstantSrc ( )
 

Constructor - defaults to a DC level fullscale signal.

aflibAudioConstantSrc::~aflibAudioConstantSrc ( )
 

Destructor.


Member Function Documentation

aflibStatus aflibAudioConstantSrc::compute_segment ( list< aflibData *> & data,
long long position = -1 ) [virtual]
 

Work function, must be implemented by derived class.

Reimplemented from aflibAudio.

const char * aflibAudioConstantSrc::getName ( ) const [inline, virtual]
 

Returns the name of the derived class.

Reimplemented from aflibAudio.

void aflibAudioConstantSrc::setWaveformType ( aflibAudioConstantSrc::waveform_type wave,
double max_amp,
double min_amp,
int frequency )
 

  • Sets the type of waveform to be output.

Allow the user to select the waveform type, amplitude, and frequency. The amplitude will be the peak amplitude of the signal specified in percent. Both a max and min are required. For full scale one would use 100.0 for max and -100.0 for min. For the waveform DC level only max is used and min must be less than or equal to max. The frequency must be in Hz.


The documentation for this class was generated from the following files:
Generated at Tue Aug 7 22:18:06 2001 for Open Source Audio Library Project by doxygen1.2.6 written by Dimitri van Heesch, © 1997-2001