diff --git a/stepmania/src/ScreenManager.cpp b/stepmania/src/ScreenManager.cpp index aa7eec3e93..b1ff9a027c 100644 --- a/stepmania/src/ScreenManager.cpp +++ b/stepmania/src/ScreenManager.cpp @@ -719,3 +719,31 @@ void ScreenManager::ReloadCreditsText() m_SystemLayer->ReloadCreditsText(); } +/* Always play these sounds, even if we're in a silent attract loop. */ +void ScreenManager::PlayStartSound() +{ + RageSoundParams p; + p.m_Volume = PREFSMAN->m_fSoundVolume; + m_soundStart.Play( &p ); +} + +void ScreenManager::PlayCoinSound() +{ + RageSoundParams p; + p.m_Volume = PREFSMAN->m_fSoundVolume; + m_soundCoin.Play( &p ); +} + +void ScreenManager::PlayInvalidSound() +{ + RageSoundParams p; + p.m_Volume = PREFSMAN->m_fSoundVolume; + m_soundInvalid.Play( &p ); +} + +void ScreenManager::PlayScreenshotSound() +{ + RageSoundParams p; + p.m_Volume = PREFSMAN->m_fSoundVolume; + m_soundScreenshot.Play( &p ); +} diff --git a/stepmania/src/ScreenManager.h b/stepmania/src/ScreenManager.h index aab8854bd9..1a61902f05 100644 --- a/stepmania/src/ScreenManager.h +++ b/stepmania/src/ScreenManager.h @@ -76,10 +76,10 @@ private: // Keep these sounds always loaded, because they could be // played at any time. We want to eliminate SOUND->PlayOnce public: - void PlayStartSound() { m_soundStart.Play(); } - void PlayCoinSound() { m_soundCoin.Play(); } - void PlayInvalidSound() { m_soundInvalid.Play(); } - void PlayScreenshotSound() { m_soundScreenshot.Play(); } + void PlayStartSound(); + void PlayCoinSound(); + void PlayInvalidSound(); + void PlayScreenshotSound(); private: RageSound m_soundStart; RageSound m_soundCoin;