0
0

Hi All,

From the code examples I can see that it is possible to create a number
of sounds (sound1, sound2, sound3) and then in turn play them through
a single channel.

[code]{
result = system->playSound(FMOD_CHANNEL_FREE, sound1, false, &channel);
result = system->playSound(FMOD_CHANNEL_FREE, sound2, false, &channel);
result = system->playSound(FMOD_CHANNEL_FREE, sound3, false, &channel);
}[/code]

This works without any problem..

But what I need to know is, is it possible to do the opposite, by creating one sound and then playing it 3 times, through 3 different channels at the same time? :

[code]{
result = system->playSound(FMOD_CHANNEL_FREE, sound1, false, &channel1);
result = system->playSound(FMOD_CHANNEL_FREE, sound1, false, &channel2);
result = system->playSound(FMOD_CHANNEL_FREE, sound1, false, &channel3);
}[/code]

And for that matter, How can one be sure that a channel has stopped playing?

I could use something like
[code]channel->isPlaying(&isplaying)[/code]

but if channels are recycled, how can I be sure that the value in this variable isn’t being reused by another sound & by stopping it, I effectively stop the other sound?

Do you assign channel ID’s that don’t get reused for a really long time?

Thnx

ToneDef

  • You must to post comments
0
0

Yes you can do that, and even if the real channel is stolen/re-used, it wont matter, because fmod channel handles are reference counted. It looks like a pointer to you but it is not :)

  • You must to post comments
0
0

SWEEEEEET!!! 😀

ToneDef

  • You must to post comments
Showing 2 results
Your Answer

Please first to submit.