Playing audio in cocos2d v3

4.6k Views Asked by At

I am trying to get background music playing and looping as well as one-shot sounds every now and again, e.g. level up etc.

I have found many tutorials on this that are using SimpleAudioEngine, but when I import SimpleAudioEngine.h the compiler is stating "SimpleAudioEngine.h file not found"

I am using SpriteBuilder and cocos2d v3.

Does anyone know where I can get this class from?

Thanks

1

There are 1 best solutions below

8
Abhineet Prasad On BEST ANSWER
 [[OALSimpleAudio sharedInstance] playBg:@"bakground.caf" loop:YES];