aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
authorMcCabe Maxsted2010-08-03 11:48:16 -0700
committerMcCabe Maxsted2010-08-26 11:47:19 -0700
commita99d043e70c9beb19c3e86ba53d5af12abfea978 (patch)
tree3c0bd8b268d3df683fee75b0569894b26e34f076
parentSG1.4: fix ressource waste in non-wl sky rendering (diff)
downloadmeta-impy-a99d043e70c9beb19c3e86ba53d5af12abfea978.zip
meta-impy-a99d043e70c9beb19c3e86ba53d5af12abfea978.tar.gz
meta-impy-a99d043e70c9beb19c3e86ba53d5af12abfea978.tar.bz2
meta-impy-a99d043e70c9beb19c3e86ba53d5af12abfea978.tar.xz
Scratching an ooooold itch: added 'Gestures' slider and mute button to the audio controls
-rw-r--r--linden/indra/llaudio/audioengine.h3
-rw-r--r--linden/indra/newview/app_settings/settings.xml22
-rw-r--r--linden/indra/newview/llvieweraudio.cpp2
-rw-r--r--linden/indra/newview/llviewercontrol.cpp2
-rw-r--r--linden/indra/newview/llviewermessage.cpp23
-rw-r--r--linden/indra/newview/skins/default/xui/en-us/panel_audio.xml8
-rw-r--r--linden/indra/newview/skins/default/xui/en-us/panel_media_remote_expanded.xml4
-rw-r--r--linden/indra/newview/skins/default/xui/en-us/panel_preferences_audio.xml8
8 files changed, 61 insertions, 11 deletions
diff --git a/linden/indra/llaudio/audioengine.h b/linden/indra/llaudio/audioengine.h
index e990eb7..e46091c 100644
--- a/linden/indra/llaudio/audioengine.h
+++ b/linden/indra/llaudio/audioengine.h
@@ -93,7 +93,8 @@ public:
93 AUDIO_TYPE_SFX = 1, 93 AUDIO_TYPE_SFX = 1,
94 AUDIO_TYPE_UI = 2, 94 AUDIO_TYPE_UI = 2,
95 AUDIO_TYPE_AMBIENT = 3, 95 AUDIO_TYPE_AMBIENT = 3,
96 AUDIO_TYPE_COUNT = 4 // last 96 AUDIO_TYPE_GESTURE = 4,
97 AUDIO_TYPE_COUNT = 5 // last
97 }; 98 };
98 99
99 LLAudioEngine(); 100 LLAudioEngine();
diff --git a/linden/indra/newview/app_settings/settings.xml b/linden/indra/newview/app_settings/settings.xml
index 1951e07..a35cdbe 100644
--- a/linden/indra/newview/app_settings/settings.xml
+++ b/linden/indra/newview/app_settings/settings.xml
@@ -15,6 +15,17 @@
15 <key>Value</key> 15 <key>Value</key>
16 <integer>0</integer> 16 <integer>0</integer>
17 </map> 17 </map>
18 <key>AudioLevelGestures</key>
19 <map>
20 <key>Comment</key>
21 <string>Audio level of environment gestures</string>
22 <key>Persist</key>
23 <integer>1</integer>
24 <key>Type</key>
25 <string>F32</string>
26 <key>Value</key>
27 <real>0.5</real>
28 </map>
18 <key>AutoCloseOOC</key> 29 <key>AutoCloseOOC</key>
19 <map> 30 <map>
20 <key>Comment</key> 31 <key>Comment</key>
@@ -431,6 +442,17 @@
431 <key>Value</key> 442 <key>Value</key>
432 <integer>1</integer> 443 <integer>1</integer>
433 </map> 444 </map>
445 <key>MuteGestures</key>
446 <map>
447 <key>Comment</key>
448 <string>Gesture sound effects, play at 0 volume</string>
449 <key>Persist</key>
450 <integer>1</integer>
451 <key>Type</key>
452 <string>Boolean</string>
453 <key>Value</key>
454 <integer>0</integer>
455 </map>
434 <key>MuteWind</key> 456 <key>MuteWind</key>
435 <map> 457 <map>
436 <key>Comment</key> 458 <key>Comment</key>
diff --git a/linden/indra/newview/llvieweraudio.cpp b/linden/indra/newview/llvieweraudio.cpp
index 999e5dc..f043fb5 100644
--- a/linden/indra/newview/llvieweraudio.cpp
+++ b/linden/indra/newview/llvieweraudio.cpp
@@ -150,6 +150,8 @@ void audio_update_volume(bool force_update)
150 gSavedSettings.getBOOL("MuteUI") ? 0.f : gSavedSettings.getF32("AudioLevelUI")); 150 gSavedSettings.getBOOL("MuteUI") ? 0.f : gSavedSettings.getF32("AudioLevelUI"));
151 gAudiop->setSecondaryGain(LLAudioEngine::AUDIO_TYPE_AMBIENT, 151 gAudiop->setSecondaryGain(LLAudioEngine::AUDIO_TYPE_AMBIENT,
152 gSavedSettings.getBOOL("MuteAmbient") ? 0.f : gSavedSettings.getF32("AudioLevelAmbient")); 152 gSavedSettings.getBOOL("MuteAmbient") ? 0.f : gSavedSettings.getF32("AudioLevelAmbient"));
153 gAudiop->setSecondaryGain(LLAudioEngine::AUDIO_TYPE_GESTURE,
154 gSavedSettings.getBOOL("MuteGestures") ? 0.f : gSavedSettings.getF32("AudioLevelGestures"));
153 } 155 }
154 156
155 // Streaming Music 157 // Streaming Music
diff --git a/linden/indra/newview/llviewercontrol.cpp b/linden/indra/newview/llviewercontrol.cpp
index 1c42c91..e1507d4 100644
--- a/linden/indra/newview/llviewercontrol.cpp
+++ b/linden/indra/newview/llviewercontrol.cpp
@@ -582,6 +582,7 @@ void settings_setup_listeners()
582 gSavedSettings.getControl("AudioLevelMusic")->getSignal()->connect(boost::bind(&handleAudioVolumeChanged, _1)); 582 gSavedSettings.getControl("AudioLevelMusic")->getSignal()->connect(boost::bind(&handleAudioVolumeChanged, _1));
583 gSavedSettings.getControl("AudioLevelMedia")->getSignal()->connect(boost::bind(&handleAudioVolumeChanged, _1)); 583 gSavedSettings.getControl("AudioLevelMedia")->getSignal()->connect(boost::bind(&handleAudioVolumeChanged, _1));
584 gSavedSettings.getControl("AudioLevelVoice")->getSignal()->connect(boost::bind(&handleAudioVolumeChanged, _1)); 584 gSavedSettings.getControl("AudioLevelVoice")->getSignal()->connect(boost::bind(&handleAudioVolumeChanged, _1));
585 gSavedSettings.getControl("AudioLevelGestures")->getSignal()->connect(boost::bind(&handleAudioVolumeChanged, _1));
585 gSavedSettings.getControl("AudioLevelDistance")->getSignal()->connect(boost::bind(&handleAudioVolumeChanged, _1)); 586 gSavedSettings.getControl("AudioLevelDistance")->getSignal()->connect(boost::bind(&handleAudioVolumeChanged, _1));
586 gSavedSettings.getControl("AudioLevelDoppler")->getSignal()->connect(boost::bind(&handleAudioVolumeChanged, _1)); 587 gSavedSettings.getControl("AudioLevelDoppler")->getSignal()->connect(boost::bind(&handleAudioVolumeChanged, _1));
587 gSavedSettings.getControl("AudioLevelRolloff")->getSignal()->connect(boost::bind(&handleAudioVolumeChanged, _1)); 588 gSavedSettings.getControl("AudioLevelRolloff")->getSignal()->connect(boost::bind(&handleAudioVolumeChanged, _1));
@@ -593,6 +594,7 @@ void settings_setup_listeners()
593 gSavedSettings.getControl("MuteVoice")->getSignal()->connect(boost::bind(&handleAudioVolumeChanged, _1)); 594 gSavedSettings.getControl("MuteVoice")->getSignal()->connect(boost::bind(&handleAudioVolumeChanged, _1));
594 gSavedSettings.getControl("MuteAmbient")->getSignal()->connect(boost::bind(&handleAudioVolumeChanged, _1)); 595 gSavedSettings.getControl("MuteAmbient")->getSignal()->connect(boost::bind(&handleAudioVolumeChanged, _1));
595 gSavedSettings.getControl("MuteUI")->getSignal()->connect(boost::bind(&handleAudioVolumeChanged, _1)); 596 gSavedSettings.getControl("MuteUI")->getSignal()->connect(boost::bind(&handleAudioVolumeChanged, _1));
597 gSavedSettings.getControl("MuteGestures")->getSignal()->connect(boost::bind(&handleAudioVolumeChanged, _1));
596 gSavedSettings.getControl("RenderVBOEnable")->getSignal()->connect(boost::bind(&handleRenderUseVBOChanged, _1)); 598 gSavedSettings.getControl("RenderVBOEnable")->getSignal()->connect(boost::bind(&handleRenderUseVBOChanged, _1));
597 gSavedSettings.getControl("WLSkyDetail")->getSignal()->connect(boost::bind(&handleWLSkyDetailChanged, _1)); 599 gSavedSettings.getControl("WLSkyDetail")->getSignal()->connect(boost::bind(&handleWLSkyDetailChanged, _1));
598 gSavedSettings.getControl("RenderLightingDetail")->getSignal()->connect(boost::bind(&handleRenderLightingDetailChanged, _1)); 600 gSavedSettings.getControl("RenderLightingDetail")->getSignal()->connect(boost::bind(&handleRenderLightingDetailChanged, _1));
diff --git a/linden/indra/newview/llviewermessage.cpp b/linden/indra/newview/llviewermessage.cpp
index 701d30d..af4b8d8 100644
--- a/linden/indra/newview/llviewermessage.cpp
+++ b/linden/indra/newview/llviewermessage.cpp
@@ -4058,6 +4058,19 @@ void process_sound_trigger(LLMessageSystem *msg, void **)
4058 return; 4058 return;
4059 } 4059 }
4060 4060
4061 // Don't load sounds if we have gestures muted -- MC
4062 if ((owner_id != gAgent.getID()) && (object_id == owner_id))
4063 {
4064 if (gSavedSettings.getBOOL("MuteGestures"))
4065 {
4066 return;
4067 }
4068 else
4069 {
4070 gAudiop->triggerSound(sound_id, owner_id, gain, LLAudioEngine::AUDIO_TYPE_GESTURE, pos_global);
4071 }
4072 }
4073
4061 // Don't play sounds from a region with maturity above current agent maturity 4074 // Don't play sounds from a region with maturity above current agent maturity
4062 // Actually, let's -- MC 4075 // Actually, let's -- MC
4063 /*if( !gAgent.canAccessMaturityInRegion( region_handle ) ) 4076 /*if( !gAgent.canAccessMaturityInRegion( region_handle ) )
@@ -4099,11 +4112,12 @@ void process_preload_sound(LLMessageSystem *msg, void **user_data)
4099 // help us out. 4112 // help us out.
4100 4113
4101 // Don't play sounds from a region with maturity above current agent maturity 4114 // Don't play sounds from a region with maturity above current agent maturity
4102 LLVector3d pos_global = objectp->getPositionGlobal(); 4115 // Actually, let's -- MC
4116 /*LLVector3d pos_global = objectp->getPositionGlobal();
4103 if( !gAgent.canAccessMaturityAtGlobal( pos_global ) ) 4117 if( !gAgent.canAccessMaturityAtGlobal( pos_global ) )
4104 { 4118 {
4105 return; 4119 return;
4106 } 4120 }*/
4107 4121
4108 // Add audioData starts a transfer internally. 4122 // Add audioData starts a transfer internally.
4109 sourcep->addAudioData(datap, FALSE); 4123 sourcep->addAudioData(datap, FALSE);
@@ -4139,11 +4153,12 @@ void process_attached_sound(LLMessageSystem *msg, void **user_data)
4139 4153
4140 4154
4141 // Don't play sounds from a region with maturity above current agent maturity 4155 // Don't play sounds from a region with maturity above current agent maturity
4142 LLVector3d pos = objectp->getPositionGlobal(); 4156 // Actually, let's -- MC
4157 /*LLVector3d pos = objectp->getPositionGlobal();
4143 if( !gAgent.canAccessMaturityAtGlobal(pos) ) 4158 if( !gAgent.canAccessMaturityAtGlobal(pos) )
4144 { 4159 {
4145 return; 4160 return;
4146 } 4161 }*/
4147 4162
4148 objectp->setAttachedSound(sound_id, owner_id, gain, flags); 4163 objectp->setAttachedSound(sound_id, owner_id, gain, flags);
4149} 4164}
diff --git a/linden/indra/newview/skins/default/xui/en-us/panel_audio.xml b/linden/indra/newview/skins/default/xui/en-us/panel_audio.xml
index ee9695e..c6e75fc 100644
--- a/linden/indra/newview/skins/default/xui/en-us/panel_audio.xml
+++ b/linden/indra/newview/skins/default/xui/en-us/panel_audio.xml
@@ -49,6 +49,14 @@
49 image_selected="icn_speaker-muted_dark.tga" 49 image_selected="icn_speaker-muted_dark.tga"
50 image_unselected="icn_speaker_dark.tga" label="" label_width="55" 50 image_unselected="icn_speaker_dark.tga" label="" label_width="55"
51 left="150" name="mute_wind" tab_stop="false" toggle="true" width="25" /> 51 left="150" name="mute_wind" tab_stop="false" toggle="true" width="25" />
52 <slider bottom_delta="-20" control_name="AudioLevelGestures" follows="left|top|right"
53 height="15" increment="0.05" initial_val="0.5" label="Gestures:"
54 label_width="55" left="10" max_val="1" min_val="0" name="Gestures"
55 show_text="false" volume="true" width="180" />
56 <button bottom_delta="0" control_name="MuteGestures" follows="top|right" height="16"
57 image_selected="icn_speaker-muted_dark.tga"
58 image_unselected="icn_speaker_dark.tga" label="" label_width="55"
59 left="150" name="mute_gestures" tab_stop="false" toggle="true" width="25" />
52 <slider bottom_delta="-20" control_name="AudioLevelUI" follows="left|top|right" 60 <slider bottom_delta="-20" control_name="AudioLevelUI" follows="left|top|right"
53 height="15" increment="0.05" initial_val="0.5" label="Interface:" label_width="55" 61 height="15" increment="0.05" initial_val="0.5" label="Interface:" label_width="55"
54 left="10" max_val="1" min_val="0" name="UI Volume" show_text="false" 62 left="10" max_val="1" min_val="0" name="UI Volume" show_text="false"
diff --git a/linden/indra/newview/skins/default/xui/en-us/panel_media_remote_expanded.xml b/linden/indra/newview/skins/default/xui/en-us/panel_media_remote_expanded.xml
index 7266536..3fdea5e 100644
--- a/linden/indra/newview/skins/default/xui/en-us/panel_media_remote_expanded.xml
+++ b/linden/indra/newview/skins/default/xui/en-us/panel_media_remote_expanded.xml
@@ -2,8 +2,8 @@
2<panel bg_visible="false" border="false" border_visible="false" bottom="1" 2<panel bg_visible="false" border="false" border_visible="false" bottom="1"
3 follows="right|bottom" height="185" left="0" name="media_remote" 3 follows="right|bottom" height="185" left="0" name="media_remote"
4 use_bounding_rect="true" width="220"> 4 use_bounding_rect="true" width="220">
5 <panel bottom="0" filename="panel_bg_tab.xml" height="187" left="0" width="220" /> 5 <panel bottom="0" filename="panel_bg_tab.xml" height="197" left="0" width="220" />
6 <panel border="false" bottom="22" filename="panel_audio.xml" height="160" 6 <panel border="false" bottom="22" filename="panel_audio.xml" height="174"
7 label="Audio &amp; Video" name="Volume Panel" width="220" /> 7 label="Audio &amp; Video" name="Volume Panel" width="220" />
8 <panel bottom_delta="-10" filename="panel_media_controls.xml" left="0" /> 8 <panel bottom_delta="-10" filename="panel_media_controls.xml" left="0" />
9 <string name="play_label"> 9 <string name="play_label">
diff --git a/linden/indra/newview/skins/default/xui/en-us/panel_preferences_audio.xml b/linden/indra/newview/skins/default/xui/en-us/panel_preferences_audio.xml
index 400da56..c6bb938 100644
--- a/linden/indra/newview/skins/default/xui/en-us/panel_preferences_audio.xml
+++ b/linden/indra/newview/skins/default/xui/en-us/panel_preferences_audio.xml
@@ -20,10 +20,10 @@
20 mouse_opaque="true" name="audio_prefs_text" v_pad="0" width="128"> 20 mouse_opaque="true" name="audio_prefs_text" v_pad="0" width="128">
21 Audio: 21 Audio:
22 </text> 22 </text>
23 <panel border="true" bottom="-195" enabled="true" filename="panel_audio.xml" 23 <panel border="true" bottom="-187" enabled="true" filename="panel_audio.xml"
24 follows="left|top|right|bottom" height="180" label="Volume" left="148" 24 follows="left|top|right|bottom" height="180" label="Volume" left="148"
25 mouse_opaque="true" name="Volume Panel" width="260" /> 25 mouse_opaque="true" name="Volume Panel" width="260" />
26 <check_box bottom="-195" control_name="AudioStreamingMusic" enabled="true" 26 <check_box bottom="-205" control_name="AudioStreamingMusic" enabled="true"
27 follows="left|top" font="SansSerifSmall" height="16" initial_value="true" 27 follows="left|top" font="SansSerifSmall" height="16" initial_value="true"
28 label="Play streaming music when available (uses more bandwidth)" 28 label="Play streaming music when available (uses more bandwidth)"
29 left="142" mouse_opaque="true" name="streaming_music" radio_style="false" 29 left="142" mouse_opaque="true" name="streaming_music" radio_style="false"
@@ -42,7 +42,7 @@
42 initial_value="true" label="Automatically play media" left="162" 42 initial_value="true" label="Automatically play media" left="162"
43 mouse_opaque="true" name="auto_streaming_video" radio_style="false" 43 mouse_opaque="true" name="auto_streaming_video" radio_style="false"
44 width="338" /> 44 width="338" />
45 <check_box bottom_delta="-34" control_name="MuteWhenMinimized" enabled="true" 45 <check_box bottom_delta="-27" control_name="MuteWhenMinimized" enabled="true"
46 follows="left|top" font="SansSerifSmall" height="16" initial_value="true" 46 follows="left|top" font="SansSerifSmall" height="16" initial_value="true"
47 label="Mute audio when window minimized" left="142" mouse_opaque="true" 47 label="Mute audio when window minimized" left="142" mouse_opaque="true"
48 name="mute_when_minimized" radio_style="false" width="215" /> 48 name="mute_when_minimized" radio_style="false" width="215" />
@@ -57,7 +57,7 @@
57 label_width="158" left="148" max_val="10000" min_val="0" 57 label_width="158" left="148" max_val="10000" min_val="0"
58 mouse_opaque="true" name="Health change threshold" width="212" /> 58 mouse_opaque="true" name="Health change threshold" width="212" />
59 <text type="string" length="1" bg_visible="false" border_drop_shadow_visible="false" border_visible="false" 59 <text type="string" length="1" bg_visible="false" border_drop_shadow_visible="false" border_visible="false"
60 bottom_delta="-30" drop_shadow_visible="true" enabled="true" follows="left|top" 60 bottom_delta="-27" drop_shadow_visible="true" enabled="true" follows="left|top"
61 font="SansSerifSmall" h_pad="0" halign="left" height="12" left="10" 61 font="SansSerifSmall" h_pad="0" halign="left" height="12" left="10"
62 mouse_opaque="true" name="ambient_prefs_text" v_pad="0" width="128"> 62 mouse_opaque="true" name="ambient_prefs_text" v_pad="0" width="128">
63 Ambient: 63 Ambient: