I call the following function once at the start of my game:
My music file is in
format. The game starts normally, and the music plays without problem. But the moment the track completes playing, cocos2d-x crashes.
The crash points to the following assembly line of code on Thread 26:
-> 0x4650909 <+0>: pushl %ebp
I don’t know how to debug this, because I can’t step through the code (since the crash happens when the track finishes playing). It seems like some kind of bug. Any ideas how to solve this ?
EDIT: If I don’t play any music, my game never crashes. The only line of code that is ever called (for music), is the above, and it is called only once.
EDIT: The caf file was created using the following command:
afconvert -f caff -d LEI16@22050 yourInput.mp3 yourOutput.caf