remove default volume sentinel value and just use 1.0
This commit is contained in:
@@ -18,7 +18,6 @@
|
|||||||
|
|
||||||
PrefsManager* PREFSMAN = NULL; // global and accessable from anywhere in our program
|
PrefsManager* PREFSMAN = NULL; // global and accessable from anywhere in our program
|
||||||
|
|
||||||
const float DEFAULT_SOUND_VOLUME = 1.00f;
|
|
||||||
const CString DEFAULT_LIGHTS_DRIVER = "Null";
|
const CString DEFAULT_LIGHTS_DRIVER = "Null";
|
||||||
|
|
||||||
//
|
//
|
||||||
@@ -343,7 +342,7 @@ PrefsManager::PrefsManager() :
|
|||||||
m_sVideoRenderers ( "VideoRenderers", "" ), // StepMania.cpp sets these on first run:
|
m_sVideoRenderers ( "VideoRenderers", "" ), // StepMania.cpp sets these on first run:
|
||||||
m_bSmoothLines ( "SmoothLines", false ),
|
m_bSmoothLines ( "SmoothLines", false ),
|
||||||
m_sSoundDrivers ( "SoundDrivers", "" ),
|
m_sSoundDrivers ( "SoundDrivers", "" ),
|
||||||
m_fSoundVolume ( "SoundVolume", -1 ), // default
|
m_fSoundVolume ( "SoundVolume", 1.0f ),
|
||||||
m_iSoundWriteAhead ( "SoundWriteAhead", 0 ),
|
m_iSoundWriteAhead ( "SoundWriteAhead", 0 ),
|
||||||
m_iSoundDevice ( "SoundDevice", "" ),
|
m_iSoundDevice ( "SoundDevice", "" ),
|
||||||
m_SoundResampleQuality ( "SoundResampleQuality", RageSoundReader_Resample::RESAMP_NORMAL ),
|
m_SoundResampleQuality ( "SoundResampleQuality", RageSoundReader_Resample::RESAMP_NORMAL ),
|
||||||
@@ -465,10 +464,8 @@ CString PrefsManager::GetSoundDrivers()
|
|||||||
|
|
||||||
float PrefsManager::GetSoundVolume()
|
float PrefsManager::GetSoundVolume()
|
||||||
{
|
{
|
||||||
if ( m_fSoundVolume==-1 )
|
// return a resonable volume to that users of this method don't have to handle invalid values
|
||||||
return DEFAULT_SOUND_VOLUME;
|
return clamp(m_fSoundVolume.Get(),0.0f,1.0f);
|
||||||
else
|
|
||||||
return clamp(m_fSoundVolume.Get(),0.0f,1.0f);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
CString PrefsManager::GetInputDrivers() {
|
CString PrefsManager::GetInputDrivers() {
|
||||||
|
|||||||
@@ -230,7 +230,7 @@ public:
|
|||||||
private:
|
private:
|
||||||
Preference<CString> m_sSoundDrivers; // "" == default
|
Preference<CString> m_sSoundDrivers; // "" == default
|
||||||
public:
|
public:
|
||||||
Preference<float> m_fSoundVolume; // -1 == default
|
Preference<float> m_fSoundVolume;
|
||||||
Preference<int> m_iSoundWriteAhead;
|
Preference<int> m_iSoundWriteAhead;
|
||||||
Preference<CString> m_iSoundDevice;
|
Preference<CString> m_iSoundDevice;
|
||||||
Preference<RageSoundReader_Resample::ResampleQuality> m_SoundResampleQuality;
|
Preference<RageSoundReader_Resample::ResampleQuality> m_SoundResampleQuality;
|
||||||
|
|||||||
Reference in New Issue
Block a user