0
0

Hello again,

I want to be able to reserve channels while my game is already running and some channels are already playing sounds. Now I run over the available software channels (for(int channel=0; channel<max_sw_channels; channel++), taken into account the maximum number of software channels as set with FMOD_Init(.., max_sw_channels,..) ) and then check if that software channel is currently playing (FSOUND_IsPlaying(channel)). When it is not currently playing, I reserve that channel (FSOUND_SetReserved(channel, true)). This goes well, unless all the channels are playing, because then I cannot reserve a channel. My question now is : [b:o5aqfvgi]Can I reserve a channel that is currently playing ? And what will happen if I do that ?[/b:o5aqfvgi]

I’ve also another related question regarding reservation of hardware channels. As I read in the documentation the numbering of the hardware channels starts after the software channels. Suppose I have 16 software (0-15) channels, the first hardware channel starts at index 16. But what about the 2D and 3D hardware channels ? When I run this function I get num2d is 31, num3d is 31, total is 62[code:o5aqfvgi]FSOUND_GetNumHWChannels(int *num2d,int *num3d,int *total);[/code:o5aqfvgi]So if I want to reserve a 3D hardware channel, I have to start at index 16+31 = 47 ? Or am I completely wrong here ?

Please help, thank you,
Caroline

  • You must to post comments
0
0

[quote="brett":2mqwos94]In the win32 case it is hw3d channels first followed by hw2d. You’re not supposed to worry or know about that, you should reserve channel handles that come back from playsound, you shouldnt be using raw channel ids.[/quote:2mqwos94]First of all, thank you for your answer, brett. I understand what you are saying, but here ‘s my problem :

The other developpers of the game want to be able to reserve a channel at the beginning of the game (or level) for the the duration of that game (or level) to play very crucial sound on that channel. So I have to reserve a channel without having to call playsound to get a channel handle. So, can I use raw channel ids for this ? Or can’t I rely on the order of hw versus sw channels etc. ?

Merry Christmas to everyone,

Caroline

  • You must to post comments
Showing 1 result
Your Answer

Please first to submit.