Cocos2d 2.0 and below works with this:
[[SimpleAudioEngine sharedEngine] playBackgroundMusic:@"SaveInMe.mp3"];
Which class plays music in Cocos2d 3.0 ?
Cocos2d 2.0 and below works with this:
[[SimpleAudioEngine sharedEngine] playBackgroundMusic:@"SaveInMe.mp3"];
Which class plays music in Cocos2d 3.0 ?
SimpleAudioEngine is not available in Cocos2d v3.0, use OALSimpleAudio
[[OALSimpleAudio sharedInstance] playEffect:@"Effect.caf"];
[[OALSimpleAudio sharedInstance] playBg:@"Game_BG_Music.mp3" loop:true];
Imprt the audio engins and #import "SimpleAudioEngine.h" then play audio
[[SimpleAudioEngine sharedEngine] playBackgroundMusic:@"themesound.wav"];
//for stop audio
[[SimpleAudioEngine sharedEngine] stopBackgroundMusic];