0
0

Our game has huge playing areas with lots of sound sources scattered out over thousands of meters. We’re using 32 sound channels, and when we have hundreds of sound sources out there, performance drops dramatically. I don’t blame fmod for this – it’s just that there are too many sound sources mixing at once I guess – but I need to know how to manage this issue.

Do I need to manually stop playing sounds that are very, very far away from the camera myself? Or does fmod already efficiently “cull” sound sources that are so far away that they won’t be heard?

For example, before I call Play(), should I first do my own check and say something like (if distanceToSound < 5000.0f) Play(); instead of just calling Play()? Or is fmod already going to say to itself, “That sound source is beyond audible range so I won’t waste any CPU time mixing it?”

Thanks for your advice, and thanks for fmod! It’s a great library!

  • You must to post comments
0
0

[quote:2txlhric]Or did you not mention that you maybe changed it from 32 to a bigger number?[/quote:2txlhric]
Jeeze – I guess you get a lot of questions from incompetent people so you assume the worst about people in general these days. 😀

No, it is definitely still 32 channels. When I said I was playing hundreds of sounds I mean that I am calling [code:2txlhric]FSOUND_PlaySoundEx[/code:2txlhric] for hundreds of different samples. I am also calling [code:2txlhric]FSOUND_SetPriority[/code:2txlhric] as each of these is assigned to a channel, so I was hoping that fmod was going to magically mix the best 32 sounds and ignore the rest. Am I wrong about this? It has always confused me that you assign priorities to channels instead of assigning them to samples. It seems like if a low priority sounds tried to play, and all channels were already playing higher priority sounds, then the new low priority sample shouldn’t be given any channel at all. But it is given a channel before I even have a chance to set its priority?

Is this perhaps where my performance woes come from – incorrect use of priorities?

Thanks for your help, Brett.

  • You must to post comments
Showing 1 result
Your Answer

Please first to submit.