From 18320299f08e309836ee3c247984d18d29b4b76f Mon Sep 17 00:00:00 2001 From: Glenn Maynard Date: Thu, 2 Jan 2003 07:39:25 +0000 Subject: [PATCH] use PlayMusic --- stepmania/src/MusicBannerWheel.cpp | 6 +++--- stepmania/src/ScreenAppearanceOptions.cpp | 2 +- stepmania/src/ScreenEdit.cpp | 5 +++-- stepmania/src/ScreenSelectMusic.cpp | 9 +++------ 4 files changed, 10 insertions(+), 12 deletions(-) diff --git a/stepmania/src/MusicBannerWheel.cpp b/stepmania/src/MusicBannerWheel.cpp index af2057b9c5..6f6741b743 100644 --- a/stepmania/src/MusicBannerWheel.cpp +++ b/stepmania/src/MusicBannerWheel.cpp @@ -197,9 +197,9 @@ void MusicBannerWheel::PlayMusicSample() Song* pSong = GetSelectedSong(); if( pSong && pSong->HasMusic() ) { - MUSIC->Stop(); - MUSIC->Load( pSong->GetMusicPath() ); - MUSIC->Play( true, pSong->m_fMusicSampleStartSeconds, pSong->m_fMusicSampleLengthSeconds ); + SOUNDMAN->PlayMusic(pSong->GetMusicPath(), true, + pSong->m_fMusicSampleStartSeconds, + pSong->m_fMusicSampleLengthSeconds); } } diff --git a/stepmania/src/ScreenAppearanceOptions.cpp b/stepmania/src/ScreenAppearanceOptions.cpp index cbf2d53a21..5829bfb1c7 100644 --- a/stepmania/src/ScreenAppearanceOptions.cpp +++ b/stepmania/src/ScreenAppearanceOptions.cpp @@ -73,7 +73,7 @@ ScreenAppearanceOptions::ScreenAppearanceOptions() : m_Menu.SetTimer( 99 ); m_Menu.StopTimer(); - MUSIC->LoadAndPlayIfNotAlready( THEME->GetPathTo("Sounds","appearance options music") ); + SOUNDMAN->PlayMusic( THEME->GetPathTo("Sounds","appearance options music") ); } void ScreenAppearanceOptions::ImportOptions() diff --git a/stepmania/src/ScreenEdit.cpp b/stepmania/src/ScreenEdit.cpp index 2c3191d344..5e45a2d01d 100644 --- a/stepmania/src/ScreenEdit.cpp +++ b/stepmania/src/ScreenEdit.cpp @@ -1161,8 +1161,9 @@ void ScreenEdit::InputEdit( const DeviceInput& DeviceI, const InputEventType typ } break; case SDLK_m: - MUSIC->Load( m_pSong->GetMusicPath() ); - MUSIC->Play( false, m_pSong->m_fMusicSampleStartSeconds, m_pSong->m_fMusicSampleLengthSeconds ); + SOUNDMAN->PlayMusic( m_pSong->GetMusicPath(), false, + m_pSong->m_fMusicSampleStartSeconds, + m_pSong->m_fMusicSampleLengthSeconds ); break; case SDLK_LEFTBRACKET: case SDLK_RIGHTBRACKET: diff --git a/stepmania/src/ScreenSelectMusic.cpp b/stepmania/src/ScreenSelectMusic.cpp index a5f4b7728c..9c6ee609af 100644 --- a/stepmania/src/ScreenSelectMusic.cpp +++ b/stepmania/src/ScreenSelectMusic.cpp @@ -710,11 +710,8 @@ void ScreenSelectMusic::AfterMusicChange() for( pn = 0; pn < NUM_PLAYERS; ++pn) m_arrayNotes[pn].clear(); - int banners_when_fast = 0; - /* If we're rouletting, and we're moving fast, don't touch the banner. */ bool no_banner_change = false; - LOG->Trace("moving %i, roulette %i", m_MusicWheel.IsMoving(), m_MusicWheel.IsRouletting()); if(m_MusicWheel.IsMoving()) { /* We're moving fast. Don't change banners if we're rouletting, or if @@ -805,9 +802,9 @@ void ScreenSelectMusic::PlayMusicSample() Song* pSong = m_MusicWheel.GetSelectedSong(); if( pSong && pSong->HasMusic() ) { - MUSIC->Stop(); - MUSIC->Load( pSong->GetMusicPath() ); - MUSIC->Play( true, pSong->m_fMusicSampleStartSeconds, pSong->m_fMusicSampleLengthSeconds ); + SOUNDMAN->PlayMusic(pSong->GetMusicPath(), true, + pSong->m_fMusicSampleStartSeconds, + pSong->m_fMusicSampleLengthSeconds); } // else // MUSIC->LoadAndPlayIfNotAlready( THEME->GetPathTo("Sounds","select music music") );