aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/linden
diff options
context:
space:
mode:
Diffstat (limited to 'linden')
-rw-r--r--linden/indra/llmedia/llmediaimplgstreamer.cpp37
-rw-r--r--linden/indra/llmedia/llmediaimplgstreamer.h15
-rw-r--r--linden/indra/llmedia/llmediaimplgstreamer_syms_raw.inc4
-rw-r--r--linden/indra/llmedia/llmediaimplgstreamervidplug.cpp6
-rw-r--r--linden/indra/llui/lltexteditor.cpp111
-rw-r--r--linden/indra/newview/app_settings/settings.xml2
-rw-r--r--linden/indra/newview/llpreviewlandmark.cpp10
-rw-r--r--linden/indra/newview/llviewermessage.cpp4
-rw-r--r--linden/indra/newview/llviewerobject.cpp6
-rw-r--r--linden/indra/newview/llvoavatar.cpp13
10 files changed, 93 insertions, 115 deletions
diff --git a/linden/indra/llmedia/llmediaimplgstreamer.cpp b/linden/indra/llmedia/llmediaimplgstreamer.cpp
index 18afc45..bae8ad9 100644
--- a/linden/indra/llmedia/llmediaimplgstreamer.cpp
+++ b/linden/indra/llmedia/llmediaimplgstreamer.cpp
@@ -43,10 +43,6 @@ extern "C" {
43 43
44#include "llmediaimplgstreamervidplug.h" 44#include "llmediaimplgstreamervidplug.h"
45 45
46#ifdef LL_GST_SOUNDSINK
47#include "llmediaimplgstreamersndplug.h"
48#endif // LL_GST_SOUNDSINK
49
50#include "llmediaimplgstreamer_syms.h" 46#include "llmediaimplgstreamer_syms.h"
51 47
52#include "llerror.h" 48#include "llerror.h"
@@ -77,9 +73,6 @@ LLMediaImplGStreamer () :
77 mPlaybin ( NULL ), 73 mPlaybin ( NULL ),
78 mVideoSink ( NULL ), 74 mVideoSink ( NULL ),
79 mState( GST_STATE_NULL ) 75 mState( GST_STATE_NULL )
80#ifdef LL_GST_SOUNDSINK
81 ,mAudioSink ( NULL )
82#endif // LL_GST_SOUNDSINK
83{ 76{
84 LL_DEBUGS("MediaManager") << "constructing media..." << LL_ENDL; 77 LL_DEBUGS("MediaManager") << "constructing media..." << LL_ENDL;
85 mVolume = -1.0; // XXX Hack to make the vould change happend first time 78 mVolume = -1.0; // XXX Hack to make the vould change happend first time
@@ -115,21 +108,6 @@ LLMediaImplGStreamer () :
115 } 108 }
116 109
117 g_object_set(mPlaybin, "video-sink", mVideoSink, NULL); 110 g_object_set(mPlaybin, "video-sink", mVideoSink, NULL);
118
119#ifdef LL_GST_SOUNDSINK
120 LL_DEBUGS("MediaManager") << "extrenal audio sink..." << LL_ENDL;
121 // instantiate and connect a custom audio sink
122 mAudioSink =
123 GST_SLSOUND(llgst_element_factory_make ("private-slsound", "slsound"));
124 if (!mAudioSink)
125 {
126 LL_WARN("MediaImpl") << "Could not instantiate private-slsound element." << LL_ENDL;
127 // todo: cleanup.
128 return; // error
129 }
130
131 g_object_set(mPlaybin, "audio-sink", mAudioSink, NULL);
132#endif
133 } 111 }
134} 112}
135 113
@@ -210,9 +188,6 @@ bool LLMediaImplGStreamer::startup (LLMediaManagerData* init_data)
210 188
211 // Init our custom plugins - only really need do this once. 189 // Init our custom plugins - only really need do this once.
212 gst_slvideo_init_class(); 190 gst_slvideo_init_class();
213#if 0
214 gst_slsound_init_class();
215#endif
216 191
217 done_init = true; 192 done_init = true;
218 } 193 }
@@ -360,7 +335,6 @@ gboolean LLMediaImplGStreamer::bus_callback(GstBus *bus, GstMessage *message, gp
360 } 335 }
361 case GST_MESSAGE_TAG: 336 case GST_MESSAGE_TAG:
362 { 337 {
363#if 0
364 GstTagList *tag_list; 338 GstTagList *tag_list;
365 gchar *title; 339 gchar *title;
366 gchar *artist; 340 gchar *artist;
@@ -370,10 +344,9 @@ gboolean LLMediaImplGStreamer::bus_callback(GstBus *bus, GstMessage *message, gp
370 gboolean hazArtist = llgst_tag_list_get_string(tag_list, 344 gboolean hazArtist = llgst_tag_list_get_string(tag_list,
371 GST_TAG_ARTIST, &artist); 345 GST_TAG_ARTIST, &artist);
372 if(hazTitle) 346 if(hazTitle)
373 LL_INFOS("MediaInfo") << "Title is " << title << LL_ENDL; 347 LL_INFOS("MediaInfo") << "Title: " << title << LL_ENDL;
374 if(hazArtist) 348 if(hazArtist)
375 LL_INFOS("MediaInfo") << "Artist is " << artist << LL_ENDL; 349 LL_INFOS("MediaInfo") << "Artist: " << artist << LL_ENDL;
376#endif
377 break; 350 break;
378 } 351 }
379 case GST_MESSAGE_EOS: 352 case GST_MESSAGE_EOS:
@@ -412,9 +385,6 @@ bool LLMediaImplGStreamer::navigateTo (const std::string urlIn)
412 << LL_ENDL; 385 << LL_ENDL;
413 386
414 if (NULL == mPump 387 if (NULL == mPump
415#ifdef LL_GST_SOUNDSINK
416 || NULL == mAudioSink
417#endif
418 || NULL == mPlaybin) 388 || NULL == mPlaybin)
419 { 389 {
420 return false; 390 return false;
@@ -479,9 +449,6 @@ bool LLMediaImplGStreamer::updateMedia()
479 449
480 // sanity check 450 // sanity check
481 if (NULL == mPump 451 if (NULL == mPump
482#ifdef LL_GST_SOUNDSINK
483 || NULL == mAudioSink
484#endif
485 || NULL == mPlaybin) 452 || NULL == mPlaybin)
486 { 453 {
487#ifdef LL_GST_REPORT_STATE_CHANGES 454#ifdef LL_GST_REPORT_STATE_CHANGES
diff --git a/linden/indra/llmedia/llmediaimplgstreamer.h b/linden/indra/llmedia/llmediaimplgstreamer.h
index 4b9353b..5b493ad 100644
--- a/linden/indra/llmedia/llmediaimplgstreamer.h
+++ b/linden/indra/llmedia/llmediaimplgstreamer.h
@@ -31,7 +31,7 @@
31 */ 31 */
32 32
33// header guard 33// header guard
34///#ifndef llmediaimplgstreamer_h 34#ifndef llmediaimplgstreamer_h
35#define llmediaimplgstreamer_h 35#define llmediaimplgstreamer_h
36 36
37#include "llmediaimplcommon.h" 37#include "llmediaimplcommon.h"
@@ -42,14 +42,12 @@
42extern "C" { 42extern "C" {
43#include <stdio.h> 43#include <stdio.h>
44#include <gst/gst.h> 44#include <gst/gst.h>
45#include <apr_pools.h> 45
46#include <apr_dso.h> 46#include "apr_pools.h"
47#include "apr_dso.h"
47} 48}
48 49
49#include "llmediaimplgstreamervidplug.h" 50#include "llmediaimplgstreamervidplug.h"
50#ifdef LL_GST_SOUNDSINK
51#include "llmediaimplgstreamersndplug.h"
52#endif // LL_GST_SOUNDSINK
53 51
54class LLMediaManagerData; 52class LLMediaManagerData;
55class LLMediaImplMaker; 53class LLMediaImplMaker;
@@ -100,9 +98,6 @@ class LLMediaImplGStreamer:
100 GstElement *mPlaybin; 98 GstElement *mPlaybin;
101 GstSLVideo *mVideoSink; 99 GstSLVideo *mVideoSink;
102 GstState mState; 100 GstState mState;
103#ifdef LL_GST_SOUNDSINK
104 GstSLSound *mAudioSink;
105#endif // LL_GST_SOUNDSINK
106 GstState getState() const { return mState; } 101 GstState getState() const { return mState; }
107}; 102};
108 103
@@ -132,4 +127,4 @@ public:
132 127
133///#endif // LL_GSTREAMER_ENABLED 128///#endif // LL_GSTREAMER_ENABLED
134 129
135///#endif // llmediaimplgstreamer_h 130#endif // llmediaimplgstreamer_h
diff --git a/linden/indra/llmedia/llmediaimplgstreamer_syms_raw.inc b/linden/indra/llmedia/llmediaimplgstreamer_syms_raw.inc
index 08ba6df..e17a7a0 100644
--- a/linden/indra/llmedia/llmediaimplgstreamer_syms_raw.inc
+++ b/linden/indra/llmedia/llmediaimplgstreamer_syms_raw.inc
@@ -40,3 +40,7 @@ LL_GST_SYM(true, gst_element_seek, bool, GstElement *, gdouble, GstFormat, GstSe
40LL_GST_SYM(false, gst_segtrap_set_enabled, void, gboolean enabled); 40LL_GST_SYM(false, gst_segtrap_set_enabled, void, gboolean enabled);
41LL_GST_SYM(false, gst_message_parse_buffering, void, GstMessage *message, gint *percent); 41LL_GST_SYM(false, gst_message_parse_buffering, void, GstMessage *message, gint *percent);
42LL_GST_SYM(false, gst_message_parse_info, void, GstMessage *message, GError **gerror, gchar **debug); 42LL_GST_SYM(false, gst_message_parse_info, void, GstMessage *message, GError **gerror, gchar **debug);
43
44//aw tag infos (Artist, Title, ...tbc...)
45LL_GST_SYM(true, gst_message_parse_tag, void, GstMessage *message, GstTagList **tag_list);
46LL_GST_SYM(true, gst_tag_list_get_string, gboolean, const GstTagList *list, const gchar *tag, gchar **value);
diff --git a/linden/indra/llmedia/llmediaimplgstreamervidplug.cpp b/linden/indra/llmedia/llmediaimplgstreamervidplug.cpp
index 892c50d..c95ef36 100644
--- a/linden/indra/llmedia/llmediaimplgstreamervidplug.cpp
+++ b/linden/indra/llmedia/llmediaimplgstreamervidplug.cpp
@@ -68,10 +68,8 @@ static GstStaticPadTemplate sink_factory = GST_STATIC_PAD_TEMPLATE (
68 GST_STATIC_CAPS (SLV_ALLCAPS) 68 GST_STATIC_CAPS (SLV_ALLCAPS)
69 ); 69 );
70 70
71GST_BOILERPLATE (GstSLVideo, 71GST_BOILERPLATE (GstSLVideo, gst_slvideo, GstVideoSink,
72 gst_slvideo, 72 GST_TYPE_VIDEO_SINK);
73 GstVideoSink,
74 GST_TYPE_VIDEO_SINK);
75 73
76static void gst_slvideo_set_property (GObject * object, guint prop_id, 74static void gst_slvideo_set_property (GObject * object, guint prop_id,
77 const GValue * value, 75 const GValue * value,
diff --git a/linden/indra/llui/lltexteditor.cpp b/linden/indra/llui/lltexteditor.cpp
index 72d8f17..714ee7c 100644
--- a/linden/indra/llui/lltexteditor.cpp
+++ b/linden/indra/llui/lltexteditor.cpp
@@ -35,6 +35,7 @@
35 35
36#include "lltexteditor.h" 36#include "lltexteditor.h"
37 37
38#include "llerror.h"
38#include "llfontgl.h" 39#include "llfontgl.h"
39#include "llrender.h" 40#include "llrender.h"
40#include "llui.h" 41#include "llui.h"
@@ -57,6 +58,7 @@
57#include "llimagegl.h" 58#include "llimagegl.h"
58#include "llwindow.h" 59#include "llwindow.h"
59#include <queue> 60#include <queue>
61#include <stdexcept>
60 62
61// 63//
62// Globals 64// Globals
@@ -3537,6 +3539,7 @@ void LLTextEditor::appendStyledText(const std::string &new_text,
3537 std::string text = new_text; 3539 std::string text = new_text;
3538 while ( findHTML(text, &start, &end) ) 3540 while ( findHTML(text, &start, &end) )
3539 { 3541 {
3542
3540 LLStyleSP html(new LLStyle); 3543 LLStyleSP html(new LLStyle);
3541 html->setVisible(true); 3544 html->setVisible(true);
3542 html->setColor(mLinkColor); 3545 html->setColor(mLinkColor);
@@ -3624,10 +3627,6 @@ void LLTextEditor::appendText(const std::string &new_text, bool allow_undo, bool
3624 { 3627 {
3625 mSelectionStart = selection_start; 3628 mSelectionStart = selection_start;
3626 mSelectionEnd = selection_end; 3629 mSelectionEnd = selection_end;
3627
3628
3629
3630
3631 mIsSelecting = was_selecting; 3630 mIsSelecting = was_selecting;
3632 setCursorPos(cursor_pos); 3631 setCursorPos(cursor_pos);
3633 } 3632 }
@@ -4272,6 +4271,7 @@ S32 LLTextEditor::findHTMLToken(const std::string &line, S32 pos, BOOL reverse)
4272 return index+1; 4271 return index+1;
4273 } 4272 }
4274 } 4273 }
4274 index = 0; // Can't be before first charater
4275 } 4275 }
4276 else 4276 else
4277 { 4277 {
@@ -4322,21 +4322,34 @@ BOOL LLTextEditor::findHTML(const std::string &line, S32 *begin, S32 *end) const
4322 { 4322 {
4323 *begin = findHTMLToken(line, m1, TRUE); 4323 *begin = findHTMLToken(line, m1, TRUE);
4324 *end = findHTMLToken(line, m1, FALSE); 4324 *end = findHTMLToken(line, m1, FALSE);
4325
4326 // Can't start before the first char
4327 if(*begin < 0)
4328 {
4329 //*begin = 0;
4330 }
4325 4331
4326 //Load_url only handles http and https so don't hilite ftp, smb, etc. 4332 //Load_url only handles http and https so don't hilite ftp, smb, etc.
4327 m2 = line.substr(*begin,(m1 - *begin)).find("http"); 4333 try
4328 m3 = line.substr(*begin,(m1 - *begin)).find("secondlife");
4329
4330 std::string badneighbors=".,<>?';\"][}{=-+_)(*&^%$#@!~`\t\r\n\\";
4331
4332 if (m2 >= 0 || m3>=0)
4333 { 4334 {
4334 S32 bn = badneighbors.find(line.substr(m1+3,1)); 4335 m2 = line.substr(*begin,(m1 - *begin)).find("http");
4335 4336 m3 = line.substr(*begin,(m1 - *begin)).find("secondlife");
4336 if (bn < 0) 4337
4337 { 4338 std::string badneighbors=".,<>?';\"][}{=-+_)(*&^%$#@!~`\t\r\n\\";
4338 matched = TRUE; 4339
4340 if (m2 >= 0 || m3>=0)
4341 {
4342 S32 bn = badneighbors.find(line.substr(m1+3,1));
4343
4344 if (bn < 0)
4345 {
4346 matched = TRUE;
4347 }
4339 } 4348 }
4349 }
4350 catch ( std::out_of_range outOfRange )
4351 {
4352 LL_WARNS("TextEditor") << "got std::out_of_range exception \"" << line << "\"" << LL_ENDL;
4340 } 4353 }
4341 } 4354 }
4342/* matches things like secondlife.com (no http://) needs a whitelist to really be effective. 4355/* matches things like secondlife.com (no http://) needs a whitelist to really be effective.
@@ -4369,41 +4382,49 @@ BOOL LLTextEditor::findHTML(const std::string &line, S32 *begin, S32 *end) const
4369 { 4382 {
4370 S32 strpos, strpos2; 4383 S32 strpos, strpos2;
4371 4384
4372 std::string url = line.substr(*begin,*end - *begin); 4385 try
4373 std::string slurlID = "slurl.com/secondlife/";
4374 strpos = url.find(slurlID);
4375
4376 if (strpos < 0)
4377 { 4386 {
4378 slurlID="secondlife://"; 4387 std::string url = line.substr(*begin,*end - *begin);
4379 strpos = url.find(slurlID); 4388 std::string slurlID = "slurl.com/secondlife/";
4380 } 4389 strpos = url.find(slurlID);
4381 4390
4382 if (strpos < 0) 4391 if (strpos < 0)
4383 { 4392 {
4384 slurlID="sl://"; 4393 slurlID="secondlife://";
4385 strpos = url.find(slurlID); 4394 strpos = url.find(slurlID);
4386 } 4395 }
4387 4396
4388 if (strpos >= 0) 4397 if (strpos < 0)
4389 { 4398 {
4390 strpos+=slurlID.length(); 4399 slurlID="sl://";
4391 4400 strpos = url.find(slurlID);
4392 while ( ( strpos2=url.find("/",strpos) ) == -1 ) 4401 }
4393 { 4402
4394 if ((*end+2) >= (S32)line.length() || line.substr(*end,1) != " " ) 4403 if (strpos >= 0)
4404 {
4405 strpos+=slurlID.length();
4406
4407 while ( ( strpos2=url.find("/",strpos) ) == -1 )
4395 { 4408 {
4396 matched=FALSE; 4409 if ((*end+2) >= (S32)line.length() || line.substr(*end,1) != " " )
4397 break; 4410 {
4411 matched=FALSE;
4412 break;
4413 }
4414
4415 strpos = (*end + 1) - *begin;
4416
4417 *end = findHTMLToken(line,(*begin + strpos),FALSE);
4418 url = line.substr(*begin,*end - *begin);
4398 } 4419 }
4399 4420 }
4400 strpos = (*end + 1) - *begin; 4421
4401
4402 *end = findHTMLToken(line,(*begin + strpos),FALSE);
4403 url = line.substr(*begin,*end - *begin);
4404 }
4405 } 4422 }
4406 4423
4424 catch ( std::out_of_range outOfRange )
4425 {
4426 LL_WARNS("TextEditor") << "got std::out_of_range exception \"" << line << "\"" << LL_ENDL;
4427 }
4407 } 4428 }
4408 4429
4409 if (!matched) 4430 if (!matched)
diff --git a/linden/indra/newview/app_settings/settings.xml b/linden/indra/newview/app_settings/settings.xml
index fbb620c..7405aad 100644
--- a/linden/indra/newview/app_settings/settings.xml
+++ b/linden/indra/newview/app_settings/settings.xml
@@ -284,7 +284,7 @@
284 <key>Type</key> 284 <key>Type</key>
285 <string>F32</string> 285 <string>F32</string>
286 <key>Value</key> 286 <key>Value</key>
287 <real>1.0</real> 287 <real>0.5</real>
288 </map> 288 </map>
289 <key>AudioLevelUI</key> 289 <key>AudioLevelUI</key>
290 <map> 290 <map>
diff --git a/linden/indra/newview/llpreviewlandmark.cpp b/linden/indra/newview/llpreviewlandmark.cpp
index dba603b..01d77f6 100644
--- a/linden/indra/newview/llpreviewlandmark.cpp
+++ b/linden/indra/newview/llpreviewlandmark.cpp
@@ -90,15 +90,7 @@ LLPreviewLandmark::LLPreviewLandmark(const std::string& name,
90{ 90{
91 91
92 mFactoryMap["place_details_panel"] = LLCallbackMap(LLPreviewLandmark::createPlaceDetail, this); 92 mFactoryMap["place_details_panel"] = LLCallbackMap(LLPreviewLandmark::createPlaceDetail, this);
93 if (show_keep_discard) 93 LLUICtrlFactory::getInstance()->buildFloater(this, "floater_preview_existing_landmark.xml", &getFactoryMap());
94 {
95 LLUICtrlFactory::getInstance()->buildFloater(this, "floater_preview_new_landmark.xml", &getFactoryMap());
96 childSetAction("Discard btn",onDiscardBtn,this);
97 }
98 else
99 {
100 LLUICtrlFactory::getInstance()->buildFloater(this, "floater_preview_existing_landmark.xml", &getFactoryMap());
101 }
102 94
103 /* 95 /*
104 childSetCommitCallback("desc_editor", LLPreview::onText, this); 96 childSetCommitCallback("desc_editor", LLPreview::onText, this);
diff --git a/linden/indra/newview/llviewermessage.cpp b/linden/indra/newview/llviewermessage.cpp
index 4543ae4..b947f95 100644
--- a/linden/indra/newview/llviewermessage.cpp
+++ b/linden/indra/newview/llviewermessage.cpp
@@ -111,6 +111,7 @@
111#include "llui.h" // for make_ui_sound 111#include "llui.h" // for make_ui_sound
112#include "lluploaddialog.h" 112#include "lluploaddialog.h"
113#include "llviewercamera.h" 113#include "llviewercamera.h"
114#include "llviewercontrol.h"
114#include "llviewergenericmessage.h" 115#include "llviewergenericmessage.h"
115#include "llviewerinventory.h" 116#include "llviewerinventory.h"
116#include "llviewermenu.h" 117#include "llviewermenu.h"
@@ -3291,6 +3292,9 @@ void process_sound_trigger(LLMessageSystem *msg, void **)
3291 pos_global.mdV[VY] += pos_local.mV[VY]; 3292 pos_global.mdV[VY] += pos_local.mV[VY];
3292 pos_global.mdV[VZ] += pos_local.mV[VZ]; 3293 pos_global.mdV[VZ] += pos_local.mV[VZ];
3293 3294
3295 // Don't play sounds if sound settings are muted.
3296 if (gSavedSettings.getBOOL("MuteSounds")) return;
3297
3294 // Don't play a trigger sound if you can't hear it due 3298 // Don't play a trigger sound if you can't hear it due
3295 // to parcel "local audio only" settings. 3299 // to parcel "local audio only" settings.
3296 if (!LLViewerParcelMgr::getInstance()->canHearSound(pos_global)) return; 3300 if (!LLViewerParcelMgr::getInstance()->canHearSound(pos_global)) return;
diff --git a/linden/indra/newview/llviewerobject.cpp b/linden/indra/newview/llviewerobject.cpp
index c560ced..cb3afc5 100644
--- a/linden/indra/newview/llviewerobject.cpp
+++ b/linden/indra/newview/llviewerobject.cpp
@@ -2766,7 +2766,7 @@ BOOL LLViewerObject::updateLOD()
2766 // Update volume of looping sounds 2766 // Update volume of looping sounds
2767 if (mAudioSourcep && mAudioSourcep->isLoop()) 2767 if (mAudioSourcep && mAudioSourcep->isLoop())
2768 { 2768 {
2769 F32 volume = gSavedSettings.getBOOL("MuteSounds") ? 0.f : (mAudioGain * gSavedSettings.getF32("AudioLevelSFX")); 2769 F32 volume = mAudioGain * gSavedSettings.getF32("AudioLevelSFX");
2770 mAudioSourcep->setGain(volume); 2770 mAudioSourcep->setGain(volume);
2771 } 2771 }
2772 return FALSE; 2772 return FALSE;
@@ -4331,7 +4331,7 @@ void LLViewerObject::setAttachedSound(const LLUUID &audio_uuid, const LLUUID& ow
4331 { 4331 {
4332 BOOL queue = flags & LL_SOUND_FLAG_QUEUE; 4332 BOOL queue = flags & LL_SOUND_FLAG_QUEUE;
4333 mAudioGain = gain; 4333 mAudioGain = gain;
4334 F32 volume = gSavedSettings.getBOOL("MuteSounds") ? 0.f : gain * gSavedSettings.getF32("AudioLevelSFX"); 4334 F32 volume = gain * gSavedSettings.getF32("AudioLevelSFX");
4335 mAudioSourcep->setGain(volume); 4335 mAudioSourcep->setGain(volume);
4336 mAudioSourcep->setLoop(flags & LL_SOUND_FLAG_LOOP); 4336 mAudioSourcep->setLoop(flags & LL_SOUND_FLAG_LOOP);
4337 mAudioSourcep->setSyncMaster(flags & LL_SOUND_FLAG_SYNC_MASTER); 4337 mAudioSourcep->setSyncMaster(flags & LL_SOUND_FLAG_SYNC_MASTER);
@@ -4370,7 +4370,7 @@ void LLViewerObject::adjustAudioGain(const F32 gain)
4370 if (mAudioSourcep) 4370 if (mAudioSourcep)
4371 { 4371 {
4372 mAudioGain = gain; 4372 mAudioGain = gain;
4373 F32 volume = gSavedSettings.getBOOL("MuteSounds") ? 0.f : mAudioGain * gSavedSettings.getF32("AudioLevelSFX"); 4373 F32 volume = mAudioGain * gSavedSettings.getF32("AudioLevelSFX");
4374 mAudioSourcep->setGain(volume); 4374 mAudioSourcep->setGain(volume);
4375 } 4375 }
4376} 4376}
diff --git a/linden/indra/newview/llvoavatar.cpp b/linden/indra/newview/llvoavatar.cpp
index d41f72e..fd2487b 100644
--- a/linden/indra/newview/llvoavatar.cpp
+++ b/linden/indra/newview/llvoavatar.cpp
@@ -3797,7 +3797,7 @@ BOOL LLVOAvatar::updateCharacter(LLAgent &agent)
3797 const LLUUID AGENT_FOOTSTEP_ANIMS[] = {ANIM_AGENT_WALK, ANIM_AGENT_RUN, ANIM_AGENT_LAND}; 3797 const LLUUID AGENT_FOOTSTEP_ANIMS[] = {ANIM_AGENT_WALK, ANIM_AGENT_RUN, ANIM_AGENT_LAND};
3798 const S32 NUM_AGENT_FOOTSTEP_ANIMS = sizeof(AGENT_FOOTSTEP_ANIMS) / sizeof(LLUUID); 3798 const S32 NUM_AGENT_FOOTSTEP_ANIMS = sizeof(AGENT_FOOTSTEP_ANIMS) / sizeof(LLUUID);
3799 3799
3800 if ( gAudiop && isAnyAnimationSignaled(AGENT_FOOTSTEP_ANIMS, NUM_AGENT_FOOTSTEP_ANIMS) ) 3800 if ( gAudiop && !gSavedSettings.getBOOL("MuteAmbient") && isAnyAnimationSignaled(AGENT_FOOTSTEP_ANIMS, NUM_AGENT_FOOTSTEP_ANIMS) )
3801 { 3801 {
3802 BOOL playSound = FALSE; 3802 BOOL playSound = FALSE;
3803 LLVector3 foot_pos_agent; 3803 LLVector3 foot_pos_agent;
@@ -3828,7 +3828,7 @@ BOOL LLVOAvatar::updateCharacter(LLAgent &agent)
3828// AUDIO_STEP_LO_SPEED, AUDIO_STEP_HI_SPEED, 3828// AUDIO_STEP_LO_SPEED, AUDIO_STEP_HI_SPEED,
3829// AUDIO_STEP_LO_GAIN, AUDIO_STEP_HI_GAIN ); 3829// AUDIO_STEP_LO_GAIN, AUDIO_STEP_HI_GAIN );
3830 3830
3831 const F32 STEP_VOLUME = 0.5f; 3831 const F32 STEP_VOLUME = 0.2f;
3832 LLUUID& step_sound_id = getStepSound(); 3832 LLUUID& step_sound_id = getStepSound();
3833 3833
3834 LLVector3d foot_pos_global = gAgent.getPosGlobalFromAgent(foot_pos_agent); 3834 LLVector3d foot_pos_global = gAgent.getPosGlobalFromAgent(foot_pos_agent);
@@ -4800,7 +4800,7 @@ BOOL LLVOAvatar::processSingleAnimationStateChange( const LLUUID& anim_id, BOOL
4800 { 4800 {
4801 if (anim_id == ANIM_AGENT_TYPE) 4801 if (anim_id == ANIM_AGENT_TYPE)
4802 { 4802 {
4803 if (gAudiop) 4803 if (gAudiop && !gSavedSettings.getBOOL("MuteAmbient"))
4804 { 4804 {
4805 LLVector3d char_pos_global = gAgent.getPosGlobalFromAgent(getCharacterPosition()); 4805 LLVector3d char_pos_global = gAgent.getPosGlobalFromAgent(getCharacterPosition());
4806 if (LLViewerParcelMgr::getInstance()->canHearSound(char_pos_global) 4806 if (LLViewerParcelMgr::getInstance()->canHearSound(char_pos_global)
@@ -4814,11 +4814,8 @@ BOOL LLVOAvatar::processSingleAnimationStateChange( const LLUUID& anim_id, BOOL
4814 // gAudiop->triggerSound(LLUUID(gSavedSettings.getString("UISndTyping")), volume); 4814 // gAudiop->triggerSound(LLUUID(gSavedSettings.getString("UISndTyping")), volume);
4815 //} 4815 //}
4816 //else 4816 //else
4817 { 4817 LLUUID sound_id = LLUUID(gSavedSettings.getString("UISndTyping"));
4818 LLUUID sound_id = LLUUID(gSavedSettings.getString("UISndTyping")); 4818 gAudiop->triggerSound(sound_id, getID(), 1.0f, LLAudioEngine::AUDIO_TYPE_SFX, char_pos_global);
4819 gAudiop->triggerSound(sound_id, getID(), 1.0f, LLAudioEngine::AUDIO_TYPE_SFX, char_pos_global);
4820
4821 }
4822 } 4819 }
4823 } 4820 }
4824 } 4821 }