4

I am initializing FMOD with 32 channels and playing short samples (1 second) with the following code:

result = system->init(32, FMOD_INIT_NORMAL , NULL);
// here I load the sounds //
result = system->playSound(FMOD_CHANNEL_FREE, grid[_sound], false, &channel);

It works as intended, overlapping sounds, but now I realized that when I have played 32 samples (not at the same time), only one sound can be played at a time. It looks like FMOD_CHANNEL_FREE behaves like an incremental counter and when it hits 32, it stays there, stopping the last sound while it's still playing to play the new one.

Do I have to remove sounds when they have stopped playing? How? I feel like I am missing something basic

Thanks!

Marc

Marc
  • 1,029
  • 1
  • 10
  • 27

3 Answers3

4

I had the same problem. Turns out that I forgot to call system->update() every frame. Once I put that in, it worked fine.

Tom Dalling
  • 23,305
  • 6
  • 62
  • 80
0

can u verify that u initializing fmod system with more than one max channels? try to use following code for init your fmod system :

    System->init(32, FMOD_INIT_NORMAL, 0);

or you forgot to call

    System->Update();
Quest
  • 2,764
  • 1
  • 22
  • 44
0

It sounds like the channels are still playing (but silent), can you check Channel::isPlaying and see if they are still going?

Perhaps post some more of your code if that doesn't help.

Mathew Block
  • 1,613
  • 1
  • 10
  • 9