Added AllowLargeSounds setting to disable v2 sound-decode strictness

Conflicts:

	indra/newview/app_settings/settings.xml
This commit is contained in:
Shyotl
2011-06-09 16:53:46 -05:00
parent c57b97c8df
commit 25bb20046b
7 changed files with 29 additions and 1 deletions

View File

@@ -9,6 +9,17 @@
<string>settings_rlv.xml</string>
</array>
<key>AllowLargeSounds</key>
<map>
<key>Comment</key>
<string>Bypass stricter sound size/sample checks, which were introduced in SL2.x, for sound decoding.</string>
<key>Persist</key>
<integer>1</integer>
<key>Type</key>
<string>Boolean</string>
<key>Value</key>
<integer>0</integer>
</map>
<key>FloaterAvatarTextRect</key>
<map>
<key>Comment</key>

View File

@@ -687,6 +687,8 @@ bool idle_startup()
if(init)
{
gAudiop->setMuted(TRUE);
if(gSavedSettings.getBOOL("AllowLargeSounds"))
gAudiop->setAllowLargeSounds(true);
}
else
{

View File

@@ -583,6 +583,12 @@ static bool handlePhoenixNameSystemChanged(const LLSD& newvalue)
}
// [/Ansariel: Display name support]
static bool handleAllowLargeSounds(const LLSD& newvalue)
{
if(gAudiop)
gAudiop->setAllowLargeSounds(newvalue.asBoolean());
return true;
}
////////////////////////////////////////////////////////////////////////////
void settings_setup_listeners()
{
@@ -754,6 +760,8 @@ void settings_setup_listeners()
// [Ansariel: Display name support]
gSavedSettings.getControl("PhoenixNameSystem")->getSignal()->connect(boost::bind(&handlePhoenixNameSystemChanged, _1));
// [/Ansariel: Display name support]
gSavedSettings.getControl("AllowLargeSounds")->getSignal()->connect(boost::bind(&handleAllowLargeSounds, _1));
}
template <> eControlType get_control_type<U32>(const U32& in, LLSD& out)