audiere::SoundEffect Class Reference

#include <audiere.h>

List of all members.

Public Member Functions

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


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).


Member Function Documentation

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

Get current pan.

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

Get current pitch shift. Defaults to 1.0.

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

Gets the current volume.

Returns:
current volume of the output stream

virtual void ADR_CALL 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 ADR_CALL audiere::SoundEffect::setPan float  pan  )  [pure virtual]
 

Set current pan.

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

virtual void ADR_CALL 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 ADR_CALL audiere::SoundEffect::setVolume float  volume  )  [pure virtual]
 

Sets the sound's volume.

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

virtual void ADR_CALL 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 Tue Feb 14 13:48:45 2006 for Twgui by  doxygen 1.4.6-NO