From ffd962f3a3eafd7b65f90039a5bb04dccb0205bc Mon Sep 17 00:00:00 2001 From: Rick Pasetto Date: Fri, 12 Feb 2010 13:38:17 -0800 Subject: EXT-5267 EXT-5268: Add Parcel Media and Parcel Audio items to nearby media panel Review #109 This (fairly major) change adds new "items" to the media list for Parcel Media and Parcel Audio. Since these items are special (before the items were always MoaP impls), they had to be treated special. Moreover, actions on all of "media" had to be centralized so that they would have similar behavior. --- indra/llaudio/llaudioengine.cpp | 6 +++--- indra/llaudio/llaudioengine.h | 11 ++++++++++- 2 files changed, 13 insertions(+), 4 deletions(-) (limited to 'indra/llaudio') diff --git a/indra/llaudio/llaudioengine.cpp b/indra/llaudio/llaudioengine.cpp index a28c94d00d..ed06c85e1a 100644 --- a/indra/llaudio/llaudioengine.cpp +++ b/indra/llaudio/llaudioengine.cpp @@ -202,12 +202,12 @@ void LLAudioEngine::updateInternetStream() } // virtual -int LLAudioEngine::isInternetStreamPlaying() +LLAudioEngine::LLAudioPlayState LLAudioEngine::isInternetStreamPlaying() { if (mStreamingAudioImpl) - return mStreamingAudioImpl->isPlaying(); + return (LLAudioEngine::LLAudioPlayState) mStreamingAudioImpl->isPlaying(); - return 0; // Stopped + return LLAudioEngine::AUDIO_STOPPED; // Stopped } diff --git a/indra/llaudio/llaudioengine.h b/indra/llaudio/llaudioengine.h index 457fd93abe..d287104204 100644 --- a/indra/llaudio/llaudioengine.h +++ b/indra/llaudio/llaudioengine.h @@ -91,6 +91,15 @@ public: AUDIO_TYPE_COUNT = 4 // last }; + enum LLAudioPlayState + { + // isInternetStreamPlaying() returns an *int*, with + // 0 = stopped, 1 = playing, 2 = paused. + AUDIO_STOPPED = 0, + AUDIO_PLAYING = 1, + AUDIO_PAUSED = 2 + }; + LLAudioEngine(); virtual ~LLAudioEngine(); @@ -156,7 +165,7 @@ public: void stopInternetStream(); void pauseInternetStream(int pause); void updateInternetStream(); // expected to be called often - int isInternetStreamPlaying(); + LLAudioPlayState isInternetStreamPlaying(); // use a value from 0.0 to 1.0, inclusive void setInternetStreamGain(F32 vol); std::string getInternetStreamURL(); -- cgit v1.2.3