0
0

Hi,

It seems that a channel ignores a samples priority level if the samples level is zero; instead the channel resets it’s own priority level to max (i.e 255).

If the samples priority level is greater than zero, the channel takes on the samples priority level, as expected.

I can explicitly set a channels priority level to zero using FSOUND_SetPriority(), but not indirectly by setting a samples priority to zero and then playing it via the channel.

Some code snippits:

case 1:
FSOUND_Sample_SetDefaults( snd, -1, -1, -1, 0 );
ch = FSOUND_PlaySound( 0, snd );
/* at this point FSOUND_GetPriority(ch) == 255. Shouldn’t it be zero? */

FSOUND_Sample_SetDefaults( snd, -1, -1, -1, 1 );
ch = FSOUND_PlaySound( 0, snd );
/* at this point FSOUND_GetPriority(ch) == 1. What I Expected. */

case 2:
FSOUND_Sample_SetDefaults( snd, -1, -1, -1, 0 );
ch = FSOUND_PlaySound( 0, snd );
FSOUND_SetPriority( ch, 127 );
/* at this point FSOUND_GetPriority(ch) == 127. What I Expected. */

FSOUND_Sample_SetDefaults( snd, -1, -1, -1, 0 );
ch = FSOUND_PlaySound( 0, snd );
/* at this point FSOUND_GetPriority(ch) == 255. Shouldn’t this be zero? */

FSOUND_Sample_SetDefaults( snd, -1, -1, -1, 1 );
ch = FSOUND_PlaySound( 0, snd );
/* at this point FSOUND_GetPriority(ch) == 1. What I Expected. */

case 3:
FSOUND_Sample_SetDefaults( snd, -1, -1, -1, 0 );
ch = FSOUND_PlaySound( 0, snd );
FSOUND_SetPriority( ch, 127 );
/* at this point FSOUND_GetPriority(ch) == 127. What I Expected. */

FSOUND_Sample_SetDefaults( snd, -1, -1, -1, 0 );
ch = FSOUND_PlaySound( 0, snd );
FSOUND_SetPriority( ch, 0 );
/* at this point FSOUND_GetPriority(ch) == 0. What I Expected. */

FSOUND_Sample_SetDefaults( snd, -1, -1, -1, 0 );
ch = FSOUND_PlaySound( 0, snd );
/* at this point FSOUND_GetPriority(ch) == 255. Shouldn’t this be zero?. */

The above snippits may be redundant, but I wanted to be thorough. :smile:

BTW, none of the above caused FMOD to indicate an error of any type (i.e. FSOUND_GetError() always returned FMOD_ERROR_NONE)

David

  • You must to post comments
0
0

Has this been investigated yet? I just ran over the same problem (samples with priority 0 being played although samples with priority 15 were still running).

  • You must to post comments
Showing 1 result
Your Answer

Please first to submit.