diff --git a/stepmania/src/PrefsManager.cpp b/stepmania/src/PrefsManager.cpp index 50766a9bea..f382f8bf8e 100644 --- a/stepmania/src/PrefsManager.cpp +++ b/stepmania/src/PrefsManager.cpp @@ -18,7 +18,6 @@ PrefsManager* PREFSMAN = NULL; // global and accessable from anywhere in our program -const float DEFAULT_SOUND_VOLUME = 1.00f; const CString DEFAULT_LIGHTS_DRIVER = "Null"; // @@ -343,7 +342,7 @@ PrefsManager::PrefsManager() : m_sVideoRenderers ( "VideoRenderers", "" ), // StepMania.cpp sets these on first run: m_bSmoothLines ( "SmoothLines", false ), m_sSoundDrivers ( "SoundDrivers", "" ), - m_fSoundVolume ( "SoundVolume", -1 ), // default + m_fSoundVolume ( "SoundVolume", 1.0f ), m_iSoundWriteAhead ( "SoundWriteAhead", 0 ), m_iSoundDevice ( "SoundDevice", "" ), m_SoundResampleQuality ( "SoundResampleQuality", RageSoundReader_Resample::RESAMP_NORMAL ), @@ -465,10 +464,8 @@ CString PrefsManager::GetSoundDrivers() float PrefsManager::GetSoundVolume() { - if ( m_fSoundVolume==-1 ) - return DEFAULT_SOUND_VOLUME; - else - return clamp(m_fSoundVolume.Get(),0.0f,1.0f); + // return a resonable volume to that users of this method don't have to handle invalid values + return clamp(m_fSoundVolume.Get(),0.0f,1.0f); } CString PrefsManager::GetInputDrivers() { diff --git a/stepmania/src/PrefsManager.h b/stepmania/src/PrefsManager.h index 9f2610aedf..a6e21e6a76 100644 --- a/stepmania/src/PrefsManager.h +++ b/stepmania/src/PrefsManager.h @@ -230,7 +230,7 @@ public: private: Preference m_sSoundDrivers; // "" == default public: - Preference m_fSoundVolume; // -1 == default + Preference m_fSoundVolume; Preference m_iSoundWriteAhead; Preference m_iSoundDevice; Preference m_SoundResampleQuality;