Why I play/preload soundEffect with error in cocos2dx (ios)?

384 Views Asked by At

Whether play or preload sound effect.

code here:

CocosDenshion::SimpleAudioEngine::sharedEngine()->playEffect("debug.mp3");

I will get this error: ExtAudioFileOpenURL

enter image description here

The sound file is exist in app. And file is right.

enter image description here

2

There are 2 best solutions below

1
On BEST ANSWER

Now I fix that. It cause by I add a "All C++ Exceptions".

enter image description here

2
On

Your solution is a a valid workaround, but you are not debugging the rest of exceptions. I'm doing this to get rid of this problem:

Add a symbolic exception with this settings:

symbol:

objc_exception_throw

condition:

(BOOL)(! (BOOL)[[(NSException
*)$eax className] hasPrefix:@"_CDOpen"])

Please refer to this answer for more information:

Ignore certain exceptions when using Xcode's All Exceptions breakpoint