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 Member Functions

 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.

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 Function Documentation

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 on Tue Jan 16 12:42:55 2007 for Open Source Audio Library Project by  doxygen 1.4.6