I used below code to play sound in Cocos2d-Swift, its crashed.
OALSimpleAudio.sharedInstanceWithSources(32).playEffect("buttonUp_1.caf")
How to resolve crash in swift code(not ObjC) ?
Or
Is there any other way to play sound in cocos2d-swift using SimpleAudio engine ?
Crash LOG:
OAL Error: -[OALSimpleAudio initWithSources:]: : Could not create OpenAL device fatal error: unexpectedly found nil while unwrapping an Optional value
For me this worked: