Suppose I play a sample, i.e. sample_01 with a low priority, i.e. 0, and FMOD returns a channel handle, eg. ch01 is 4001. [code:2wl942cf]int ch01 = FSOUND_PlaySoundEx(FSOUND_FREE, sample_01, NULL, true );
FSOUND_SetPaused(ch01, false);[/code:2wl942cf]Then later on I play other samples, e.g. sample02, with a higher priority, i.e. 255[code:2wl942cf]int ch02 = FSOUND_PlaySoundEx(FSOUND_FREE, sample_02, NULL, true );
FSOUNDSetPaused(ch02, false);[/code:2wl942cf]Suppose all channels are in use and FMOD decides to discard sample01 (low priority) and use that channel to play sample02 (high priority), does ch02 get the same value as ch01, i.e. 4001 ? What will I get (TRUE or FALSE) if I then call [code:2wl942cf]FSOUND_IsPlaying(ch01);[/code:2wl942cf]I read the Remarks of PlaySoundEx, but still I am not sure what would happen in this particular case. 😕 And this is crucial for my application.
- Caroline asked 12 years ago
[quote="brett":yktwc5hk]so even if the same physical channel is actually playing, isplaying wont return true if the channel handle is old.[/quote:yktwc5hk]Oh, Great, this is wonderfull. I love FMOD 😀
[quote="brett":yktwc5hk]If you somehow thing your second playsound will be at 255 because you called FSOUND_SetPriority(ch02, 255) then you would be wrong, it will use whatever priority the sample was set to.[/quote:yktwc5hk] Oh, I did think that my second sample would be at 255. But I checked the documentation again and I have to use FSOUND_Sample_SetDefaultEx to set the priority of the sample before it is played, don’t I ?
Thank you so much, Brett.
Kind Regards, Caroline
Please login first to submit.