void RudeSound::PlaySong(eSoundBGM num) { RUDE_REPORT("RudeSound::PlaySong %d\n", num); if(num == m_curBGM) { RUDE_REPORT("BGM already playing\n"); return; } if(m_curBGM != kBGMNone) { RUDE_REPORT("Unloading previous BGM\n"); #if defined(RUDE_IPHONE) || defined(RUDE_MACOS) SoundEngine_UnloadBackgroundMusicTrack(); #endif } if(m_musicOn) { m_curBGM = num; char buffer[512]; RudeFileGetFile(kSoundBGMs[m_curBGM], buffer, 512); #if defined(RUDE_IPHONE) || defined(RUDE_MACOS) SoundEngine_LoadBackgroundMusicTrack(buffer, false, false); SoundEngine_StartBackgroundMusic(); #endif } }
void ofxOpenALSoundPlayer::play() { if ( !bLoadedOk ) return; if(iAmAnMp3) SoundEngine_StartBackgroundMusic(); else { if(myPrimedId==-1 || bMultiPlay) prime(); SoundEngine_StartEffect(myPrimedId); } stopped = false; }
void ofxOpenALSoundPlayer::startBackgroundMusic() { SoundEngine_StartBackgroundMusic(); }