Crash playing MP3 for background music
by Joe Williams · in iTorque 2D · 12/12/2010 (5:22 am) · 3 replies
I'm playing a small MP3 as my background music. It works fine in the simulator, but it's causing a crash on the device. The error in the debugger is:
Program received signal: “EXC_BAD_ACCESS”.
warning: Unable to read symbols for /Developer/Platforms/iPhoneOS.platform/DeviceSupport/4.2.1 (8C148)/Symbols/Developer/usr/lib/libXcodeDebuggerSupport.dylib (file not found).
And Xcode then highlights the middle line here:
result = AudioFileReadPackets(CurFileInfo->mAFID, false, &numBytes, THIS->mPacketDescs, THIS->mCurrentPacket, &nPackets,
inCompleteAQBuffer->mAudioData);
AssertNoError("Error reading file data", end);
Anyone have any ideas as to why this would happen?
The code that is playing the file is this:
%filename = "~/data/audio/STTMain.mp3";
$musicStreamHandle = startiPhoneAudioStream(%filename,true);
Program received signal: “EXC_BAD_ACCESS”.
warning: Unable to read symbols for /Developer/Platforms/iPhoneOS.platform/DeviceSupport/4.2.1 (8C148)/Symbols/Developer/usr/lib/libXcodeDebuggerSupport.dylib (file not found).
And Xcode then highlights the middle line here:
result = AudioFileReadPackets(CurFileInfo->mAFID, false, &numBytes, THIS->mPacketDescs, THIS->mCurrentPacket, &nPackets,
inCompleteAQBuffer->mAudioData);
AssertNoError("Error reading file data", end);
Anyone have any ideas as to why this would happen?
The code that is playing the file is this:
%filename = "~/data/audio/STTMain.mp3";
$musicStreamHandle = startiPhoneAudioStream(%filename,true);
About the author
Recent Threads
#2
12/12/2010 (11:02 pm)
Is that possibly the issue: the 4.2 SDK? My main music track isn't very long, I can just switch it to a wav and play it in engine if rolling back to 4.1 is the only way to fix this.
#3
12/12/2010 (11:23 pm)
Could very well be due to something deprecated or a change to the way the sound engine works. I'm almost up and running, might have to tackle this tomorrow.
Employee Michael Perry
ZombieShortbus