0
0

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_SetPriority(ch01, 0);
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 );
FSOUNDSetPrioity(ch02, 255);
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.

Kind Regards,
Caroline

  • You must to post comments
0
0

[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

  • You must to post comments
0
0

[quote="brett":2hcezgbc]Yes using FSOUND_Sample_SetDefaults would work[/quote:2hcezgbc]Thanks again, Brett, because if it weren’t for you, I would never have seen that (crucial) mistake !

  • You must to post comments
Showing 2 results
Your Answer

Please first to submit.