malloc: \*\*\* error for object 0x5a61f4: incorrect checksum for freed object - object was probably modified after being freed.
\*\*\* set a breakpoint in malloc\_error\_break to debug
After hunting around for an answer, it looked like I had to stop the sound before disposing it and setting it to nil by using audio.stop(). Now, with audio.stop(), the background music is getting snuffed out. Here’s some of the relevant code I’m working with if anyone can help me out:
The intro music ought to continue into the “levelselection” screen but stops. In the game, I have this same situation going on and when you move on to the next level, all the sound fx are gone.
Also, if you’re taking a looking at this and see that I’m using that ‘cleangroup’ incorrectly, please let me know. I’ll put up another post regarding that issue separately though.
I think audio.stop requires a channel id to stop, not a sound handle. Using 0 stops sound on all channels, and any other integer stops all sound on that channel. If you want to stop that particular tap sound, I think you could specify a channel when playing the sound and then using that channel when calling audio.stop, or even just pause the sound. [import]uid: 8673 topic_id: 8977 reply_id: 32772[/import]
I’m fighting this issue as well. Build 777. audio.dispose() is suppose to take the sound not the channel, right? [import]uid: 21331 topic_id: 8977 reply_id: 99364[/import]
vandono9: Your code has two different mistakes, each of which will break your audio.
The onComplete parameter for audio.play() must take a function. You are not passing it a function, but invoking a function which returns a numeric value which then gets assigned to onComplete.
Calling audio.dispose() right when you start playing the sound is wrong. The audio is still playing and you are trying to delete the memory. audio.dispose should probably be in your onComplete function, not immediately after audio.play().
TheRealTonyK: Yes, audio.dispose() works on handles, not channels. [import]uid: 7563 topic_id: 8977 reply_id: 99697[/import]