0
0

I’m going to continue to edit the post as I figure out whats wrong…

[edit]

Even when no sound is playing, FMOD_Channel_IsPlaying will return 1, which I’m guessing is true for FMOD_BOOL.

[code:15jqhw0l]
// Returns true if the voice is playing, returns false otherwise.
bool Playing( FMOD_CHANNEL* Voice )
{
FMOD_RESULT result;
FMOD_BOOL playing;

        result = FMOD_Channel_IsPlaying( Voice, &playing );         
        return bool(playing);
    }

[/code:15jqhw0l]

Is called like so:

[code:15jqhw0l]
if(!Playing(p_sv->Voice))
{
printf("p_sv is playing\n");
return false;
}
else
printf("p_sv is NOT playing\n");
[/code:15jqhw0l]

Using !Playing(p_sv->Voice) seems to be correct, as the sounds play a few times, but after those few times the FMOD_Channel_IsPlaying always fills playing with 1.

[/edit]

  • You must to post comments
0
0

I believe it was mostly due to using FMOD_CHANNEL_REUSE and FMOD_CHANNEL_FREE inappropriatly.

I now use FREE to initially play the sound effect, and then REUSE on any subsequent calls to PlaySFX.

Also I’ve reworked how I use FMOD_IsChannelPlaying, and it is now returning valid values back to me.

  • You must to post comments
Showing 1 result
Your Answer

Please first to submit.