summaryrefslogtreecommitdiff
path: root/indra/llaudio/llaudioengine.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'indra/llaudio/llaudioengine.cpp')
-rwxr-xr-xindra/llaudio/llaudioengine.cpp28
1 files changed, 19 insertions, 9 deletions
diff --git a/indra/llaudio/llaudioengine.cpp b/indra/llaudio/llaudioengine.cpp
index 399333d994..29c492c427 100755
--- a/indra/llaudio/llaudioengine.cpp
+++ b/indra/llaudio/llaudioengine.cpp
@@ -123,7 +123,7 @@ bool LLAudioEngine::init(const S32 num_channels, void* userdata)
// Initialize the decode manager
gAudioDecodeMgrp = new LLAudioDecodeMgr;
- LL_INFOS() << "LLAudioEngine::init() AudioEngine successfully initialized" << LL_ENDL;
+ LL_INFOS("AudioEngine") << "LLAudioEngine::init() AudioEngine successfully initialized" << LL_ENDL;
return true;
}
@@ -673,6 +673,8 @@ void LLAudioEngine::cleanupBuffer(LLAudioBuffer *bufferp)
bool LLAudioEngine::preloadSound(const LLUUID &uuid)
{
+ LL_DEBUGS("AudioEngine")<<"( "<<uuid<<" )"<<LL_ENDL;
+
gAudiop->getAudioData(uuid); // We don't care about the return value, this is just to make sure
// that we have an entry, which will mean that the audio engine knows about this
@@ -684,7 +686,7 @@ bool LLAudioEngine::preloadSound(const LLUUID &uuid)
// At some point we need to have the audio/asset system check the static VFS
// before it goes off and fetches stuff from the server.
- //LL_WARNS() << "Used internal preload for non-local sound" << LL_ENDL;
+ //llwarns << "Used internal preload for non-local sound" << LL_ENDL;
return false;
}
@@ -985,9 +987,13 @@ void LLAudioEngine::cleanupAudioSource(LLAudioSource *asp)
LL_WARNS() << "Cleaning up unknown audio source!" << LL_ENDL;
return;
}
+ else
+ {
+ LL_DEBUGS("AudioEngine") << "Cleaning up audio sources for "<< asp->getID() <<LL_ENDL;
delete asp;
mAllSources.erase(iter);
}
+}
bool LLAudioEngine::hasDecodedFile(const LLUUID &uuid)
@@ -1013,7 +1019,9 @@ bool LLAudioEngine::hasDecodedFile(const LLUUID &uuid)
bool LLAudioEngine::hasLocalFile(const LLUUID &uuid)
{
// See if it's in the VFS.
- return gVFS->getExists(uuid, LLAssetType::AT_SOUND);
+ bool have_local = gVFS->getExists(uuid, LLAssetType::AT_SOUND);
+ LL_DEBUGS("AudioEngine") << "sound uuid "<<uuid<<" exists in VFS"<<LL_ENDL;
+ return have_local;
}
@@ -1238,7 +1246,7 @@ void LLAudioEngine::assetCallback(LLVFS *vfs, const LLUUID &uuid, LLAssetType::E
if (!adp)
{
// Should never happen
- LL_WARNS() << "Got asset callback without audio data for " << uuid << LL_ENDL;
+ llwarns << "Got asset callback without audio data for " << uuid << LL_ENDL;
}
else
{
@@ -1321,7 +1329,7 @@ void LLAudioSource::update()
}
else if (adp->hasCompletedDecode()) // Only mark corrupted after decode is done
{
- LL_WARNS() << "Marking LLAudioSource corrupted for " << adp->getID() << LL_ENDL;
+ llwarns << "Marking LLAudioSource corrupted for " << adp->getID() << LL_ENDL;
mCorrupted = true ;
}
}
@@ -1357,7 +1365,7 @@ bool LLAudioSource::setupChannel()
if (!adp->getBuffer())
{
// We're not ready to play back the sound yet, so don't try and allocate a channel for it.
- //LL_WARNS() << "Aborting, no buffer" << LL_ENDL;
+ //llwarns << "Aborting, no buffer" << LL_ENDL;
return false;
}
@@ -1375,7 +1383,7 @@ bool LLAudioSource::setupChannel()
// Ugh, we don't have any free channels.
// Now we have to reprioritize.
// For now, just don't play the sound.
- //LL_WARNS() << "Aborting, no free channels" << LL_ENDL;
+ //llwarns << "Aborting, no free channels" << LL_ENDL;
return false;
}
@@ -1660,8 +1668,10 @@ void LLAudioChannel::setSource(LLAudioSource *sourcep)
cleanup();
mCurrentSourcep = NULL;
mWaiting = false;
- return;
}
+ else
+ {
+ LL_DEBUGS("AudioEngine") << "( id: " << sourcep->getID() << ")" << LL_ENDL;
if (sourcep == mCurrentSourcep)
{
@@ -1671,10 +1681,10 @@ void LLAudioChannel::setSource(LLAudioSource *sourcep)
mCurrentSourcep = sourcep;
-
updateBuffer();
update3DPosition();
}
+}
bool LLAudioChannel::updateBuffer()