Search code examples
iosaudiococos2d-iphonesimpleaudioengine

Playing audio in cocos2d v3


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


Solution

  •  [[OALSimpleAudio sharedInstance] playBg:@"bakground.caf" loop:YES];