Esempio n. 1
0
void LoadingScene::preloadSounds()
{
    SimpleAudioEngine* audioEngine = SimpleAudioEngine::getInstance();
    audioEngine->stopBackgroundMusic();
    
    audioEngine->preloadEffect(EFFECT_SPACESHIP_CREATION);
    audioEngine->preloadEffect(EFFECT_BOOM_2);
    audioEngine->preloadEffect(EFFECT_BOOM);
    
    audioEngine->playBackgroundMusic(MUSIC_GAME);
    
}
Esempio n. 2
0
void MainScene::PlayStopBGM()
{
	SimpleAudioEngine* audio = SimpleAudioEngine::getInstance();
	if (audio->isBackgroundMusicPlaying())
	{
		audio->stopBackgroundMusic();
	}
	else
	{
		audio->playBackgroundMusic("musics/bgm.mp3");
	}
}
 static void stopBackground(bool bReleaseData)
 {
     SimpleAudioEngine *engine = SimpleAudioEngine::getInstance();
     engine->stopBackgroundMusic();
 }