summaryrefslogtreecommitdiff
path: root/indra/newview/llvieweraudio.h
diff options
context:
space:
mode:
authorNat Goodspeed <nat@lindenlab.com>2012-06-06 23:21:07 -0400
committerNat Goodspeed <nat@lindenlab.com>2012-06-06 23:21:07 -0400
commit89ea7ccfc7fd4c33eab4ad9123141fa40231a00d (patch)
treeaf2083dc9563abc8fa7a97100fc7766044d406e8 /indra/newview/llvieweraudio.h
parent3d1cb7ef111cbd5724262077702e0dc2a3d6998d (diff)
parenta519e34f02b4b2663fe082ba9ad12f1b423669cb (diff)
Automated merge with file:///Users/nat/linden/viewer-maint-1144
Diffstat (limited to 'indra/newview/llvieweraudio.h')
-rw-r--r--indra/newview/llvieweraudio.h47
1 files changed, 47 insertions, 0 deletions
diff --git a/indra/newview/llvieweraudio.h b/indra/newview/llvieweraudio.h
index e5916285fb..a3da9fc6b8 100644
--- a/indra/newview/llvieweraudio.h
+++ b/indra/newview/llvieweraudio.h
@@ -27,6 +27,9 @@
#ifndef LL_VIEWERAUDIO_H
#define LL_VIEWERAUDIO_H
+#include "llframetimer.h"
+#include "llsingleton.h"
+
// comment out to turn off wind
#define kAUDIO_ENABLE_WIND
//#define kAUDIO_ENABLE_WATER 1 // comment out to turn off water
@@ -38,4 +41,48 @@ void audio_update_volume(bool force_update = true);
void audio_update_listener();
void audio_update_wind(bool force_update = true);
+class LLViewerAudio : public LLSingleton<LLViewerAudio>
+{
+public:
+
+ enum EFadeState
+ {
+ FADE_IDLE,
+ FADE_IN,
+ FADE_OUT,
+ };
+
+ LLViewerAudio();
+ virtual ~LLViewerAudio();
+
+ void startInternetStreamWithAutoFade(std::string streamURI);
+ void stopInternetStreamWithAutoFade();
+
+ bool onIdleUpdate();
+
+ EFadeState getFadeState() { return mFadeState; }
+ bool isDone() { return mDone; };
+ F32 getFadeVolume();
+ bool getForcedTeleportFade() { return mForcedTeleportFade; };
+ void setForcedTeleportFade(bool fade) { mForcedTeleportFade = fade;} ;
+ void setNextStreamURI(std::string stream) { mNextStreamURI = stream; } ;
+
+private:
+
+ bool mDone;
+ F32 mFadeTime;
+ std::string mNextStreamURI;
+ EFadeState mFadeState;
+ LLFrameTimer stream_fade_timer;
+ bool mIdleListnerActive;
+ bool mForcedTeleportFade;
+ boost::signals2::connection mTeleportFailedConnection;
+
+ void registerIdleListener();
+ void deregisterIdleListener() { mIdleListnerActive = false; };
+ void startFading();
+ void onTeleportFailed();
+
+};
+
#endif //LL_VIEWER_H