diff options
author | Todd Stinson <stinson@lindenlab.com> | 2012-06-22 18:59:31 -0700 |
---|---|---|
committer | Todd Stinson <stinson@lindenlab.com> | 2012-06-22 18:59:31 -0700 |
commit | 6e710333e7ea08a79c401ae54d063d8ef608f99a (patch) | |
tree | ff0dbcf29032ff9da18c8d86be7dd622ed180583 /indra/llaudio/llaudiodecodemgr.cpp | |
parent | 7cc44fb7fe40706e2017343d76ed226f477dad8d (diff) | |
parent | 90547ff411db177bf6424ca553449a81a808fc0f (diff) |
Pull and merge from ssh://hg@bitbucket.org/lindenlab/viewer-release.
Diffstat (limited to 'indra/llaudio/llaudiodecodemgr.cpp')
-rw-r--r-- | indra/llaudio/llaudiodecodemgr.cpp | 22 |
1 files changed, 16 insertions, 6 deletions
diff --git a/indra/llaudio/llaudiodecodemgr.cpp b/indra/llaudio/llaudiodecodemgr.cpp index 7f747c2eca..6c97a64ed7 100644 --- a/indra/llaudio/llaudiodecodemgr.cpp +++ b/indra/llaudio/llaudiodecodemgr.cpp @@ -571,7 +571,8 @@ void LLAudioDecodeMgr::Impl::processQueue(const F32 num_secs) llwarns << mCurrentDecodep->getUUID() << " has invalid vorbis data, aborting decode" << llendl; mCurrentDecodep->flushBadFile(); LLAudioData *adp = gAudiop->getAudioData(mCurrentDecodep->getUUID()); - adp->setHasValidData(FALSE); + adp->setHasValidData(false); + adp->setHasCompletedDecode(true); mCurrentDecodep = NULL; done = TRUE; } @@ -586,11 +587,16 @@ void LLAudioDecodeMgr::Impl::processQueue(const F32 num_secs) if (mCurrentDecodep->finishDecode()) { // We finished! - if (mCurrentDecodep->isValid() && mCurrentDecodep->isDone()) + LLAudioData *adp = gAudiop->getAudioData(mCurrentDecodep->getUUID()); + if (!adp) { - LLAudioData *adp = gAudiop->getAudioData(mCurrentDecodep->getUUID()); - adp->setHasDecodedData(TRUE); - adp->setHasValidData(TRUE); + llwarns << "Missing LLAudioData for decode of " << mCurrentDecodep->getUUID() << llendl; + } + else if (mCurrentDecodep->isValid() && mCurrentDecodep->isDone()) + { + adp->setHasCompletedDecode(true); + adp->setHasDecodedData(true); + adp->setHasValidData(true); // At this point, we could see if anyone needs this sound immediately, but // I'm not sure that there's a reason to - we need to poll all of the playing @@ -599,7 +605,8 @@ void LLAudioDecodeMgr::Impl::processQueue(const F32 num_secs) } else { - llinfos << "Vorbis decode failed!!!" << llendl; + adp->setHasCompletedDecode(true); + llinfos << "Vorbis decode failed for " << mCurrentDecodep->getUUID() << llendl; } mCurrentDecodep = NULL; } @@ -667,16 +674,19 @@ BOOL LLAudioDecodeMgr::addDecodeRequest(const LLUUID &uuid) if (gAudiop->hasDecodedFile(uuid)) { // Already have a decoded version, don't need to decode it. + //llinfos << "addDecodeRequest for " << uuid << " has decoded file already" << llendl; return TRUE; } if (gAssetStorage->hasLocalAsset(uuid, LLAssetType::AT_SOUND)) { // Just put it on the decode queue. + //llinfos << "addDecodeRequest for " << uuid << " has local asset file already" << llendl; mImpl->mDecodeQueue.push(uuid); return TRUE; } + //llinfos << "addDecodeRequest for " << uuid << " no file available" << llendl; return FALSE; } |