Fmod isPlaying Questions!!!Please Help!!!
Posted: Fri May 23, 2014 4:00 am
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:
The 'isPlaying' value is always 'false'.
Code: Select all
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);