From adb6155aa6d3d5161d2e11ec47a0f73527068c2d Mon Sep 17 00:00:00 2001
From: Armin Weatherwax
Date: Sun, 14 Nov 2010 13:18:17 +0100
Subject: fetch pulseaudio headers also for linux64
---
linden/install.xml | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/linden/install.xml b/linden/install.xml
index 1df31e2..e536de2 100755
--- a/linden/install.xml
+++ b/linden/install.xml
@@ -1343,6 +1343,13 @@ Copyright (C) 2004-2005 Vladimir Berezniker @ http://public.xdi.org/=vmpn
url
http://s3.amazonaws.com/viewer-source-downloads/install_pkgs/linux-pulse-headers-0.9.14.tar.bz2
+ linux64
+
quicktime
--
cgit v1.1
From dd4630a13ce0cac5080cd1e0f442afd5b534d71f Mon Sep 17 00:00:00 2001
From: Armin Weatherwax
Date: Fri, 19 Nov 2010 11:38:23 +0100
Subject: fix: Bug #721: Search lags
---
linden/indra/newview/llfloaterdirectory.cpp | 4 +++-
linden/indra/newview/llpanelavatar.cpp | 11 +++++++++++
linden/indra/newview/llpanelavatar.h | 4 ++--
linden/indra/newview/llpaneldirfind.cpp | 8 ++++++++
4 files changed, 24 insertions(+), 3 deletions(-)
diff --git a/linden/indra/newview/llfloaterdirectory.cpp b/linden/indra/newview/llfloaterdirectory.cpp
index 8018c31..7c8ddf1 100644
--- a/linden/indra/newview/llfloaterdirectory.cpp
+++ b/linden/indra/newview/llfloaterdirectory.cpp
@@ -466,7 +466,9 @@ void LLFloaterDirectory::setVisible(BOOL visible)
void LLFloaterDirectory::onClose(bool app_quitting)
{
- setVisible(FALSE);
+ LLFloater::onClose(app_quitting);
+
+ //setVisible(FALSE); //meaning you hide 3 web browsers - one SLPlugin each
}
// static
diff --git a/linden/indra/newview/llpanelavatar.cpp b/linden/indra/newview/llpanelavatar.cpp
index e47ae2a..6110e44 100644
--- a/linden/indra/newview/llpanelavatar.cpp
+++ b/linden/indra/newview/llpanelavatar.cpp
@@ -416,6 +416,7 @@ BOOL LLPanelAvatarWeb::postBuild(void)
childSetControlName("auto_load","AutoLoadWebProfiles");
mWebBrowser = getChild("profile_html");
+
mWebBrowser->addObserver(this);
// links open in internally
@@ -490,7 +491,17 @@ void LLPanelAvatarWeb::refresh()
mNavigateTo = "";
}
}
+void LLPanelAvatarWeb::onVisibilityChange(BOOL new_visibility)
+{
+ LLPluginClassMedia::EPriority new_priority;
+ if (new_visibility)
+ new_priority = LLPluginClassMedia::PRIORITY_NORMAL;
+ else
+ new_priority = LLPluginClassMedia::PRIORITY_HIDDEN;
+
+ mWebBrowser->getMediaPlugin()->setPriority(new_priority);
+}
void LLPanelAvatarWeb::enableControls(BOOL self)
{
diff --git a/linden/indra/newview/llpanelavatar.h b/linden/indra/newview/llpanelavatar.h
index b687cd8..9a2f450 100644
--- a/linden/indra/newview/llpanelavatar.h
+++ b/linden/indra/newview/llpanelavatar.h
@@ -76,7 +76,6 @@ public:
/*virtual*/ void draw();
LLPanelAvatar* getPanelAvatar() const { return mPanelAvatar; }
-
void setDataRequested(bool requested) { mDataRequested = requested; }
bool isDataRequested() const { return mDataRequested; }
@@ -143,14 +142,15 @@ public:
LLPanelAvatarWeb(const std::string& name, const LLRect& rect, LLPanelAvatar* panel_avatar);
/*virtual*/ ~LLPanelAvatarWeb();
/*virtual*/ BOOL postBuild(void);
-
/*virtual*/ void refresh();
+ /*virtual*/ void onVisibilityChange(BOOL new_visibility);
void enableControls(BOOL own_avatar);
void setWebURL(std::string url);
void load(std::string url);
+
static void onURLKeystroke(LLLineEditor* editor, void* data);
static void onCommitLoad(LLUICtrl* ctrl, void* data);
static void onCommitURL(LLUICtrl* ctrl, void* data);
diff --git a/linden/indra/newview/llpaneldirfind.cpp b/linden/indra/newview/llpaneldirfind.cpp
index 342ffec..719a7a0 100644
--- a/linden/indra/newview/llpaneldirfind.cpp
+++ b/linden/indra/newview/llpaneldirfind.cpp
@@ -62,6 +62,7 @@
#include "lluictrlfactory.h"
#include "llfloaterdirectory.h"
#include "llpaneldirbrowser.h"
+#include "llpluginclassmedia.h"
#include
#if LL_WINDOWS
@@ -196,10 +197,17 @@ void LLPanelDirFind::draw()
// virtual
void LLPanelDirFind::onVisibilityChange(BOOL new_visibility)
{
+ LLPluginClassMedia::EPriority new_priority;
if (new_visibility)
{
mFloaterDirectory->hideAllDetailPanels();
+ new_priority = LLPluginClassMedia::PRIORITY_NORMAL;
}
+ else
+ new_priority = LLPluginClassMedia::PRIORITY_HIDDEN;
+
+ mWebBrowser->getMediaPlugin()->setPriority(new_priority);
+
LLPanel::onVisibilityChange(new_visibility);
}
--
cgit v1.1
From 1d1482eeec3c26c1eb9c14eba6eb78462f704606 Mon Sep 17 00:00:00 2001
From: Armin Weatherwax
Date: Wed, 22 Dec 2010 14:28:24 +0100
Subject: load unloaded-avatar-cloud particle system from LLSD file.
---
linden/indra/llmessage/llpartdata.cpp | 90 ++++++++++++++++++++++
linden/indra/llmessage/llpartdata.h | 3 +
linden/indra/newview/app_settings/cloud.xml | 88 +++++++++++++++++++++
linden/indra/newview/llviewermenu.cpp | 15 ++++
linden/indra/newview/llviewerobject.cpp | 2 +-
linden/indra/newview/llvoavatar.cpp | 45 ++++-------
linden/indra/newview/llvoavatar.h | 2 +
.../skins/default/xui/en-us/menu_viewer.xml | 7 ++
8 files changed, 223 insertions(+), 29 deletions(-)
create mode 100644 linden/indra/newview/app_settings/cloud.xml
diff --git a/linden/indra/llmessage/llpartdata.cpp b/linden/indra/llmessage/llpartdata.cpp
index 485bc6a..a2811ab 100644
--- a/linden/indra/llmessage/llpartdata.cpp
+++ b/linden/indra/llmessage/llpartdata.cpp
@@ -347,3 +347,93 @@ void LLPartSysData::setPartAccel(const LLVector3 &accel)
mPartAccel.mV[VY] = llclamp(accel.mV[VY], -100.f, 100.f);
mPartAccel.mV[VZ] = llclamp(accel.mV[VZ], -100.f, 100.f);
}
+
+LLSD LLPartSysData::asLLSD() const
+{
+ LLSD sd = LLSD();
+
+ sd["LL_PART_INTERP_COLOR_MASK"] = (LLPartData::LL_PART_INTERP_COLOR_MASK & mPartData.mFlags) ? 1 : 0;
+ sd["LL_PART_INTERP_SCALE_MASK"] = (LLPartData::LL_PART_INTERP_SCALE_MASK & mPartData.mFlags) ? 1 : 0;
+ sd["LL_PART_BOUNCE_MASK"] = (LLPartData::LL_PART_BOUNCE_MASK & mPartData.mFlags) ? 1 : 0;
+ sd["LL_PART_WIND_MASK"] = (LLPartData::LL_PART_WIND_MASK & mPartData.mFlags) ? 1 : 0;
+ sd["LL_PART_FOLLOW_SRC_MASK"] = (LLPartData::LL_PART_FOLLOW_SRC_MASK & mPartData.mFlags) ? 1 : 0;
+ sd["LL_PART_FOLLOW_VELOCITY_MASK"] = (LLPartData::LL_PART_FOLLOW_VELOCITY_MASK & mPartData.mFlags) ? 1 : 0;
+ sd["LL_PART_TARGET_POS_MASK"] = (LLPartData::LL_PART_TARGET_POS_MASK & mPartData.mFlags) ? 1 : 0;
+ sd["LL_PART_TARGET_LINEAR_MASK"] = (LLPartData::LL_PART_TARGET_LINEAR_MASK & mPartData.mFlags) ? 1 : 0;
+ sd["LL_PART_EMISSIVE_MASK"] = (LLPartData::LL_PART_EMISSIVE_MASK & mPartData.mFlags) ? 1 : 0;
+ sd["LL_PART_BEAM_MASK"] = (LLPartData::LL_PART_BEAM_MASK & mPartData.mFlags) ? 1 : 0;
+
+ sd["SourceMaxage"] = mPartData.mMaxAge;
+ sd["Startcolor"] = ll_sd_from_color4(mPartData.mStartColor);
+ sd["Endcolor"] = ll_sd_from_color4(mPartData.mEndColor);
+ sd["Startscale"] = ll_sd_from_vector2(mPartData.mStartScale);
+ sd["Endscale"] = ll_sd_from_vector2(mPartData.mEndScale);
+
+ sd["ParticleMaxAge"] = mMaxAge;
+ sd["ParticleStartAge"] = mStartAge;
+
+
+ sd["LL_PART_SRC_PATTERN_DROP"] = ( mPattern & LL_PART_SRC_PATTERN_DROP) ? 1 : 0;
+ sd["LL_PART_SRC_PATTERN_EXPLODE"] = ( mPattern & LL_PART_SRC_PATTERN_EXPLODE) ? 1 : 0;
+ sd["LL_PART_SRC_PATTERN_ANGLE"] = ( mPattern & LL_PART_SRC_PATTERN_ANGLE) ? 1 : 0;
+ sd["LL_PART_SRC_PATTERN_ANGLE_CONE"] = ( mPattern & LL_PART_SRC_PATTERN_ANGLE_CONE) ? 1 : 0 ;
+ sd["LL_PART_SRC_PATTERN_ANGLE_CONE_EMPTY"] = ( mPattern & LL_PART_SRC_PATTERN_ANGLE_CONE_EMPTY) ? 1 : 0;
+
+ sd["InnerAngle"] = mInnerAngle;
+ sd["OuterAngle"] = mOuterAngle;
+ sd["AngularVelocity"] = ll_sd_from_vector3(mAngularVelocity);
+ sd["BurstRate"] = mBurstRate;
+ sd["BurstPartCount"] = mBurstPartCount;
+ sd["BurstSpeedMin"] = mBurstSpeedMin;
+ sd["BurstSpeedMax"] = mBurstSpeedMax;
+ sd["BurstRadius"] = mBurstRadius;
+ sd["PartImageID"] = mPartImageID.asString();
+ sd["TargetId"] = mTargetUUID.asString();
+ return sd;
+}
+
+bool LLPartSysData::fromLLSD(LLSD& sd)
+{
+ mPartData.mFlags = 0;
+ if (sd["LL_PART_INTERP_COLOR_MASK"]) mPartData.mFlags |= LLPartData::LL_PART_INTERP_COLOR_MASK;
+ if (sd["LL_PART_INTERP_SCALE_MASK"]) mPartData.mFlags |= LLPartData::LL_PART_INTERP_SCALE_MASK;
+ if (sd["LL_PART_BOUNCE_MASK"]) mPartData.mFlags |= LLPartData::LL_PART_BOUNCE_MASK;
+ if (sd["LL_PART_WIND_MASK"]) mPartData.mFlags |= LLPartData::LL_PART_WIND_MASK;
+ if (sd["LL_PART_FOLLOW_SRC_MASK"]) mPartData.mFlags |= LLPartData::LL_PART_FOLLOW_SRC_MASK;
+ if (sd["LL_PART_FOLLOW_VELOCITY_MASK"]) mPartData.mFlags |= LLPartData::LL_PART_FOLLOW_VELOCITY_MASK;
+ if (sd["LL_PART_TARGET_POS_MASK"]) mPartData.mFlags |= LLPartData::LL_PART_TARGET_POS_MASK;
+ if (sd["LL_PART_TARGET_LINEAR_MASK"]) mPartData.mFlags |= LLPartData::LL_PART_TARGET_LINEAR_MASK;
+ if (sd["LL_PART_EMISSIVE_MASK"]) mPartData.mFlags |= LLPartData::LL_PART_EMISSIVE_MASK;
+ if (sd["LL_PART_BEAM_MASK"]) mPartData.mFlags |= LLPartData::LL_PART_BEAM_MASK;
+
+ mPartData.mMaxAge = (F32)sd["SourceMaxage"].asReal();
+ mPartData.mStartColor = ll_color4_from_sd(sd["Startcolor"]);
+ mPartData.mEndColor = ll_color4_from_sd(sd["Endcolor"]);
+ mPartData.mStartScale = ll_vector2_from_sd(sd["Startscale"]);
+ mPartData.mEndScale = ll_vector2_from_sd(sd["Endscale"]);
+
+ mMaxAge = (F32)sd["ParticleMaxAge"].asReal();
+ mStartAge = (F32)sd["ParticleStartAge"].asReal();
+
+ mPattern = 0;
+ if (sd["LL_PART_SRC_PATTERN_DROP"]) mPattern |= LL_PART_SRC_PATTERN_DROP;
+ if (sd["LL_PART_SRC_PATTERN_EXPLODE"]) mPattern |= LL_PART_SRC_PATTERN_EXPLODE;
+ if (sd["LL_PART_SRC_PATTERN_ANGLE"]) mPattern |= LL_PART_SRC_PATTERN_ANGLE;
+ if (sd["LL_PART_SRC_PATTERN_ANGLE_CONE"]) mPattern |= LL_PART_SRC_PATTERN_ANGLE_CONE;
+ if (sd["LL_PART_SRC_PATTERN_ANGLE_CONE_EMPTY"]) mPattern |= LL_PART_SRC_PATTERN_ANGLE_CONE_EMPTY;
+
+ mInnerAngle = (F32)sd["InnerAngle"].asReal();
+ mOuterAngle = (F32)sd["OuterAngle"].asReal();
+ mAngularVelocity = ll_vector3_from_sd(sd["AngularVelocity"]);
+ mBurstRate = (F32)sd["BurstRate"].asReal();
+ int burst_part_count = sd["BurstPartCount"];
+ mBurstPartCount = (U8)burst_part_count;
+ mBurstSpeedMin = (F32)sd["BurstSpeedMin"].asReal();
+ mBurstSpeedMax = (F32)sd["BurstSpeedMax"].asReal();
+ mBurstRadius = (F32)sd["BurstRadius"].asReal();
+
+ mPartImageID = LLUUID(sd[("PartImageID")].asString());
+ mTargetUUID = LLUUID(sd["TargetId"].asString());
+
+ return true;
+}
\ No newline at end of file
diff --git a/linden/indra/llmessage/llpartdata.h b/linden/indra/llmessage/llpartdata.h
index 6dcb311..b7efa95 100644
--- a/linden/indra/llmessage/llpartdata.h
+++ b/linden/indra/llmessage/llpartdata.h
@@ -158,6 +158,9 @@ public:
BOOL unpackBlock(const S32 block_num);
BOOL packBlock();
+ LLSD asLLSD() const;
+ bool fromLLSD(LLSD& sd);
+
static BOOL packNull();
static BOOL isNullPS(const S32 block_num); // Returns FALSE if this is a "NULL" particle system (i.e. no system)
diff --git a/linden/indra/newview/app_settings/cloud.xml b/linden/indra/newview/app_settings/cloud.xml
new file mode 100644
index 0000000..ff9492b
--- /dev/null
+++ b/linden/indra/newview/app_settings/cloud.xml
@@ -0,0 +1,88 @@
+
+
+
diff --git a/linden/indra/newview/llviewermenu.cpp b/linden/indra/newview/llviewermenu.cpp
index 7f00382..c5d78d8 100644
--- a/linden/indra/newview/llviewermenu.cpp
+++ b/linden/indra/newview/llviewermenu.cpp
@@ -10666,6 +10666,20 @@ class LLAdvancedDumpAvatarLocalTextures : public view_listener_t
}
};
+///////////////////////////////////
+// Reload Avatar Cloud Particles //
+///////////////////////////////////
+
+
+class LLAdvancedReloadAvatarCloudParticle : public view_listener_t
+{
+ bool handleEvent(LLPointer event, const LLSD& userdata)
+ {
+ LLVOAvatar::initCloud();
+ return true;
+ }
+};
+
///////////
// Crash //
///////////
@@ -11453,6 +11467,7 @@ void initialize_menus()
addMenu(new LLAdvancedDumpAttachments(), "Advanced.DumpAttachments");
addMenu(new LLAdvancedDebugAvatarTextures(), "Advanced.DebugAvatarTextures");
addMenu(new LLAdvancedDumpAvatarLocalTextures(), "Advanced.DumpAvatarLocalTextures");
+ addMenu(new LLAdvancedReloadAvatarCloudParticle(), "Advanced.ReloadAvatarCloudParticle");
// Advanced > Crash
addMenu(new LLAdvancedCrash(), "Advanced.Crash");
diff --git a/linden/indra/newview/llviewerobject.cpp b/linden/indra/newview/llviewerobject.cpp
index a2be26a..65c1d11 100644
--- a/linden/indra/newview/llviewerobject.cpp
+++ b/linden/indra/newview/llviewerobject.cpp
@@ -4206,7 +4206,7 @@ void LLViewerObject::setParticleSource(const LLPartSysData& particle_parameters,
LLViewerImage* image;
if (mPartSourcep->mPartSysData.mPartImageID == LLUUID::null)
{
- image = gImageList.getImageFromFile("pixiesmall.tga");
+ image = gImageList.getImageFromFile("pixiesmall.j2c");
}
else
{
diff --git a/linden/indra/newview/llvoavatar.cpp b/linden/indra/newview/llvoavatar.cpp
index 6904bb2..35cabc1 100644
--- a/linden/indra/newview/llvoavatar.cpp
+++ b/linden/indra/newview/llvoavatar.cpp
@@ -1474,6 +1474,7 @@ void LLVOAvatar::initClass()
{
loadClientTags();
}
+ initCloud();
}
@@ -1489,6 +1490,21 @@ void LLVOAvatar::cleanupClass()
sXMLTree.cleanup();
}
+LLPartSysData LLVOAvatar::sCloud;
+void LLVOAvatar::initCloud()
+{
+ // fancy particle cloud designed by Brent
+
+ std::string filename = gDirUtilp->getExpandedFilename(LL_PATH_APP_SETTINGS, "cloud.xml");
+ LLSD cloud;
+ llifstream in_file(filename);
+ LLSDSerialize::fromXMLDocument(cloud, in_file);
+ sCloud.fromLLSD(cloud);
+ LLViewerImage* cloud_image = gImageList.getImageFromFile("cloud-particle.j2c");
+ sCloud.mPartImageID = cloud_image->getID();
+
+}
+
const LLVector3 LLVOAvatar::getRenderPosition() const
{
if (mDrawable.isNull() || mDrawable->getGeneration() < 0)
@@ -3070,34 +3086,7 @@ void LLVOAvatar::idleUpdateLoadingEffect()
}
else
{
- LLPartSysData particle_parameters;
-
- // fancy particle cloud designed by Brent
- particle_parameters.mPartData.mMaxAge = 4.f;
- particle_parameters.mPartData.mStartScale.mV[VX] = 0.8f;
- particle_parameters.mPartData.mStartScale.mV[VX] = 0.8f;
- particle_parameters.mPartData.mStartScale.mV[VY] = 1.0f;
- particle_parameters.mPartData.mEndScale.mV[VX] = 0.02f;
- particle_parameters.mPartData.mEndScale.mV[VY] = 0.02f;
- particle_parameters.mPartData.mStartColor = LLColor4(1, 1, 1, 0.5f);
- particle_parameters.mPartData.mEndColor = LLColor4(1, 1, 1, 0.0f);
- particle_parameters.mPartData.mStartScale.mV[VX] = 0.8f;
- LLViewerImage* cloud = gImageList.getImageFromFile("cloud-particle.j2c");
- particle_parameters.mPartImageID = cloud->getID();
- particle_parameters.mMaxAge = 0.f;
- particle_parameters.mPattern = LLPartSysData::LL_PART_SRC_PATTERN_ANGLE_CONE;
- particle_parameters.mInnerAngle = 3.14159f;
- particle_parameters.mOuterAngle = 0.f;
- particle_parameters.mBurstRate = 0.02f;
- particle_parameters.mBurstRadius = 0.0f;
- particle_parameters.mBurstPartCount = 1;
- particle_parameters.mBurstSpeedMin = 0.1f;
- particle_parameters.mBurstSpeedMax = 1.f;
- particle_parameters.mPartData.mFlags = ( LLPartData::LL_PART_INTERP_COLOR_MASK | LLPartData::LL_PART_INTERP_SCALE_MASK |
- LLPartData::LL_PART_EMISSIVE_MASK | // LLPartData::LL_PART_FOLLOW_SRC_MASK |
- LLPartData::LL_PART_TARGET_POS_MASK );
-
- setParticleSource(particle_parameters, getID());
+ setParticleSource(sCloud, getID());
}
}
}
diff --git a/linden/indra/newview/llvoavatar.h b/linden/indra/newview/llvoavatar.h
index 548818d..a23a9df 100644
--- a/linden/indra/newview/llvoavatar.h
+++ b/linden/indra/newview/llvoavatar.h
@@ -97,6 +97,7 @@ public:
static void initClass(); // Initialize data that's only init'd once per class.
static void cleanupClass(); // Cleanup data that's only init'd once per class.
static BOOL parseSkeletonFile(const std::string& filename);
+ static void initCloud();
virtual U32 processUpdateMessage(LLMessageSystem *mesgsys,
void **user_data,
U32 block_num,
@@ -582,6 +583,7 @@ public:
static F32 sLODFactor; // user-settable LOD factor
static BOOL sJointDebug; // output total number of joints being touched for each avatar
static BOOL sDebugAvatarRotation;
+ static LLPartSysData sCloud;
static S32 sNumVisibleAvatars; // Number of instances of this class
diff --git a/linden/indra/newview/skins/default/xui/en-us/menu_viewer.xml b/linden/indra/newview/skins/default/xui/en-us/menu_viewer.xml
index 31e730a..feeff0c 100644
--- a/linden/indra/newview/skins/default/xui/en-us/menu_viewer.xml
+++ b/linden/indra/newview/skins/default/xui/en-us/menu_viewer.xml
@@ -1965,6 +1965,13 @@
+
+
+
--
cgit v1.1
From b4959214023db77c6048036cc924075c4271ba74 Mon Sep 17 00:00:00 2001
From: Armin Weatherwax
Date: Tue, 4 Jan 2011 00:25:35 +0100
Subject: move streaming audio out of gAudiop into its own class.
* might solve several issues with streaming audio, like:
streaming audio not working when the sound effects driver fails.
* breaks fmod. Sorry. If you want fmod go fix it, its probably not difficult.
---
linden/indra/llaudio/llaudioengine.cpp | 79 -------------
linden/indra/llaudio/llaudioengine.h | 21 +---
linden/indra/llaudio/llstreamingaudio.h | 3 +-
linden/indra/newview/CMakeLists.txt | 2 +
linden/indra/newview/chatbar_as_cmdline.cpp | 4 +-
linden/indra/newview/kokuastreamingaudio.cpp | 129 +++++++++++++++++++++
linden/indra/newview/kokuastreamingaudio.h | 71 ++++++++++++
linden/indra/newview/llappviewer.cpp | 14 ++-
linden/indra/newview/lloverlaybar.cpp | 13 +--
linden/indra/newview/llstartup.cpp | 17 +--
linden/indra/newview/llvieweraudio.cpp | 125 ++++++++++----------
linden/indra/newview/llviewercontrol.cpp | 11 +-
.../indra/newview/llviewermedia_streamingaudio.cpp | 7 ++
.../indra/newview/llviewermedia_streamingaudio.h | 2 +
linden/indra/newview/llviewerparcelmgr.cpp | 18 +--
15 files changed, 318 insertions(+), 198 deletions(-)
create mode 100644 linden/indra/newview/kokuastreamingaudio.cpp
create mode 100644 linden/indra/newview/kokuastreamingaudio.h
diff --git a/linden/indra/llaudio/llaudioengine.cpp b/linden/indra/llaudio/llaudioengine.cpp
index bed791a..6b0003a 100644
--- a/linden/indra/llaudio/llaudioengine.cpp
+++ b/linden/indra/llaudio/llaudioengine.cpp
@@ -36,7 +36,6 @@
#include "linden_common.h"
#include "llaudioengine.h"
-#include "llstreamingaudio.h"
#include "llerror.h"
#include "llmath.h"
@@ -48,7 +47,6 @@
#include "llaudiodecodemgr.h"
#include "llassetstorage.h"
-
// necessary for grabbing sounds from sim (implemented in viewer)
extern void request_sound(const LLUUID &sound_guid);
@@ -70,16 +68,6 @@ LLAudioEngine::~LLAudioEngine()
{
}
-LLStreamingAudioInterface* LLAudioEngine::getStreamingAudioImpl()
-{
- return mStreamingAudioImpl;
-}
-
-void LLAudioEngine::setStreamingAudioImpl(LLStreamingAudioInterface *impl)
-{
- mStreamingAudioImpl = impl;
-}
-
void LLAudioEngine::setDefaults()
{
mMaxWindGain = 1.f;
@@ -108,8 +96,6 @@ void LLAudioEngine::setDefaults()
mInternalGain = 0.f;
mNextWindUpdate = 0.f;
- mStreamingAudioImpl = NULL;
-
for (U32 i = 0; i < LLAudioEngine::AUDIO_TYPE_COUNT; i++)
mSecondaryGain[i] = 1.0f;
}
@@ -174,62 +160,6 @@ void LLAudioEngine::shutdown()
}
}
-
-// virtual
-void LLAudioEngine::startInternetStream(const std::string& url)
-{
- if (mStreamingAudioImpl)
- mStreamingAudioImpl->start(url);
-}
-
-
-// virtual
-void LLAudioEngine::stopInternetStream()
-{
- if (mStreamingAudioImpl)
- mStreamingAudioImpl->stop();
-}
-
-// virtual
-void LLAudioEngine::pauseInternetStream(int pause)
-{
- if (mStreamingAudioImpl)
- mStreamingAudioImpl->pause(pause);
-}
-
-// virtual
-void LLAudioEngine::updateInternetStream()
-{
- if (mStreamingAudioImpl)
- mStreamingAudioImpl->update();
-}
-
-// virtual
-int LLAudioEngine::isInternetStreamPlaying()
-{
- if (mStreamingAudioImpl)
- return mStreamingAudioImpl->isPlaying();
-
- return 0; // Stopped
-}
-
-
-// virtual
-void LLAudioEngine::setInternetStreamGain(F32 vol)
-{
- if (mStreamingAudioImpl)
- mStreamingAudioImpl->setGain(vol);
-}
-
-// virtual
-std::string LLAudioEngine::getInternetStreamURL()
-{
- if (mStreamingAudioImpl)
- return mStreamingAudioImpl->getURL();
- else return std::string();
-}
-
-
void LLAudioEngine::updateChannels()
{
S32 i;
@@ -512,7 +442,6 @@ void LLAudioEngine::idle(F32 max_decode_time)
// or request new data.
startNextTransfer();
- updateInternetStream();
}
@@ -754,14 +683,6 @@ F32 LLAudioEngine::getSecondaryGain(S32 type)
return mSecondaryGain[type];
}
-F32 LLAudioEngine::getInternetStreamGain()
-{
- if (mStreamingAudioImpl)
- return mStreamingAudioImpl->getGain();
- else
- return 1.0f;
-}
-
void LLAudioEngine::setMaxWindGain(F32 gain)
{
mMaxWindGain = gain;
diff --git a/linden/indra/llaudio/llaudioengine.h b/linden/indra/llaudio/llaudioengine.h
index a1b240e..7237ce2 100644
--- a/linden/indra/llaudio/llaudioengine.h
+++ b/linden/indra/llaudio/llaudioengine.h
@@ -71,8 +71,6 @@ class LLAudioData;
class LLAudioChannel;
class LLAudioChannelOpenAL;
class LLAudioBuffer;
-class LLStreamingAudioInterface;
-
//
// LLAudioEngine definition
@@ -119,16 +117,13 @@ public:
// stops playing new sounds.
void setMuted(bool muted);
bool getMuted() const { return mMuted; }
-#ifdef USE_PLUGIN_MEDIA
- LLPluginClassMedia* initializeMedia(const std::string& media_type);
-#endif
+
F32 getMasterGain();
void setMasterGain(F32 gain);
F32 getSecondaryGain(S32 type);
void setSecondaryGain(S32 type, F32 gain);
- F32 getInternetStreamGain();
virtual void setDopplerFactor(F32 factor);
virtual F32 getDopplerFactor();
@@ -150,19 +145,6 @@ public:
LLAudioSource *findAudioSource(const LLUUID &source_id);
LLAudioData *getAudioData(const LLUUID &audio_uuid);
- // Internet stream implementation manipulation
- LLStreamingAudioInterface *getStreamingAudioImpl();
- void setStreamingAudioImpl(LLStreamingAudioInterface *impl);
- // Internet stream methods - these will call down into the *mStreamingAudioImpl if it exists
- void startInternetStream(const std::string& url);
- void stopInternetStream();
- void pauseInternetStream(int pause);
- void updateInternetStream(); // expected to be called often
- int isInternetStreamPlaying();
- // use a value from 0.0 to 1.0, inclusive
- void setInternetStreamGain(F32 vol);
- std::string getInternetStreamURL();
-
// For debugging usage
virtual LLVector3 getListenerPos();
@@ -247,7 +229,6 @@ protected:
private:
void setDefaults();
- LLStreamingAudioInterface *mStreamingAudioImpl;
};
diff --git a/linden/indra/llaudio/llstreamingaudio.h b/linden/indra/llaudio/llstreamingaudio.h
index aa89e6a..f5d5334 100644
--- a/linden/indra/llaudio/llstreamingaudio.h
+++ b/linden/indra/llaudio/llstreamingaudio.h
@@ -36,7 +36,7 @@
#include "stdtypes.h" // from llcommon
-// Entirely abstract. Based exactly on the historic API.
+// Entirely abstract. Based on the historic API.
class LLStreamingAudioInterface
{
public:
@@ -51,6 +51,7 @@ class LLStreamingAudioInterface
virtual void setGain(F32 vol) = 0;
virtual F32 getGain() = 0;
virtual std::string getURL() = 0;
+ virtual std::string getVersion() = 0;
};
#endif // LL_STREAMINGAUDIO_H
diff --git a/linden/indra/newview/CMakeLists.txt b/linden/indra/newview/CMakeLists.txt
index e6c1767..4a30be3 100644
--- a/linden/indra/newview/CMakeLists.txt
+++ b/linden/indra/newview/CMakeLists.txt
@@ -88,6 +88,7 @@ set(viewer_SOURCE_FILES
impprefsfonts.cpp
jcfloater_animation_list.cpp
jcfloaterareasearch.cpp
+ kokuastreamingaudio.cpp
kowopenregionsettings.cpp
lightshare.cpp
llagent.cpp
@@ -541,6 +542,7 @@ set(viewer_HEADER_FILES
impprefsfonts.h
jcfloater_animation_list.h
jcfloaterareasearch.h
+ kokuastreamingaudio.h
lightshare.h
lggautocorrectfloater.h
lggautocorrect.h
diff --git a/linden/indra/newview/chatbar_as_cmdline.cpp b/linden/indra/newview/chatbar_as_cmdline.cpp
index 0593091..b5a7e8c 100644
--- a/linden/indra/newview/chatbar_as_cmdline.cpp
+++ b/linden/indra/newview/chatbar_as_cmdline.cpp
@@ -69,7 +69,7 @@
#include "llviewerparcelmgr.h"
#include "llviewerparcelmedia.h"
#include "llparcel.h"
-#include "llaudioengine.h"
+#include "kokuastreamingaudio.h"
#include "llviewerparcelmediaautoplay.h"
#include "lloverlaybar.h"
#include "lggautocorrectfloater.h"
@@ -367,7 +367,7 @@ bool cmd_line_chat(std::string revised_text, EChatType type)
{
gOverlayBar->toggleMusicPlay(gOverlayBar);
}
- gAudiop->startInternetStream(status);
+ gAudioStream->startInternetStream(status);
return false;
}
}
diff --git a/linden/indra/newview/kokuastreamingaudio.cpp b/linden/indra/newview/kokuastreamingaudio.cpp
new file mode 100644
index 0000000..ed606db
--- /dev/null
+++ b/linden/indra/newview/kokuastreamingaudio.cpp
@@ -0,0 +1,129 @@
+ /**
+ * @file kokuastreamingaudio.cpp
+ * @brief Definition of KOKUAStreamingAudio base class for streaming audio support
+ *
+ * $LicenseInfo:firstyear=2011&license=viewergpl$
+ * Kokua Viewer Source Code
+ * Copyright (C) 2011, Armin.Weatherwax (at) googlemail.com
+ * for the Kokua Viewer Team, in special for our Imprudence Viewer.
+ *
+ * The source code in this file ("Source Code") is provided by the author
+ * to you under the terms of the GNU General Public License, version 2.0
+ * ("GPL"). Terms of the GPL can be found in doc/GPL-license.txt in this
+ * distribution, or online at
+ * http://secondlifegrid.net/programs/open_source/licensing/gplv2
+ *
+ * There are special exceptions to the terms and conditions of the GPL as
+ * it is applied to this Source Code. View the full text of the exception
+ * in the file doc/FLOSS-exception.txt in this software distribution, or
+ * online at
+ * http://secondlifegrid.net/programs/open_source/licensing/flossexception
+ *
+ * By copying, modifying or distributing this software, you acknowledge
+ * that you have read and understood your obligations described above,
+ * and agree to abide by those obligations.
+ *
+ * THIS SOURCE CODE IS PROVIDED "AS IS." THE AUTHOR MAKES NO
+ * WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY,
+ * COMPLETENESS OR PERFORMANCE.
+ *
+ * $/LicenseInfo$
+ */
+
+#include "kokuastreamingaudio.h"
+#include "llstreamingaudio.h"
+
+
+KOKUAStreamingAudio* gAudioStream = NULL;
+
+KOKUAStreamingAudio::KOKUAStreamingAudio(LLStreamingAudioInterface *impl) :
+mStreamingAudioImpl (impl)
+{
+
+}
+
+KOKUAStreamingAudio::~KOKUAStreamingAudio()
+{
+ if (mStreamingAudioImpl)
+ {
+ delete mStreamingAudioImpl;
+ mStreamingAudioImpl = NULL;
+ }
+}
+
+LLStreamingAudioInterface* KOKUAStreamingAudio::getStreamingAudioImpl()
+{
+ return mStreamingAudioImpl;
+}
+
+// void KOKUAStreamingAudio::setStreamingAudioImpl(LLStreamingAudioInterface *impl)
+// {
+// mStreamingAudioImpl = impl;
+// }
+
+// virtual
+void KOKUAStreamingAudio::startInternetStream(const std::string& url)
+{
+ if (mStreamingAudioImpl)
+ mStreamingAudioImpl->start(url);
+}
+
+// virtual
+void KOKUAStreamingAudio::stopInternetStream()
+{
+ if (mStreamingAudioImpl)
+ mStreamingAudioImpl->stop();
+}
+
+// virtual
+void KOKUAStreamingAudio::pauseInternetStream(int pause)
+{
+ if (mStreamingAudioImpl)
+ mStreamingAudioImpl->pause(pause);
+}
+
+// virtual
+void KOKUAStreamingAudio::updateInternetStream()
+{
+ if (mStreamingAudioImpl)
+ mStreamingAudioImpl->update();
+}
+
+// virtual
+KOKUAStreamingAudio::KOKUAAudioPlayState KOKUAStreamingAudio::isInternetStreamPlaying()
+{
+ if (mStreamingAudioImpl)
+ return (KOKUAStreamingAudio::KOKUAAudioPlayState) mStreamingAudioImpl->isPlaying();
+
+ return KOKUAStreamingAudio::AUDIO_STOPPED; // Stopped
+}
+
+// virtual
+void KOKUAStreamingAudio::setInternetStreamGain(F32 vol)
+{
+ if (mStreamingAudioImpl)
+ mStreamingAudioImpl->setGain(vol);
+}
+
+F32 KOKUAStreamingAudio::getInternetStreamGain()
+{
+ if (mStreamingAudioImpl)
+ return mStreamingAudioImpl->getGain();
+ else
+ return 1.0f;
+}
+
+// virtual
+std::string KOKUAStreamingAudio::getInternetStreamURL()
+{
+ if (mStreamingAudioImpl)
+ return mStreamingAudioImpl->getURL();
+ else return std::string();
+}
+
+std::string KOKUAStreamingAudio::getVersion()
+{
+ if (mStreamingAudioImpl)
+ return mStreamingAudioImpl->getVersion();
+ else return std::string();
+}
\ No newline at end of file
diff --git a/linden/indra/newview/kokuastreamingaudio.h b/linden/indra/newview/kokuastreamingaudio.h
new file mode 100644
index 0000000..eb49f25
--- /dev/null
+++ b/linden/indra/newview/kokuastreamingaudio.h
@@ -0,0 +1,71 @@
+/**
+ * @file kokuastreamingaudio.h
+ * @brief Definition of KOKUAStreamingAudio base class for streaming audio support
+ *
+ * $LicenseInfo:firstyear=2011&license=viewergpl$
+ * Kokua Viewer Source Code
+ * Copyright (C) 2011, Armin.Weatherwax (at) googlemail.com
+ * for the Kokua Viewer Team.
+ *
+ * The source code in this file ("Source Code") is provided by the author
+ * to you under the terms of the GNU General Public License, version 2.0
+ * ("GPL"). Terms of the GPL can be found in doc/GPL-license.txt in this
+ * distribution, or online at
+ * http://secondlifegrid.net/programs/open_source/licensing/gplv2
+ *
+ * There are special exceptions to the terms and conditions of the GPL as
+ * it is applied to this Source Code. View the full text of the exception
+ * in the file doc/FLOSS-exception.txt in this software distribution, or
+ * online at
+ * http://secondlifegrid.net/programs/open_source/licensing/flossexception
+ *
+ * By copying, modifying or distributing this software, you acknowledge
+ * that you have read and understood your obligations described above,
+ * and agree to abide by those obligations.
+ *
+ * THIS SOURCE CODE IS PROVIDED "AS IS." THE AUTHOR MAKES NO
+ * WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY,
+ * COMPLETENESS OR PERFORMANCE.
+ *
+ * $/LicenseInfo$
+ */
+#ifndef KOKUA_STREAMINGAUDIO_H
+#define KOKUA_STREAMINGAUDIO_H
+
+#include "linden_common.h"
+
+class LLStreamingAudioInterface;
+
+class KOKUAStreamingAudio
+{
+public:
+ enum KOKUAAudioPlayState
+ {
+ // isInternetStreamPlaying() returns an *int*, with
+ // 0 = stopped, 1 = playing, 2 = paused.
+ AUDIO_STOPPED = 0,
+ AUDIO_PLAYING = 1,
+ AUDIO_PAUSED = 2
+ };
+
+ KOKUAStreamingAudio(LLStreamingAudioInterface *impl);
+ virtual ~KOKUAStreamingAudio();
+
+ LLStreamingAudioInterface *getStreamingAudioImpl();
+// void setStreamingAudioImpl(LLStreamingAudioInterface *impl);
+ void startInternetStream(const std::string& url);
+ void stopInternetStream();
+ void pauseInternetStream(int pause);
+ void updateInternetStream();
+ KOKUAAudioPlayState isInternetStreamPlaying();
+ void setInternetStreamGain(F32 vol);
+ F32 getInternetStreamGain();
+ std::string getInternetStreamURL();
+ std::string getVersion();
+private:
+ LLStreamingAudioInterface *mStreamingAudioImpl;
+};
+
+extern KOKUAStreamingAudio* gAudioStream;
+
+#endif
diff --git a/linden/indra/newview/llappviewer.cpp b/linden/indra/newview/llappviewer.cpp
index 8aea221..eb03727 100644
--- a/linden/indra/newview/llappviewer.cpp
+++ b/linden/indra/newview/llappviewer.cpp
@@ -104,6 +104,7 @@
#include "llassetstorage.h"
#include "llpolymesh.h"
#include "llcachename.h"
+#include "kokuastreamingaudio.h"
#include "llaudioengine.h"
#include "llstreamingaudio.h"
#include "llviewermenu.h"
@@ -1278,14 +1279,17 @@ bool LLAppViewer::cleanup()
llinfos << "Global stuff deleted" << llendflush;
- if (gAudiop)
+ if (gAudioStream)
{
// shut down the streaming audio sub-subsystem first, in case it relies on not outliving the general audio subsystem.
- LLStreamingAudioInterface *sai = gAudiop->getStreamingAudioImpl();
+ LLStreamingAudioInterface *sai = gAudioStream->getStreamingAudioImpl();
delete sai;
- gAudiop->setStreamingAudioImpl(NULL);
+// gAudioStream->setStreamingAudioImpl(NULL);
+ }
+ if (gAudiop)
+ {
// shut down the audio subsystem
bool want_longname = false;
@@ -3732,6 +3736,10 @@ void LLAppViewer::idle()
const F32 max_audio_decode_time = 0.002f; // 2 ms decode time
gAudiop->idle(max_audio_decode_time);
}
+
+ // update streaming audio
+ if (gAudioStream)
+ gAudioStream->updateInternetStream();
}
diff --git a/linden/indra/newview/lloverlaybar.cpp b/linden/indra/newview/lloverlaybar.cpp
index ed406e8..4e1d03e 100644
--- a/linden/indra/newview/lloverlaybar.cpp
+++ b/linden/indra/newview/lloverlaybar.cpp
@@ -38,7 +38,7 @@
#include "lloverlaybar.h"
#include "aoremotectrl.h"
-#include "llaudioengine.h"
+#include "kokuastreamingaudio.h"
#include "llrender.h"
#include "llagent.h"
#include "llbutton.h"
@@ -438,17 +438,16 @@ void LLOverlayBar::toggleMusicPlay(void*)
if (gOverlayBar->mMusicState != PLAYING)
{
gOverlayBar->mMusicState = PLAYING; // desired state
- if (gAudiop)
+ if (gAudioStream)
{
LLParcel* parcel = LLViewerParcelMgr::getInstance()->getAgentParcel();
if ( parcel )
{
// this doesn't work properly when crossing parcel boundaries - even when the
// stream is stopped, it doesn't return the right thing - commenting out for now.
- // if ( gAudiop->isInternetStreamPlaying() == 0 )
+ // if ( gAudioStream->isInternetStreamPlaying() == 0 )
{
- gAudiop->startInternetStream(parcel->getMusicURL());
-//awfixme sTitleObserver.init(parcel->getMusicURL());
+ gAudioStream->startInternetStream(parcel->getMusicURL());
}
}
}
@@ -456,9 +455,9 @@ void LLOverlayBar::toggleMusicPlay(void*)
else
{
gOverlayBar->mMusicState = STOPPED; // desired state
- if (gAudiop)
+ if (gAudioStream)
{
- gAudiop->stopInternetStream();
+ gAudioStream->stopInternetStream();
}
}
}
diff --git a/linden/indra/newview/llstartup.cpp b/linden/indra/newview/llstartup.cpp
index b744961..0417f61 100644
--- a/linden/indra/newview/llstartup.cpp
+++ b/linden/indra/newview/llstartup.cpp
@@ -41,6 +41,7 @@
#endif
#include "llpluginclassmediaowner.h"
#include "llviewermedia_streamingaudio.h"
+#include "kokuastreamingaudio.h"
#include "llaudioengine.h"
#ifdef LL_FMOD
@@ -681,19 +682,13 @@ bool idle_startup()
delete gAudiop;
gAudiop = NULL;
}
-
- if (gAudiop)
- {
- // if the audio engine hasn't set up its own preferred handler for streaming audio then set up the generic streaming audio implementation which uses media plugins
- if (NULL == gAudiop->getStreamingAudioImpl())
- {
- LL_INFOS("AppInit") << "Using media plugins to render streaming audio" << LL_ENDL;
- gAudiop->setStreamingAudioImpl(new LLStreamingAudio_MediaPlugins());
- }
- }
}
}
-
+
+
+ if (!gAudioStream)
+ gAudioStream = new KOKUAStreamingAudio(new LLStreamingAudio_MediaPlugins());
+
LL_INFOS("AppInit") << "Audio Engine Initialized." << LL_ENDL;
diff --git a/linden/indra/newview/llvieweraudio.cpp b/linden/indra/newview/llvieweraudio.cpp
index 91e7ce5..d465177 100644
--- a/linden/indra/newview/llvieweraudio.cpp
+++ b/linden/indra/newview/llvieweraudio.cpp
@@ -33,6 +33,7 @@
#include "llviewerprecompiledheaders.h"
#include "llaudioengine.h"
+#include "kokuastreamingaudio.h"
#include "llagent.h"
#include "llappviewer.h"
#include "llvieweraudio.h"
@@ -46,69 +47,71 @@
void init_audio()
{
- if (!gAudiop)
+ if (gAudiop)
{
- llwarns << "Failed to create an appropriate Audio Engine" << llendl;
- return;
+ LLVector3d lpos_global = gAgent.getCameraPositionGlobal();
+ LLVector3 lpos_global_f;
+
+ lpos_global_f.setVec(lpos_global);
+
+ gAudiop->setListener(lpos_global_f,
+ LLVector3::zero, // LLViewerCamera::getInstance()->getVelocity(), // !!! BUG need to replace this with smoothed velocity!
+ LLViewerCamera::getInstance()->getUpAxis(),
+ LLViewerCamera::getInstance()->getAtAxis());
+
+ // load up our initial set of sounds we'll want so they're in memory and ready to be played
+
+ bool mute_audio = gSavedSettings.getBOOL("MuteAudio");
+
+ if (!mute_audio && FALSE == gSavedSettings.getBOOL("NoPreload"))
+ {
+ gAudiop->preloadSound(LLUUID(gSavedSettings.getString("UISndAlert")));
+ gAudiop->preloadSound(LLUUID(gSavedSettings.getString("UISndBadKeystroke")));
+ //gAudiop->preloadSound(LLUUID(gSavedSettings.getString("UISndChatFromObject")));
+ gAudiop->preloadSound(LLUUID(gSavedSettings.getString("UISndClick")));
+ gAudiop->preloadSound(LLUUID(gSavedSettings.getString("UISndClickRelease")));
+ gAudiop->preloadSound(LLUUID(gSavedSettings.getString("UISndHealthReductionF")));
+ gAudiop->preloadSound(LLUUID(gSavedSettings.getString("UISndHealthReductionM")));
+ //gAudiop->preloadSound(LLUUID(gSavedSettings.getString("UISndIncomingChat")));
+ //gAudiop->preloadSound(LLUUID(gSavedSettings.getString("UISndIncomingIM")));
+ //gAudiop->preloadSound(LLUUID(gSavedSettings.getString("UISndInvApplyToObject")));
+ gAudiop->preloadSound(LLUUID(gSavedSettings.getString("UISndInvalidOp")));
+ //gAudiop->preloadSound(LLUUID(gSavedSettings.getString("UISndInventoryCopyToInv")));
+ gAudiop->preloadSound(LLUUID(gSavedSettings.getString("UISndMoneyChangeDown")));
+ gAudiop->preloadSound(LLUUID(gSavedSettings.getString("UISndMoneyChangeUp")));
+ //gAudiop->preloadSound(LLUUID(gSavedSettings.getString("UISndObjectCopyToInv")));
+ gAudiop->preloadSound(LLUUID(gSavedSettings.getString("UISndObjectCreate")));
+ gAudiop->preloadSound(LLUUID(gSavedSettings.getString("UISndObjectDelete")));
+ gAudiop->preloadSound(LLUUID(gSavedSettings.getString("UISndObjectRezIn")));
+ gAudiop->preloadSound(LLUUID(gSavedSettings.getString("UISndObjectRezOut")));
+ gAudiop->preloadSound(LLUUID(gSavedSettings.getString("UISndPieMenuAppear")));
+ gAudiop->preloadSound(LLUUID(gSavedSettings.getString("UISndPieMenuHide")));
+ gAudiop->preloadSound(LLUUID(gSavedSettings.getString("UISndPieMenuSliceHighlight0")));
+ gAudiop->preloadSound(LLUUID(gSavedSettings.getString("UISndPieMenuSliceHighlight1")));
+ gAudiop->preloadSound(LLUUID(gSavedSettings.getString("UISndPieMenuSliceHighlight2")));
+ gAudiop->preloadSound(LLUUID(gSavedSettings.getString("UISndPieMenuSliceHighlight3")));
+ gAudiop->preloadSound(LLUUID(gSavedSettings.getString("UISndPieMenuSliceHighlight4")));
+ gAudiop->preloadSound(LLUUID(gSavedSettings.getString("UISndPieMenuSliceHighlight5")));
+ gAudiop->preloadSound(LLUUID(gSavedSettings.getString("UISndPieMenuSliceHighlight6")));
+ gAudiop->preloadSound(LLUUID(gSavedSettings.getString("UISndPieMenuSliceHighlight7")));
+ gAudiop->preloadSound(LLUUID(gSavedSettings.getString("UISndSnapshot")));
+ //gAudiop->preloadSound(LLUUID(gSavedSettings.getString("UISndStartAutopilot")));
+ //gAudiop->preloadSound(LLUUID(gSavedSettings.getString("UISndStartFollowpilot")));
+ gAudiop->preloadSound(LLUUID(gSavedSettings.getString("UISndStartIM")));
+ //gAudiop->preloadSound(LLUUID(gSavedSettings.getString("UISndStopAutopilot")));
+ gAudiop->preloadSound(LLUUID(gSavedSettings.getString("UISndTeleportOut")));
+ //gAudiop->preloadSound(LLUUID(gSavedSettings.getString("UISndTextureApplyToObject")));
+ //gAudiop->preloadSound(LLUUID(gSavedSettings.getString("UISndTextureCopyToInv")));
+ gAudiop->preloadSound(LLUUID(gSavedSettings.getString("UISndTyping")));
+ gAudiop->preloadSound(LLUUID(gSavedSettings.getString("UISndWindowClose")));
+ gAudiop->preloadSound(LLUUID(gSavedSettings.getString("UISndWindowOpen")));
+ }
}
- LLVector3d lpos_global = gAgent.getCameraPositionGlobal();
- LLVector3 lpos_global_f;
-
- lpos_global_f.setVec(lpos_global);
-
- gAudiop->setListener(lpos_global_f,
- LLVector3::zero, // LLViewerCamera::getInstance()->getVelocity(), // !!! BUG need to replace this with smoothed velocity!
- LLViewerCamera::getInstance()->getUpAxis(),
- LLViewerCamera::getInstance()->getAtAxis());
-
-// load up our initial set of sounds we'll want so they're in memory and ready to be played
-
- bool mute_audio = gSavedSettings.getBOOL("MuteAudio");
-
- if (!mute_audio && FALSE == gSavedSettings.getBOOL("NoPreload"))
+ else
{
- gAudiop->preloadSound(LLUUID(gSavedSettings.getString("UISndAlert")));
- gAudiop->preloadSound(LLUUID(gSavedSettings.getString("UISndBadKeystroke")));
- //gAudiop->preloadSound(LLUUID(gSavedSettings.getString("UISndChatFromObject")));
- gAudiop->preloadSound(LLUUID(gSavedSettings.getString("UISndClick")));
- gAudiop->preloadSound(LLUUID(gSavedSettings.getString("UISndClickRelease")));
- gAudiop->preloadSound(LLUUID(gSavedSettings.getString("UISndHealthReductionF")));
- gAudiop->preloadSound(LLUUID(gSavedSettings.getString("UISndHealthReductionM")));
- //gAudiop->preloadSound(LLUUID(gSavedSettings.getString("UISndIncomingChat")));
- //gAudiop->preloadSound(LLUUID(gSavedSettings.getString("UISndIncomingIM")));
- //gAudiop->preloadSound(LLUUID(gSavedSettings.getString("UISndInvApplyToObject")));
- gAudiop->preloadSound(LLUUID(gSavedSettings.getString("UISndInvalidOp")));
- //gAudiop->preloadSound(LLUUID(gSavedSettings.getString("UISndInventoryCopyToInv")));
- gAudiop->preloadSound(LLUUID(gSavedSettings.getString("UISndMoneyChangeDown")));
- gAudiop->preloadSound(LLUUID(gSavedSettings.getString("UISndMoneyChangeUp")));
- //gAudiop->preloadSound(LLUUID(gSavedSettings.getString("UISndObjectCopyToInv")));
- gAudiop->preloadSound(LLUUID(gSavedSettings.getString("UISndObjectCreate")));
- gAudiop->preloadSound(LLUUID(gSavedSettings.getString("UISndObjectDelete")));
- gAudiop->preloadSound(LLUUID(gSavedSettings.getString("UISndObjectRezIn")));
- gAudiop->preloadSound(LLUUID(gSavedSettings.getString("UISndObjectRezOut")));
- gAudiop->preloadSound(LLUUID(gSavedSettings.getString("UISndPieMenuAppear")));
- gAudiop->preloadSound(LLUUID(gSavedSettings.getString("UISndPieMenuHide")));
- gAudiop->preloadSound(LLUUID(gSavedSettings.getString("UISndPieMenuSliceHighlight0")));
- gAudiop->preloadSound(LLUUID(gSavedSettings.getString("UISndPieMenuSliceHighlight1")));
- gAudiop->preloadSound(LLUUID(gSavedSettings.getString("UISndPieMenuSliceHighlight2")));
- gAudiop->preloadSound(LLUUID(gSavedSettings.getString("UISndPieMenuSliceHighlight3")));
- gAudiop->preloadSound(LLUUID(gSavedSettings.getString("UISndPieMenuSliceHighlight4")));
- gAudiop->preloadSound(LLUUID(gSavedSettings.getString("UISndPieMenuSliceHighlight5")));
- gAudiop->preloadSound(LLUUID(gSavedSettings.getString("UISndPieMenuSliceHighlight6")));
- gAudiop->preloadSound(LLUUID(gSavedSettings.getString("UISndPieMenuSliceHighlight7")));
- gAudiop->preloadSound(LLUUID(gSavedSettings.getString("UISndSnapshot")));
- //gAudiop->preloadSound(LLUUID(gSavedSettings.getString("UISndStartAutopilot")));
- //gAudiop->preloadSound(LLUUID(gSavedSettings.getString("UISndStartFollowpilot")));
- gAudiop->preloadSound(LLUUID(gSavedSettings.getString("UISndStartIM")));
- //gAudiop->preloadSound(LLUUID(gSavedSettings.getString("UISndStopAutopilot")));
- gAudiop->preloadSound(LLUUID(gSavedSettings.getString("UISndTeleportOut")));
- //gAudiop->preloadSound(LLUUID(gSavedSettings.getString("UISndTextureApplyToObject")));
- //gAudiop->preloadSound(LLUUID(gSavedSettings.getString("UISndTextureCopyToInv")));
- gAudiop->preloadSound(LLUUID(gSavedSettings.getString("UISndTyping")));
- gAudiop->preloadSound(LLUUID(gSavedSettings.getString("UISndWindowClose")));
- gAudiop->preloadSound(LLUUID(gSavedSettings.getString("UISndWindowOpen")));
+ llwarns << "Failed to create an appropriate Audio Engine" << llendl;
+ return;
}
-
audio_update_volume(true);
}
@@ -158,12 +161,12 @@ void audio_update_volume(bool force_update)
}
// Streaming Music
- if (gAudiop)
+ if (gAudioStream)
{
F32 music_volume = gSavedSettings.getF32("AudioLevelMusic");
BOOL music_muted = gSavedSettings.getBOOL("MuteMusic");
music_volume = mute_volume * master_volume * (music_volume*music_volume);
- gAudiop->setInternetStreamGain ( music_muted ? 0.f : music_volume );
+ gAudioStream->setInternetStreamGain ( music_muted ? 0.f : music_volume );
}
diff --git a/linden/indra/newview/llviewercontrol.cpp b/linden/indra/newview/llviewercontrol.cpp
index 3675072..00e3a9a 100644
--- a/linden/indra/newview/llviewercontrol.cpp
+++ b/linden/indra/newview/llviewercontrol.cpp
@@ -38,7 +38,8 @@
#include "indra_constants.h"
// For Listeners
-#include "llaudioengine.h"
+// #include "llaudioengine.h"
+#include "kokuastreamingaudio.h"
#include "llagent.h"
#include "llconsole.h"
#include "lldrawpoolterrain.h"
@@ -310,7 +311,7 @@ static bool handleJoystickChanged(const LLSD& newvalue)
static bool handleAudioStreamMusicChanged(const LLSD& newvalue)
{
- if (gAudiop)
+ if (gAudioStream)
{
if ( newvalue.asBoolean() )
{
@@ -319,15 +320,15 @@ static bool handleAudioStreamMusicChanged(const LLSD& newvalue)
{
// if stream is already playing, don't call this
// otherwise music will briefly stop
- if ( !gAudiop->isInternetStreamPlaying() )
+ if ( !gAudioStream->isInternetStreamPlaying() )
{
- gAudiop->startInternetStream(LLViewerParcelMgr::getInstance()->getAgentParcel()->getMusicURL());
+ gAudioStream->startInternetStream(LLViewerParcelMgr::getInstance()->getAgentParcel()->getMusicURL());
}
}
}
else
{
- gAudiop->stopInternetStream();
+ gAudioStream->stopInternetStream();
}
}
return true;
diff --git a/linden/indra/newview/llviewermedia_streamingaudio.cpp b/linden/indra/newview/llviewermedia_streamingaudio.cpp
index 575dbc8..4bbc519 100644
--- a/linden/indra/newview/llviewermedia_streamingaudio.cpp
+++ b/linden/indra/newview/llviewermedia_streamingaudio.cpp
@@ -69,6 +69,8 @@ void LLStreamingAudio_MediaPlugins::start(const std::string& url)
llinfos << "mMediaPlugin is now " << mMediaPlugin << llendl;
}
+ mVersion = mMediaPlugin ? mMediaPlugin->getPluginVersion() : std::string();
+
if(!mMediaPlugin)
return;
@@ -156,6 +158,11 @@ std::string LLStreamingAudio_MediaPlugins::getURL()
return mURL;
}
+std::string LLStreamingAudio_MediaPlugins::getVersion()
+{
+ return mVersion;
+}
+
void LLStreamingAudio_MediaPlugins::handleMediaEvent(LLPluginClassMedia* self, EMediaEvent event)
{
if (event == MEDIA_EVENT_NAME_CHANGED)
diff --git a/linden/indra/newview/llviewermedia_streamingaudio.h b/linden/indra/newview/llviewermedia_streamingaudio.h
index 816e213..5802a31 100644
--- a/linden/indra/newview/llviewermedia_streamingaudio.h
+++ b/linden/indra/newview/llviewermedia_streamingaudio.h
@@ -56,6 +56,7 @@ class LLStreamingAudio_MediaPlugins :
/*virtual*/ void setGain(F32 vol);
/*virtual*/ F32 getGain();
/*virtual*/ std::string getURL();
+ /*virtual*/ std::string getVersion();
// inherited from LLPluginClassMediaOwner
/*virtual*/ void handleMediaEvent(LLPluginClassMedia* self, EMediaEvent event);
@@ -66,6 +67,7 @@ private:
LLPluginClassMedia *mMediaPlugin;
std::string mURL;
F32 mGain;
+ std::string mVersion;
};
diff --git a/linden/indra/newview/llviewerparcelmgr.cpp b/linden/indra/newview/llviewerparcelmgr.cpp
index b589f2e..630da54 100644
--- a/linden/indra/newview/llviewerparcelmgr.cpp
+++ b/linden/indra/newview/llviewerparcelmgr.cpp
@@ -35,7 +35,7 @@
#include "llviewerparcelmgr.h"
// Library includes
-#include "llaudioengine.h"
+#include "kokuastreamingaudio.h"
#include "indra_constants.h"
#include "llcachename.h"
#include "llgl.h"
@@ -1672,7 +1672,7 @@ void LLViewerParcelMgr::processParcelProperties(LLMessageSystem *msg, void **use
else
{
// look for music.
- if (gAudiop)
+ if (gAudioStream)
{
if (parcel)
{
@@ -1685,12 +1685,12 @@ void LLViewerParcelMgr::processParcelProperties(LLMessageSystem *msg, void **use
// On entering a new parcel, stop the last stream if the
// new parcel has a different music url. (Empty URL counts
// as different.)
- const std::string& stream_url = gAudiop->getInternetStreamURL();
+ const std::string& stream_url = gAudioStream->getInternetStreamURL();
if (music_url.empty() || music_url != stream_url)
{
// URL is different from one currently playing.
- gAudiop->stopInternetStream();
+ gAudioStream->stopInternetStream();
// If there is a new music URL and it's valid, play it.
if (music_url.size() > 12)
@@ -1700,19 +1700,19 @@ void LLViewerParcelMgr::processParcelProperties(LLMessageSystem *msg, void **use
optionally_start_music(music_url);
}
}
- else if (!gAudiop->getInternetStreamURL().empty())
+ else if (!gAudioStream->getInternetStreamURL().empty())
{
llinfos << "Stopping parcel music" << llendl;
- gAudiop->startInternetStream(LLStringUtil::null);
+ gAudioStream->startInternetStream(LLStringUtil::null);
}
}
}
else
{
// Public land has no music
- gAudiop->stopInternetStream();
+ gAudioStream->stopInternetStream();
}
- }//if gAudiop
+ }//if gAudioStream
// now check for video
LLViewerParcelMedia::update( parcel );
@@ -1730,7 +1730,7 @@ void optionally_start_music(const std::string& music_url)
// changed as part of SL-4878
if ( gOverlayBar && gOverlayBar->musicPlaying())
{
- gAudiop->startInternetStream(music_url);
+ gAudioStream->startInternetStream(music_url);
}
}
}
--
cgit v1.1
From b966dc6ad14b8a43768a081756c4a10e7faac849 Mon Sep 17 00:00:00 2001
From: Armin Weatherwax
Date: Tue, 4 Jan 2011 16:13:00 +0100
Subject: delete gAudioStream at shutdown.
---
linden/indra/newview/llappviewer.cpp | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
diff --git a/linden/indra/newview/llappviewer.cpp b/linden/indra/newview/llappviewer.cpp
index eb03727..36a53d0 100644
--- a/linden/indra/newview/llappviewer.cpp
+++ b/linden/indra/newview/llappviewer.cpp
@@ -1283,9 +1283,8 @@ bool LLAppViewer::cleanup()
{
// shut down the streaming audio sub-subsystem first, in case it relies on not outliving the general audio subsystem.
- LLStreamingAudioInterface *sai = gAudioStream->getStreamingAudioImpl();
- delete sai;
-// gAudioStream->setStreamingAudioImpl(NULL);
+ delete gAudioStream;
+ gAudioStream = NULL;
}
if (gAudiop)
--
cgit v1.1
From d89bfb3ec03e03df2b3e7ee1588e578bbc351161 Mon Sep 17 00:00:00 2001
From: Armin Weatherwax
Date: Tue, 4 Jan 2011 16:13:56 +0100
Subject: fix crash when linking objects using rubberband selection.
---
linden/indra/newview/llfloatertools.cpp | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/linden/indra/newview/llfloatertools.cpp b/linden/indra/newview/llfloatertools.cpp
index 0cb35e3..2aed361 100644
--- a/linden/indra/newview/llfloatertools.cpp
+++ b/linden/indra/newview/llfloatertools.cpp
@@ -1259,7 +1259,9 @@ void LLFloaterTools::onClickLink(void* data)
}
S32 max_linked_prims = 0;
- if(LLSelectMgr::getInstance()->getSelection()->getPrimaryObject()->usePhysics())
+
+ LLViewerObject* object = LLSelectMgr::getInstance()->getSelection()->getFirstRootObject();
+ if(object && object->usePhysics())
{
//Physical - use phys prim limit
max_linked_prims = gHippoLimits->getMaxPhysLinkedPrims();
--
cgit v1.1
From 282cb19508dcd38039454dfe71d23bb042fe376c Mon Sep 17 00:00:00 2001
From: Armin Weatherwax
Date: Thu, 20 Jan 2011 14:24:11 +0100
Subject: re-enable statistics packet for SL, firstuse warn about it
---
linden/indra/newview/app_settings/settings.xml | 11 +++++
linden/indra/newview/llappviewer.cpp | 27 ++++++-----
linden/indra/newview/llfirstuse.cpp | 28 ++++++++++++
linden/indra/newview/llfirstuse.h | 3 +-
linden/indra/newview/llstartup.cpp | 52 ++++++++++++++++++----
linden/indra/newview/llstartup.h | 4 +-
.../skins/default/xui/en-us/notifications.xml | 18 ++++++++
7 files changed, 122 insertions(+), 21 deletions(-)
diff --git a/linden/indra/newview/app_settings/settings.xml b/linden/indra/newview/app_settings/settings.xml
index c946f40..b7d6433 100644
--- a/linden/indra/newview/app_settings/settings.xml
+++ b/linden/indra/newview/app_settings/settings.xml
@@ -1330,6 +1330,17 @@
Value
1
+ WarnFirstPrivacy
+
WarnFirstVoiceLicense
- ParcelVoiceInfo
+
+ DisplayNameUpdate
+
+
+
+ ParcelVoiceInfo
+ SetDisplayNameReply
+
+
DirLandReply