0

i am also facing same problem .. by doing this background music stop but i my case i want to play another sound for a while .. like a blast sound and then again play old sound .. but whn i do this type of code [[SimpleAudioEngine sharedEngine] stopBackgroundMusic]; [[SimpleAudioEngine sharedEngine] playBackgroundMusic:@"blast.wav" loop:TRUE]; [[SimpleAudioEngine sharedEngine] stopBackgroundMusic]; [[SimpleAudioEngine sharedEngine] playBackgroundMusic:@"background.wav" loop:TRUE]; i blast sound not play ...background sound just stop for a sec .. and thn playing again .. need help

Guru
  • 21,652
  • 10
  • 63
  • 102
Haseeb Warraich
  • 141
  • 1
  • 2
  • 12

1 Answers1

1
[[SimpleAudioEngine sharedEngine] stopBackgroundMusic];

After Stopping background music.you can use playEffect.

 [[SimpleAudioEngine sharedEngine] playEffect:@"blast.wav"];
Guru
  • 21,652
  • 10
  • 63
  • 102
Anish
  • 2,889
  • 1
  • 20
  • 45