Backout fd2494436720 to make room for fix from LL.

Nicky 2012-06-09 18:02:19 +02:00
parent 5bf91f9bc0
commit 47fe3acebb
3 changed files with 2 additions and 35 deletions

View File

@ -591,7 +591,6 @@ void LLAudioDecodeMgr::Impl::processQueue(const F32 num_secs)
LLAudioData *adp = gAudiop->getAudioData(mCurrentDecodep->getUUID());
adp->setHasDecodedData(TRUE);
adp->setHasValidData(TRUE);
adp->setHasDecodeRequestPending( false ); // <FS:ND/> All done, buffer can be used.
// 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
@ -601,14 +600,6 @@ void LLAudioDecodeMgr::Impl::processQueue(const F32 num_secs)
else
{
llinfos << "Vorbis decode failed!!!" << llendl;
// <FS:ND> Decode failed, mark audiodata as not waiting for decoded data, then it can be reused.
LLAudioData *adp = gAudiop->getAudioData(mCurrentDecodep->getUUID());
if( adp )
adp->setHasDecodeRequestPending( false );
// </FS:ND>
}
mCurrentDecodep = NULL;
}

View File

@ -1230,7 +1230,6 @@ void LLAudioEngine::assetCallback(LLVFS *vfs, const LLUUID &uuid, LLAssetType::E
adp->setHasValidData(false);
adp->setHasLocalData(false);
adp->setHasDecodedData(false);
adp->setHasDecodeRequestPending( false ); // <FS:ND> Buffer has no data, can be reused.
}
}
else
@ -1244,8 +1243,7 @@ void LLAudioEngine::assetCallback(LLVFS *vfs, const LLUUID &uuid, LLAssetType::E
else
{
adp->setHasValidData(true);
adp->setHasLocalData(true);
adp->setHasDecodeRequestPending( true ); // <FS:ND> Data must be decoded, wait for it.
adp->setHasLocalData(true);
gAudioDecodeMgrp->addDecodeRequest(uuid);
}
}
@ -1313,13 +1311,6 @@ void LLAudioSource::update()
{
if (getCurrentData())
{
// <FS:ND> Don't try to load if still waiting for decoded data. Otherwise load fails, mCorrupted gets set and we never get a sound played.
if( getCurrentData()->hasDecodeRequestPending() )
return;
// </FS:ND>
// Hack - try and load the sound. Will do this as a callback
// on decode later.
if (getCurrentData()->load() && getCurrentData()->getBuffer())
@ -1745,12 +1736,10 @@ LLAudioData::LLAudioData(const LLUUID &uuid) :
mBufferp(NULL),
mHasLocalData(false),
mHasDecodedData(false),
mHasValidData(true),
mHasDecodeRequest(true)
mHasValidData(true)
{
if (uuid.isNull())
{
mHasDecodeRequest = false;
// This is a null sound.
return;
}
@ -1760,14 +1749,10 @@ LLAudioData::LLAudioData(const LLUUID &uuid) :
// Already have a decoded version, don't need to decode it.
mHasLocalData = true;
mHasDecodedData = true;
mHasDecodeRequest = false;
}
else if (gAssetStorage && gAssetStorage->hasLocalAsset(uuid, LLAssetType::AT_SOUND))
{
mHasLocalData = true;
mHasDecodeRequest = false;
}
}

View File

@ -386,15 +386,6 @@ protected:
bool mHasLocalData;
bool mHasDecodedData;
bool mHasValidData;
// <FS:ND> Mark data as still waiting for being decoded.
public:
void setHasDecodeRequestPending( bool aRequestPending ) { mHasDecodeRequest = aRequestPending; }
bool hasDecodeRequestPending() const { return mHasDecodeRequest; }
private:
bool mHasDecodeRequest;
// </FS:ND>
};