CASoundEffect Class Reference

A sound effect is a sample which can be played. More...

#include <casoundeffect.h>

List of all members.

Public Member Functions

 CASoundEffect (CL_SoundBuffer *sample, int maxPlays=1)
 Constructor.
 ~CASoundEffect ()
 Destructor.
void play (int num=1)
 Plays the sample if it isn't played already too often at once.
void setVolume (float v)
 Sets a new volume for all instances of this sample which are currently played.
float getVolume (int ind=0)
 Gets the volume of sample with index 'ind'.
void setFrequency (int f)
 Sets a new frequency for all instances of this sample which are currently played.
int getFrequency (int ind=0)
 Gets the frequency of sample with index 'ind'.

Static Public Member Functions

static void playBackgroundMelody ()
 Plays a background melody.


Detailed Description

A sound effect is a sample which can be played.

However, it's necessary to avoid playing the same sample too often at the same time.

Author:
Andrew Mustun


Constructor & Destructor Documentation

CASoundEffect::CASoundEffect ( CL_SoundBuffer *  sample,
int  maxPlays = 1 
)

Constructor.

Parameters:
resource The sample to play.
maxPlays Maximal number the sound can be played at once.


Member Function Documentation

void CASoundEffect::play ( int  num = 1  ) 

Plays the sample if it isn't played already too often at once.

Parameters:
num Play this sample 'num' times at once (makes it louder than 100%).
loop Loop the sample (default false)


The documentation for this class was generated from the following files:
Generated on Tue Nov 28 06:48:29 2006 by  doxygen 1.5.0