My apologies if this is in the wrong spot. But I’ve got a question about how to get a bunch of sound effect working in the ofxALSoundPlayer. Imagine sound for a bunch of effects. gunshot, hit, splat, etc. I just want to load them all in and call play on them when they are needed.
The ofxALSoundPlayer has a myId variable that is current for the last loaded sound. So would it work to loadSound a bunch of files, store the myId for each file and then add a method to ofxALSoundPlayer that did something like this
ofxALSoundPlayer player;
player.loadSound(something);
int num = player.myId;
player.loadSound(something else);
int num2 = player.myId;
player.play(num);
void ofxALSoundPlayer::play(int index)
{
SoundEngine_StartEffect(index);
stopped = false;
}
or am I going about this the wrong way?
MattD