0
0

When i call the function channel->setPaused, it gives me the error "IAn invalid object handle was used"
[code:3893s2v2]
void cSoundSystem::PlayList_Play(const char *File, int index)
{
result = channel->getPaused(&isplaying);
ERRCHECK(result);

result = channel->setPaused(!isplaying);
ERRCHECK(result);

result = channel->stop();
ERRCHECK(result);

result = FMOD::System_Create(&system);
ERRCHECK(result);

result = system->init(1, FMOD_INIT_NORMAL, 0);
ERRCHECK(result);

result = system->createStream(File, FMOD_HARDWARE | FMOD_LOOP_NORMAL | FMOD_2D, 0, &sound);
ERRCHECK(result);

result = system->playSound(FMOD_CHANNEL_FREE, sound, false, &channel);
ERRCHECK(result);

item_playing = index; 

system->update();

}

int cSoundSystem::PlayList_NextIfNotPlaying(const char *NextFile)
{
channel->isPlaying(&isplaying);
if (!isplaying)
PlayList_Play(NextFile, item_playing++);

return OK;

}
[/code:3893s2v2]

Always when i click an item in my ListView control from Win32 the PlayList_play function is called. Actually, every function that is called trough the channel object give me that errors.

Thank you;

  • You must to post comments
0
0

i dont understand, you’re calling channel commands on a channel handle that is uninitalized, and before you even call System::init? Hopefully you can spot the problem there.

  • You must to post comments
Showing 1 result
Your Answer

Please first to submit.