#include <casoundeffect.h>
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. | |
However, it's necessary to avoid playing the same sample too often at the same time.
|
||||||||||||
|
Constructor.
|
|
|
Plays the sample if it isn't played already too often at once.
|
1.4.6