FIRE-480: Opening multiple instances causes sound failures; Based on a patch by Jules Joffe contributed to https://jira.secondlife.com/browse/VWR-10592 but heavily modified to make it really work

master
Ansariel 2015-04-11 11:18:01 +02:00
parent acfd7840f7
commit f14da991e1
2 changed files with 19 additions and 1 deletions

View File

@ -699,7 +699,14 @@ BOOL LLAudioDecodeMgr::addDecodeRequest(const LLUUID &uuid)
{
// Just put it on the decode queue.
LL_DEBUGS("AudioEngine") << "addDecodeRequest for " << uuid << " has local asset file already" << LL_ENDL;
mImpl->mDecodeQueue.push_back(uuid);
// <FS:Ansariel> FIRE-480: Opening multiple instances causes sound failures
//mImpl->mDecodeQueue.push_back(uuid);
// ...only add it if it's note already in the queue
if (std::find(mImpl->mDecodeQueue.begin(), mImpl->mDecodeQueue.end(), uuid) == mImpl->mDecodeQueue.end())
{
mImpl->mDecodeQueue.push_back(uuid);
}
// </FS:Ansariel>
return TRUE;
}

View File

@ -1961,6 +1961,17 @@ bool LLAudioData::load()
gAudiop->cleanupBuffer(mBufferp);
mBufferp = NULL;
// <FS:Ansariel> FIRE-480: Opening multiple instances causes sound failures
if (!gDirUtilp->fileExists(wav_path))
{
mHasLocalData = false;
mHasDecodedData = false;
mHasCompletedDecode = false;
mHasValidData = true;
gAudiop->preloadSound(mID);
}
// </FS:Ansariel>
return false;
}
mBufferp->mAudioDatap = this;