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

aflibAudioStereoToMono Class Reference

Implements mixing a stereo or mono signal to a mono signal. More...

#include <aflibAudioStereoToMono.h>

Inheritance diagram for aflibAudioStereoToMono::

aflibAudioMixer aflibAudio aflibChain aflibMemCache List of all members.

Public Types

enum  aflib_mix_type { AFLIB_MIX_BOTH, AFLIB_MIX_CHAN1, AFLIB_MIX_CHAN2 }

Public Methods

 aflibAudioStereoToMono (aflibAudio &audio, aflibAudioStereoToMono::aflib_mix_type mix)
 Constructor for type of mixing operation. More...

 ~aflibAudioStereoToMono ()
 Destructor.

void setMix (aflibAudioStereoToMono::aflib_mix_type mix)
 Sets the type of mixing to perform. More...

void setInputConfig (const aflibConfig &cfg)
 Sets the input audio data configuration of an object. More...

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


Detailed Description

Implements mixing a stereo or mono signal to a mono signal.

This class implements converting a stereo or mono signal into a mono signal. It will output either a mix of both channels 1 and 2 inputs, channel 1, or channel 2. This class is a convience class derived from aflibAudioMixer since this is a commonly used operation. It takes either a mono or stereo signal so that the programmer does not need to worry about the source.


Member Enumeration Documentation

enum aflibAudioStereoToMono::aflib_mix_type
 

Enumeration values:
AFLIB_MIX_BOTH  
AFLIB_MIX_CHAN1  
AFLIB_MIX_CHAN2  


Constructor & Destructor Documentation

aflibAudioStereoToMono::aflibAudioStereoToMono ( aflibAudio & audio,
aflibAudioStereoToMono::aflib_mix_type mix )
 

Constructor for type of mixing operation.

This constructor allows one to mix any input to a mono signal. It will mix both channels (aflibAudioStereoToMono::AFLIB_MIX_BOTH), or channel 1 (aflibAudioStereoToMono::AFLIB_MIX_CHAN1), or channel 2 (aflibAudioStereoToMono::AFLIB_MIX_CHAN2).

aflibAudioStereoToMono::~aflibAudioStereoToMono ( )
 

Destructor.


Member Function Documentation

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

Returns the name of the derived class.

Reimplemented from aflibAudioMixer.

void aflibAudioStereoToMono::setInputConfig ( const aflibConfig & cfg ) [virtual]
 

Sets the input audio data configuration of an object.

This is a virtual function that derived classes can override if needed. It allows the caller to set the configuration of the audio data of an object. By default it saves the output audio configuration to be the same as the input data configuration that is passed in. This should be sufficient for most derived classes. For those classes that will have a change from the output to input config mapping then this function should be overriden and the output config processed and saved.

Reimplemented from aflibAudioMixer.

void aflibAudioStereoToMono::setMix ( aflibAudioStereoToMono::aflib_mix_type mix )
 

Sets the type of mixing to perform.

This function allows one to change the type of mixing performed. One can select both channels (aflibAudioStereoToMono::AFLIB_MIX_BOTH), or channel 1 (aflibAudioStereoToMono::AFLIB_MIX_CHAN1), or channel 2 (aflibAudioStereoToMono::AFLIB_MIX_CHAN2).


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