audiere::SoundEffect Class Reference

#include <audiere.h>

Inheritance diagram for audiere::SoundEffect:

Inheritance graph
[legend]
Collaboration diagram for audiere::SoundEffect:

Collaboration graph
[legend]
List of all members.

Public Member Functions

virtual void play ()=0
virtual void stop ()=0
virtual void setVolume (float volume)=0
virtual float getVolume ()=0
virtual void setPan (float pan)=0
virtual float getPan ()=0
virtual void setPitchShift (float shift)=0
virtual float getPitchShift ()=0

Protected Member Functions

 ~SoundEffect ()

Detailed Description

SoundEffect is a convenience class which provides a simple mechanism for basic sound playback. There are two types of sound effects: SINGLE and MULTIPLE. SINGLE sound effects only allow the sound to be played once at a time. MULTIPLE sound effects always open a new stream to the audio device for each time it is played (cleaning up or reusing old streams if possible).

Definition at line 839 of file audiere.h.


Constructor & Destructor Documentation

audiere::SoundEffect::~SoundEffect  )  [inline, protected]
 

Definition at line 841 of file audiere.h.


Member Function Documentation

virtual float audiere::SoundEffect::getPan  )  [pure virtual]
 

Get current pan.

virtual float audiere::SoundEffect::getPitchShift  )  [pure virtual]
 

Get current pitch shift. Defaults to 1.0.

virtual float audiere::SoundEffect::getVolume  )  [pure virtual]
 

Gets the current volume.

Returns:
current volume of the output stream

virtual void audiere::SoundEffect::play  )  [pure virtual]
 

Trigger playback of the sound. If the SoundEffect is of type SINGLE, this plays the sound if it isn't playing yet, and starts it again if it is. If the SoundEffect is of type MULTIPLE, play() simply starts playing the sound again.

virtual void audiere::SoundEffect::setPan float  pan  )  [pure virtual]
 

Set current pan.

Parameters:
pan -1.0 = left, 0.0 = center (default), 1.0 = right

virtual void audiere::SoundEffect::setPitchShift float  shift  )  [pure virtual]
 

Set current pitch shift.

Parameters:
shift can range from 0.5 to 2.0. default is 1.0.

virtual void audiere::SoundEffect::setVolume float  volume  )  [pure virtual]
 

Sets the sound's volume.

Parameters:
volume 0.0 = silence, 1.0 = maximum volume (default)

virtual void audiere::SoundEffect::stop  )  [pure virtual]
 

If the sound is of type SINGLE, stop the sound. If it is of type MULTIPLE, stop all playing instances of the sound.


The documentation for this class was generated from the following file:
Generated on Mon Feb 13 23:07:25 2006 for audiere by  doxygen 1.4.6