diff options
Diffstat (limited to 'indra/llaudio')
-rw-r--r-- | indra/llaudio/llaudiodecodemgr.cpp | 2 | ||||
-rw-r--r-- | indra/llaudio/llaudioengine.cpp | 6 | ||||
-rw-r--r-- | indra/llaudio/llaudioengine.h | 11 | ||||
-rw-r--r-- | indra/llaudio/llstreamingaudio_fmod.cpp | 2 |
4 files changed, 16 insertions, 5 deletions
diff --git a/indra/llaudio/llaudiodecodemgr.cpp b/indra/llaudio/llaudiodecodemgr.cpp index 6bbaad9cef..290206ee22 100644 --- a/indra/llaudio/llaudiodecodemgr.cpp +++ b/indra/llaudio/llaudiodecodemgr.cpp @@ -181,6 +181,8 @@ LLVorbisDecodeState::LLVorbisDecodeState(const LLUUID &uuid, const std::string & mFileHandle = LLLFSThread::nullHandle(); #endif // No default value for mVF, it's an ogg structure? + // Hey, let's zero it anyway, for predictability. + memset(&mVF, 0, sizeof(mVF)); } LLVorbisDecodeState::~LLVorbisDecodeState() 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(); diff --git a/indra/llaudio/llstreamingaudio_fmod.cpp b/indra/llaudio/llstreamingaudio_fmod.cpp index a71a87203c..a4620fa13c 100644 --- a/indra/llaudio/llstreamingaudio_fmod.cpp +++ b/indra/llaudio/llstreamingaudio_fmod.cpp @@ -174,7 +174,7 @@ void LLStreamingAudio_FMOD::update() break; case -3: // failed to open, file not found, perhaps - llwarns << "InternetSteam - failed to open" << llendl; + llwarns << "InternetStream - failed to open" << llendl; stop(); return; case -4: |