summaryrefslogtreecommitdiff
path: root/indra/newview/llviewermedia.cpp
diff options
context:
space:
mode:
authorJonathan Yap <none@none>2011-10-28 17:48:24 -0400
committerJonathan Yap <none@none>2011-10-28 17:48:24 -0400
commit4cdf3961253b49093bf3e2fceda0099cedef4295 (patch)
tree8854004b22e6a8dcd980d30d84bd94c96f67f2eb /indra/newview/llviewermedia.cpp
parent1b173ed82b65c7bb5f5d5294847a721b64f8cf35 (diff)
STORM-591 As a music fan, I want audio to fade in gently so my immersion is increased
Co-written with Robin Cornelius
Diffstat (limited to 'indra/newview/llviewermedia.cpp')
-rw-r--r--indra/newview/llviewermedia.cpp22
1 files changed, 16 insertions, 6 deletions
diff --git a/indra/newview/llviewermedia.cpp b/indra/newview/llviewermedia.cpp
index 41b4dc01e8..148bfbf080 100644
--- a/indra/newview/llviewermedia.cpp
+++ b/indra/newview/llviewermedia.cpp
@@ -66,7 +66,7 @@
//#include "llfirstuse.h"
#include "llviewernetwork.h"
#include "llwindow.h"
-
+#include "llvieweraudio.h"
#include "llfloatermediabrowser.h" // for handling window close requests and geometry change requests in media browser windows.
#include "llfloaterwebcontent.h" // for handling window close requests and geometry change requests in media browser windows.
@@ -967,7 +967,7 @@ void LLViewerMedia::updateMedia(void *dummy_arg)
{
if(LLViewerMedia::isParcelAudioPlaying() && gAudiop && LLViewerMedia::hasParcelAudio())
{
- gAudiop->stopInternetStream();
+ LLViewerAudio::getInstance()->stopInternetStreamWithAutoFade();
}
}
pimpl->setPriority(new_priority);
@@ -1069,13 +1069,24 @@ void LLViewerMedia::setAllMediaEnabled(bool val)
gAudiop &&
LLViewerMedia::hasParcelAudio())
{
- gAudiop->startInternetStream(LLViewerMedia::getParcelAudioURL());
+ if (LLAudioEngine::AUDIO_PAUSED == gAudiop->isInternetStreamPlaying())
+ {
+ // 'false' means unpause
+ gAudiop->pauseInternetStream(false);
+ }
+ else
+ {
+ LLViewerAudio::getInstance()->startInternetStreamWithAutoFade(LLViewerMedia::getParcelAudioURL());
+ }
}
}
else {
// This actually unloads the impl, as opposed to "stop"ping the media
LLViewerParcelMedia::stop();
- if (gAudiop) gAudiop->stopInternetStream();
+ if (gAudiop)
+ {
+ LLViewerAudio::getInstance()->stopInternetStreamWithAutoFade();
+ }
}
}
@@ -1488,8 +1499,7 @@ void LLViewerMedia::setOpenIDCookie()
new LLViewerMediaWebProfileResponder(raw_profile_url.getAuthority()),
headers);
- // FUI: No longer perform the user_status query
- //doOnetimeEarlyHTTPRequests();
+ doOnetimeEarlyHTTPRequests();
}
}