开发者

Iphone cocas2d game : Playing sound

开发者 https://www.devze.com 2023-02-24 12:17 出处:网络
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 typ

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 sharedE开发者_StackOverflowngine] 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


[[SimpleAudioEngine sharedEngine] stopBackgroundMusic];

After Stopping background music.you can use playEffect.

 [[SimpleAudioEngine sharedEngine] playEffect:@"blast.wav"];
0

精彩评论

暂无评论...
验证码 换一张
取 消