0
0

Hello everyone!I use Fmod in the Ogre. And I want to judge the sound file is finished playing! So i use the function named ‘isPlaying’ in the Fmod Library.But the function always return ‘FMOD_ERR_INVALID_HANDLE’.Please help me! Thank you! I have the following code in step:
[code:2rouy3wx]int channelIndexTemp;
bool isPlaying;
FMOD_RESULT result;
FMOD::Channel *channel;
if (Channelndex)
channelIndexTemp = *Channelndex;
float tempTime = GetSoundLength(channelIndexTemp);
result = system->getChannel(channelIndexTemp, &channel);
if (result == FMOD_OK)
result = channel->isPlaying(&isPlaying);[/code:2rouy3wx]
The value of ‘isPlaying’ is always ‘false’.

  • You must to post comments
0
0

Hi anthony,

I don’t have experience with Ogre, but I believe you’ll have to check if the sound is playing every update call.

  • You must to post comments
0
0

Hi Anthony,

I have moved your question out of the Unity integration subforum, into the main Studio forum.

In response to your question, it is common for isPlaying to return INVALID_HANDLE, once the channel stops playing it will go invalid quite shortly after. Just treat that error as the same as isPlaying returning false.

-Pete

  • You must to post comments
Showing 2 results
Your Answer

Please first to submit.