I’m having troubles understanding how FMOD Ex works.
I use FMOD for a small free C++ shoot’em up game. Their is several different sounds and many of those sounds are played simultaneously.
Here is my problem :
I have a ship that shot bullets. At each shoted bullet, a sound is played. The rate of fire of the ship is smaller that the duration of the sound, it means when i’m shooting, I have the same sound played multiple time, taking for exemple 1 to 10 channels for itself.
I want to use only one channel for this same sound. If the sound is already playing in one of the channels, it stop and replay from the begenning with the same channel.
I don’t understand how channels work, how to assignate a single channel for a single sound, etc.
I have tried to link a *channel to each *sound, and pass it in the parameters of le playSound() function, with the FMOD_CHANNEL_REUSE option but it didn’t work.
If anyone have an idea or can explain me how channels work so that I can correct my program…
- Spidyy asked 7 years ago
- You must login to post comments