I’m hoping this might be an easy problem to fix. I was testing my app and I got the FMOD Error (36) An invalid object handle was used. Here are the circumstances:
– I had an audio file opened with createSound.
– It is assigned to a channelGroup, which also has DSPs attached to it.
– I played the audio file.
– I then paused the file.
– I then set the iPod Touch down, still plugged in, with the screen saver turned off for about 20 minutes.
– After this I merely tried to change the volume of the channelGroup and I got the error.
I’ve seen posts where it says that if audio has stopped than the handle would become invalid? Is that the case here? How can I make it valid again?
If that is not the case here, I notice that in between the time I put it down and picked it back up again the iPod Touch was deauthorized and reauthorized to my wireless router.
– FMOD API version is 4.24.12.
– iPod Touch FW is 2.2. I haven’t tried to see if this will occur on a 3.0 firmware yet.
Any help here is greatly appreciated. Thanks.
- CuriousG asked 8 years ago
Anyone have any ideas on this?
I’ve also noted that if playing a sound using LOOP_OFF, that once the sound finishes playing, it invalidates the channel? How to I get it back without loading the sound or running it through the entire add channel loop again?
[quote:1xzr4fxz]I’ve also noted that if playing a sound using LOOP_OFF, that once the sound finishes playing, it invalidates the channel?[/quote:1xzr4fxz]
A channel handle is merely a representation of a currently playing sound. When the that sounds ends for whatever reason (completed playback/stopped/stolen) that makes the channel handle invalid. Those channel handles aren’t actual objects that require any allocation, they’re merely an interface for FMOD internal channels.
[quote:1xzr4fxz]How to I get it back without loading the sound or running it through the entire add channel loop again? [/quote:1xzr4fxz]
Getting an invalid handle error doesn’t mean the sound has been unloaded. You can just call playsound again using the same FMOD::Sound object you used the first time.
Hope this helps,
- Guest answered 8 years ago
This may require me to rework some code here, so I might just leave my app in LOOP_NORMAL for now. I’m going to presume that if I attempt a channel->setPaused, I will get the same error (36) which could then be used as a way to detect that the channel is no longer valid and that I need to do playSound again. Is that correct?
Please login first to submit.