summaryrefslogtreecommitdiff
path: root/indra/llaudio
diff options
context:
space:
mode:
Diffstat (limited to 'indra/llaudio')
-rwxr-xr-xindra/llaudio/llaudiodecodemgr.cpp73
-rwxr-xr-xindra/llaudio/llaudiodecodemgr.h1
-rwxr-xr-xindra/llaudio/llaudioengine.cpp52
-rwxr-xr-xindra/llaudio/llaudioengine.h4
-rw-r--r--indra/llaudio/llaudioengine_fmodex.cpp30
-rwxr-xr-xindra/llaudio/llaudioengine_openal.cpp74
-rwxr-xr-xindra/llaudio/lllistener_openal.cpp10
-rw-r--r--indra/llaudio/llstreamingaudio_fmodex.cpp26
-rw-r--r--indra/llaudio/llstreamingaudio_fmodex.h4
-rwxr-xr-xindra/llaudio/llvorbisencode.cpp20
10 files changed, 148 insertions, 146 deletions
diff --git a/indra/llaudio/llaudiodecodemgr.cpp b/indra/llaudio/llaudiodecodemgr.cpp
index 6c97a64ed7..79eb58d24d 100755
--- a/indra/llaudio/llaudiodecodemgr.cpp
+++ b/indra/llaudio/llaudiodecodemgr.cpp
@@ -40,6 +40,8 @@
#include "vorbis/codec.h"
#include "vorbis/vorbisfile.h"
+#include <iterator>
+#include <deque>
extern LLAudioEngine *gAudiop;
@@ -113,7 +115,7 @@ size_t vfs_read(void *ptr, size_t size, size_t nmemb, void *datasource)
}
}
-int vfs_seek(void *datasource, ogg_int64_t offset, int whence)
+S32 vfs_seek(void *datasource, ogg_int64_t offset, S32 whence)
{
LLVFile *file = (LLVFile *)datasource;
@@ -135,7 +137,7 @@ int vfs_seek(void *datasource, ogg_int64_t offset, int whence)
origin = -1;
break;
default:
- llerrs << "Invalid whence argument to vfs_seek" << llendl;
+ LL_ERRS() << "Invalid whence argument to vfs_seek" << LL_ENDL;
return -1;
}
@@ -149,7 +151,7 @@ int vfs_seek(void *datasource, ogg_int64_t offset, int whence)
}
}
-int vfs_close (void *datasource)
+S32 vfs_close (void *datasource)
{
LLVFile *file = (LLVFile *)datasource;
delete file;
@@ -197,21 +199,21 @@ BOOL LLVorbisDecodeState::initDecode()
vfs_callbacks.close_func = vfs_close;
vfs_callbacks.tell_func = vfs_tell;
- //llinfos << "Initing decode from vfile: " << mUUID << llendl;
+ //LL_INFOS() << "Initing decode from vfile: " << mUUID << LL_ENDL;
mInFilep = new LLVFile(gVFS, mUUID, LLAssetType::AT_SOUND);
if (!mInFilep || !mInFilep->getSize())
{
- llwarns << "unable to open vorbis source vfile for reading" << llendl;
+ LL_WARNS() << "unable to open vorbis source vfile for reading" << LL_ENDL;
delete mInFilep;
mInFilep = NULL;
return FALSE;
}
- int r = ov_open_callbacks(mInFilep, &mVF, NULL, 0, vfs_callbacks);
+ S32 r = ov_open_callbacks(mInFilep, &mVF, NULL, 0, vfs_callbacks);
if(r < 0)
{
- llwarns << r << " Input to vorbis decode does not appear to be an Ogg bitstream: " << mUUID << llendl;
+ LL_WARNS() << r << " Input to vorbis decode does not appear to be an Ogg bitstream: " << mUUID << LL_ENDL;
return(FALSE);
}
@@ -229,36 +231,36 @@ BOOL LLVorbisDecodeState::initDecode()
if( vi->channels < 1 || vi->channels > LLVORBIS_CLIP_MAX_CHANNELS )
{
abort_decode = true;
- llwarns << "Bad channel count: " << vi->channels << llendl;
+ LL_WARNS() << "Bad channel count: " << vi->channels << LL_ENDL;
}
}
else // !vi
{
abort_decode = true;
- llwarns << "No default bitstream found" << llendl;
+ LL_WARNS() << "No default bitstream found" << LL_ENDL;
}
if( (size_t)sample_count > LLVORBIS_CLIP_REJECT_SAMPLES ||
(size_t)sample_count <= 0)
{
abort_decode = true;
- llwarns << "Illegal sample count: " << sample_count << llendl;
+ LL_WARNS() << "Illegal sample count: " << sample_count << LL_ENDL;
}
if( size_guess > LLVORBIS_CLIP_REJECT_SIZE ||
size_guess < 0)
{
abort_decode = true;
- llwarns << "Illegal sample size: " << size_guess << llendl;
+ LL_WARNS() << "Illegal sample size: " << size_guess << LL_ENDL;
}
if( abort_decode )
{
- llwarns << "Canceling initDecode. Bad asset: " << mUUID << llendl;
+ LL_WARNS() << "Canceling initDecode. Bad asset: " << mUUID << LL_ENDL;
vorbis_comment* comment = ov_comment(&mVF,-1);
if (comment && comment->vendor)
{
- llwarns << "Bad asset encoded by: " << comment->vendor << llendl;
+ LL_WARNS() << "Bad asset encoded by: " << comment->vendor << LL_ENDL;
}
delete mInFilep;
mInFilep = NULL;
@@ -359,12 +361,12 @@ BOOL LLVorbisDecodeState::decodeSection()
{
if (!mInFilep)
{
- llwarns << "No VFS file to decode in vorbis!" << llendl;
+ LL_WARNS() << "No VFS file to decode in vorbis!" << LL_ENDL;
return TRUE;
}
if (mDone)
{
-// llwarns << "Already done with decode, aborting!" << llendl;
+// LL_WARNS() << "Already done with decode, aborting!" << LL_ENDL;
return TRUE;
}
char pcmout[4096]; /*Flawfinder: ignore*/
@@ -377,14 +379,14 @@ BOOL LLVorbisDecodeState::decodeSection()
eof = TRUE;
mDone = TRUE;
mValid = TRUE;
-// llinfos << "Vorbis EOF" << llendl;
+// LL_INFOS() << "Vorbis EOF" << LL_ENDL;
}
else if (ret < 0)
{
/* error in the stream. Not a problem, just reporting it in
case we (the app) cares. In this case, we don't. */
- llwarns << "BAD vorbis decode in decodeSection." << llendl;
+ LL_WARNS() << "BAD vorbis decode in decodeSection." << LL_ENDL;
mValid = FALSE;
mDone = TRUE;
@@ -393,7 +395,7 @@ BOOL LLVorbisDecodeState::decodeSection()
}
else
{
-// llinfos << "Vorbis read " << ret << "bytes" << llendl;
+// LL_INFOS() << "Vorbis read " << ret << "bytes" << LL_ENDL;
/* we don't bother dealing with sample rate changes, etc, but.
you'll have to*/
std::copy(pcmout, pcmout+ret, std::back_inserter(mWAVBuffer));
@@ -405,7 +407,7 @@ BOOL LLVorbisDecodeState::finishDecode()
{
if (!isValid())
{
- llwarns << "Bogus vorbis decode state for " << getUUID() << ", aborting!" << llendl;
+ LL_WARNS() << "Bogus vorbis decode state for " << getUUID() << ", aborting!" << LL_ENDL;
return TRUE; // We've finished
}
@@ -480,7 +482,7 @@ BOOL LLVorbisDecodeState::finishDecode()
if (36 == data_length)
{
- llwarns << "BAD Vorbis decode in finishDecode!" << llendl;
+ LL_WARNS() << "BAD Vorbis decode in finishDecode!" << LL_ENDL;
mValid = FALSE;
return TRUE; // we've finished
}
@@ -497,7 +499,7 @@ BOOL LLVorbisDecodeState::finishDecode()
{
if (mBytesRead == 0)
{
- llwarns << "Unable to write file in LLVorbisDecodeState::finishDecode" << llendl;
+ LL_WARNS() << "Unable to write file in LLVorbisDecodeState::finishDecode" << LL_ENDL;
mValid = FALSE;
return TRUE; // we've finished
}
@@ -515,7 +517,7 @@ BOOL LLVorbisDecodeState::finishDecode()
LLVFile output(gVFS, mUUID, LLAssetType::AT_SOUND_WAV);
output.write(&mWAVBuffer[0], mWAVBuffer.size());
#endif
- //llinfos << "Finished decode for " << getUUID() << llendl;
+ //LL_INFOS() << "Finished decode for " << getUUID() << LL_ENDL;
return TRUE;
}
@@ -524,7 +526,7 @@ void LLVorbisDecodeState::flushBadFile()
{
if (mInFilep)
{
- llwarns << "Flushing bad vorbis file from VFS for " << mUUID << llendl;
+ LL_WARNS() << "Flushing bad vorbis file from VFS for " << mUUID << LL_ENDL;
mInFilep->remove();
}
}
@@ -541,7 +543,7 @@ public:
void processQueue(const F32 num_secs = 0.005);
protected:
- LLLinkedQueue<LLUUID> mDecodeQueue;
+ std::deque<LLUUID> mDecodeQueue;
LLPointer<LLVorbisDecodeState> mCurrentDecodep;
};
@@ -568,7 +570,7 @@ void LLAudioDecodeMgr::Impl::processQueue(const F32 num_secs)
if (mCurrentDecodep->isDone() && !mCurrentDecodep->isValid())
{
// We had an error when decoding, abort.
- llwarns << mCurrentDecodep->getUUID() << " has invalid vorbis data, aborting decode" << llendl;
+ LL_WARNS() << mCurrentDecodep->getUUID() << " has invalid vorbis data, aborting decode" << LL_ENDL;
mCurrentDecodep->flushBadFile();
LLAudioData *adp = gAudiop->getAudioData(mCurrentDecodep->getUUID());
adp->setHasValidData(false);
@@ -590,7 +592,7 @@ void LLAudioDecodeMgr::Impl::processQueue(const F32 num_secs)
LLAudioData *adp = gAudiop->getAudioData(mCurrentDecodep->getUUID());
if (!adp)
{
- llwarns << "Missing LLAudioData for decode of " << mCurrentDecodep->getUUID() << llendl;
+ LL_WARNS() << "Missing LLAudioData for decode of " << mCurrentDecodep->getUUID() << LL_ENDL;
}
else if (mCurrentDecodep->isValid() && mCurrentDecodep->isDone())
{
@@ -601,12 +603,12 @@ void LLAudioDecodeMgr::Impl::processQueue(const F32 num_secs)
// 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
// sounds anyway.
- //llinfos << "Finished the vorbis decode, now what?" << llendl;
+ //LL_INFOS() << "Finished the vorbis decode, now what?" << LL_ENDL;
}
else
{
adp->setHasCompletedDecode(true);
- llinfos << "Vorbis decode failed for " << mCurrentDecodep->getUUID() << llendl;
+ LL_INFOS() << "Vorbis decode failed for " << mCurrentDecodep->getUUID() << LL_ENDL;
}
mCurrentDecodep = NULL;
}
@@ -616,7 +618,7 @@ void LLAudioDecodeMgr::Impl::processQueue(const F32 num_secs)
if (!done)
{
- if (!mDecodeQueue.getLength())
+ if (mDecodeQueue.empty())
{
// Nothing else on the queue.
done = TRUE;
@@ -624,14 +626,15 @@ void LLAudioDecodeMgr::Impl::processQueue(const F32 num_secs)
else
{
LLUUID uuid;
- mDecodeQueue.pop(uuid);
+ uuid = mDecodeQueue.front();
+ mDecodeQueue.pop_front();
if (gAudiop->hasDecodedFile(uuid))
{
// This file has already been decoded, don't decode it again.
continue;
}
- lldebugs << "Decoding " << uuid << " from audio queue!" << llendl;
+ LL_DEBUGS() << "Decoding " << uuid << " from audio queue!" << LL_ENDL;
std::string uuid_str;
std::string d_path;
@@ -674,19 +677,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;
+ //LL_INFOS() << "addDecodeRequest for " << uuid << " has decoded file already" << LL_ENDL;
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);
+ //LL_INFOS() << "addDecodeRequest for " << uuid << " has local asset file already" << LL_ENDL;
+ mImpl->mDecodeQueue.push_back(uuid);
return TRUE;
}
- //llinfos << "addDecodeRequest for " << uuid << " no file available" << llendl;
+ //LL_INFOS() << "addDecodeRequest for " << uuid << " no file available" << LL_ENDL;
return FALSE;
}
diff --git a/indra/llaudio/llaudiodecodemgr.h b/indra/llaudio/llaudiodecodemgr.h
index e42fe8a40d..7a9b807d04 100755
--- a/indra/llaudio/llaudiodecodemgr.h
+++ b/indra/llaudio/llaudiodecodemgr.h
@@ -28,7 +28,6 @@
#include "stdtypes.h"
-#include "lllinkedqueue.h"
#include "lluuid.h"
#include "llassettype.h"
diff --git a/indra/llaudio/llaudioengine.cpp b/indra/llaudio/llaudioengine.cpp
index 06e752cf34..399333d994 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;
- llinfos << "LLAudioEngine::init() AudioEngine successfully initialized" << llendl;
+ LL_INFOS() << "LLAudioEngine::init() AudioEngine successfully initialized" << LL_ENDL;
return true;
}
@@ -187,7 +187,7 @@ void LLAudioEngine::stopInternetStream()
}
// virtual
-void LLAudioEngine::pauseInternetStream(int pause)
+void LLAudioEngine::pauseInternetStream(S32 pause)
{
if (mStreamingAudioImpl)
mStreamingAudioImpl->pause(pause);
@@ -308,7 +308,7 @@ void LLAudioEngine::idle(F32 max_decode_time)
LLAudioChannel *channelp = getFreeChannel(max_priority);
if (channelp)
{
- //llinfos << "Replacing source in channel due to priority!" << llendl;
+ //LL_INFOS() << "Replacing source in channel due to priority!" << LL_ENDL;
max_sourcep->setChannel(channelp);
channelp->setSource(max_sourcep);
if (max_sourcep->isSyncSlave())
@@ -479,7 +479,7 @@ void LLAudioEngine::idle(F32 max_decode_time)
{
if (!mBuffers[i]->mInUse && mBuffers[i]->mLastUseTimer.getElapsedTimeF32() > 30.f)
{
- //llinfos << "Flushing unused buffer!" << llendl;
+ //LL_INFOS() << "Flushing unused buffer!" << LL_ENDL;
mBuffers[i]->mAudioDatap->mBufferp = NULL;
delete mBuffers[i];
mBuffers[i] = NULL;
@@ -591,8 +591,8 @@ LLAudioBuffer * LLAudioEngine::getFreeBuffer()
if (buffer_id >= 0)
{
- lldebugs << "Taking over unused buffer " << buffer_id << llendl;
- //llinfos << "Flushing unused buffer!" << llendl;
+ LL_DEBUGS() << "Taking over unused buffer " << buffer_id << LL_ENDL;
+ //LL_INFOS() << "Flushing unused buffer!" << LL_ENDL;
mBuffers[buffer_id]->mAudioDatap->mBufferp = NULL;
delete mBuffers[buffer_id];
mBuffers[buffer_id] = createBuffer();
@@ -684,7 +684,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.
- //llwarns << "Used internal preload for non-local sound" << llendl;
+ //LL_WARNS() << "Used internal preload for non-local sound" << LL_ENDL;
return false;
}
@@ -815,7 +815,7 @@ void LLAudioEngine::triggerSound(const LLUUID &audio_uuid, const LLUUID& owner_i
const S32 type, const LLVector3d &pos_global)
{
// Create a new source (since this can't be associated with an existing source.
- //llinfos << "Localized: " << audio_uuid << llendl;
+ //LL_INFOS() << "Localized: " << audio_uuid << LL_ENDL;
if (mMuted)
{
@@ -982,7 +982,7 @@ void LLAudioEngine::cleanupAudioSource(LLAudioSource *asp)
iter = mAllSources.find(asp->getID());
if (iter == mAllSources.end())
{
- llwarns << "Cleaning up unknown audio source!" << llendl;
+ LL_WARNS() << "Cleaning up unknown audio source!" << LL_ENDL;
return;
}
delete asp;
@@ -1019,10 +1019,10 @@ bool LLAudioEngine::hasLocalFile(const LLUUID &uuid)
void LLAudioEngine::startNextTransfer()
{
- //llinfos << "LLAudioEngine::startNextTransfer()" << llendl;
+ //LL_INFOS() << "LLAudioEngine::startNextTransfer()" << LL_ENDL;
if (mCurrentTransfer.notNull() || getMuted())
{
- //llinfos << "Transfer in progress, aborting" << llendl;
+ //LL_INFOS() << "Transfer in progress, aborting" << LL_ENDL;
return;
}
@@ -1203,7 +1203,7 @@ void LLAudioEngine::startNextTransfer()
if (asset_id.notNull())
{
- llinfos << "Getting asset data for: " << asset_id << llendl;
+ LL_INFOS() << "Getting asset data for: " << asset_id << LL_ENDL;
gAudiop->mCurrentTransfer = asset_id;
gAudiop->mCurrentTransferTimer.reset();
gAssetStorage->getAssetData(asset_id, LLAssetType::AT_SOUND,
@@ -1211,7 +1211,7 @@ void LLAudioEngine::startNextTransfer()
}
else
{
- //llinfos << "No pending transfers?" << llendl;
+ //LL_INFOS() << "No pending transfers?" << LL_ENDL;
}
}
@@ -1221,7 +1221,7 @@ void LLAudioEngine::assetCallback(LLVFS *vfs, const LLUUID &uuid, LLAssetType::E
{
if (result_code)
{
- llinfos << "Boom, error in audio file transfer: " << LLAssetStorage::getErrorString( result_code ) << " (" << result_code << ")" << llendl;
+ LL_INFOS() << "Boom, error in audio file transfer: " << LLAssetStorage::getErrorString( result_code ) << " (" << result_code << ")" << LL_ENDL;
// Need to mark data as bad to avoid constant rerequests.
LLAudioData *adp = gAudiop->getAudioData(uuid);
if (adp)
@@ -1238,11 +1238,11 @@ void LLAudioEngine::assetCallback(LLVFS *vfs, const LLUUID &uuid, LLAssetType::E
if (!adp)
{
// Should never happen
- llwarns << "Got asset callback without audio data for " << uuid << llendl;
+ LL_WARNS() << "Got asset callback without audio data for " << uuid << LL_ENDL;
}
else
{
- // llinfos << "Got asset callback with good audio data for " << uuid << ", making decode request" << llendl;
+ // LL_INFOS() << "Got asset callback with good audio data for " << uuid << ", making decode request" << LL_ENDL;
adp->setHasValidData(true);
adp->setHasLocalData(true);
gAudioDecodeMgrp->addDecodeRequest(uuid);
@@ -1321,7 +1321,7 @@ void LLAudioSource::update()
}
else if (adp->hasCompletedDecode()) // Only mark corrupted after decode is done
{
- llwarns << "Marking LLAudioSource corrupted for " << adp->getID() << llendl;
+ LL_WARNS() << "Marking LLAudioSource corrupted for " << adp->getID() << LL_ENDL;
mCorrupted = true ;
}
}
@@ -1357,7 +1357,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.
- //llwarns << "Aborting, no buffer" << llendl;
+ //LL_WARNS() << "Aborting, no buffer" << LL_ENDL;
return false;
}
@@ -1375,7 +1375,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.
- //llwarns << "Aborting, no free channels" << llendl;
+ //LL_WARNS() << "Aborting, no free channels" << LL_ENDL;
return false;
}
@@ -1474,7 +1474,7 @@ bool LLAudioSource::isDone() const
{
// We don't have a channel assigned, and it's been
// over 15 seconds since we tried to play it. Don't bother.
- //llinfos << "No channel assigned, source is done" << llendl;
+ //LL_INFOS() << "No channel assigned, source is done" << LL_ENDL;
return true;
}
else
@@ -1640,7 +1640,7 @@ LLAudioChannel::LLAudioChannel() :
LLAudioChannel::~LLAudioChannel()
{
// Need to disconnect any sources which are using this channel.
- //llinfos << "Cleaning up audio channel" << llendl;
+ //LL_INFOS() << "Cleaning up audio channel" << LL_ENDL;
if (mCurrentSourcep)
{
mCurrentSourcep->setChannel(NULL);
@@ -1651,12 +1651,12 @@ LLAudioChannel::~LLAudioChannel()
void LLAudioChannel::setSource(LLAudioSource *sourcep)
{
- //llinfos << this << ": setSource(" << sourcep << ")" << llendl;
+ //LL_INFOS() << this << ": setSource(" << sourcep << ")" << LL_ENDL;
if (!sourcep)
{
// Clearing the source for this channel, don't need to do anything.
- //llinfos << "Clearing source for channel" << llendl;
+ //LL_INFOS() << "Clearing source for channel" << LL_ENDL;
cleanup();
mCurrentSourcep = NULL;
mWaiting = false;
@@ -1666,7 +1666,7 @@ void LLAudioChannel::setSource(LLAudioSource *sourcep)
if (sourcep == mCurrentSourcep)
{
// Don't reallocate the channel, this will make FMOD goofy.
- //llinfos << "Calling setSource with same source!" << llendl;
+ //LL_INFOS() << "Calling setSource with same source!" << LL_ENDL;
}
mCurrentSourcep = sourcep;
@@ -1768,7 +1768,7 @@ bool LLAudioData::load()
if (mBufferp)
{
// We already have this sound in a buffer, don't do anything.
- llinfos << "Already have a buffer for this sound, don't bother loading!" << llendl;
+ LL_INFOS() << "Already have a buffer for this sound, don't bother loading!" << LL_ENDL;
return true;
}
@@ -1776,7 +1776,7 @@ bool LLAudioData::load()
if (!mBufferp)
{
// No free buffers, abort.
- llinfos << "Not able to allocate a new audio buffer, aborting." << llendl;
+ LL_INFOS() << "Not able to allocate a new audio buffer, aborting." << LL_ENDL;
return true;
}
diff --git a/indra/llaudio/llaudioengine.h b/indra/llaudio/llaudioengine.h
index da1629a1db..f1e1b4e308 100755
--- a/indra/llaudio/llaudioengine.h
+++ b/indra/llaudio/llaudioengine.h
@@ -88,7 +88,7 @@ public:
enum LLAudioPlayState
{
- // isInternetStreamPlaying() returns an *int*, with
+ // isInternetStreamPlaying() returns an *S32*, with
// 0 = stopped, 1 = playing, 2 = paused.
AUDIO_STOPPED = 0,
AUDIO_PLAYING = 1,
@@ -160,7 +160,7 @@ public:
// Internet stream methods - these will call down into the *mStreamingAudioImpl if it exists
void startInternetStream(const std::string& url);
void stopInternetStream();
- void pauseInternetStream(int pause);
+ void pauseInternetStream(S32 pause);
void updateInternetStream(); // expected to be called often
LLAudioPlayState isInternetStreamPlaying();
// use a value from 0.0 to 1.0, inclusive
diff --git a/indra/llaudio/llaudioengine_fmodex.cpp b/indra/llaudio/llaudioengine_fmodex.cpp
index e9b74b8f41..6bbabbed5a 100644
--- a/indra/llaudio/llaudioengine_fmodex.cpp
+++ b/indra/llaudio/llaudioengine_fmodex.cpp
@@ -67,7 +67,7 @@ inline bool Check_FMOD_Error(FMOD_RESULT result, const char *string)
{
if(result == FMOD_OK)
return false;
- lldebugs << string << " Error: " << FMOD_ErrorString(result) << llendl;
+ LL_DEBUGS() << string << " Error: " << FMOD_ErrorString(result) << LL_ENDL;
return true;
}
@@ -75,11 +75,11 @@ void* F_STDCALL decode_alloc(unsigned int size, FMOD_MEMORY_TYPE type, const cha
{
if(type & FMOD_MEMORY_STREAM_DECODE)
{
- llinfos << "Decode buffer size: " << size << llendl;
+ LL_INFOS() << "Decode buffer size: " << size << LL_ENDL;
}
else if(type & FMOD_MEMORY_STREAM_FILE)
{
- llinfos << "Strean buffer size: " << size << llendl;
+ LL_INFOS() << "Strean buffer size: " << size << LL_ENDL;
}
return new char[size];
}
@@ -305,7 +305,7 @@ void LLAudioEngine_FMODEX::allocateListener(void)
mListenerp = (LLListener *) new LLListener_FMODEX(mSystem);
if (!mListenerp)
{
- llwarns << "Listener creation failed" << llendl;
+ LL_WARNS() << "Listener creation failed" << LL_ENDL;
}
}
@@ -314,16 +314,16 @@ void LLAudioEngine_FMODEX::shutdown()
{
stopInternetStream();
- llinfos << "About to LLAudioEngine::shutdown()" << llendl;
+ LL_INFOS() << "About to LLAudioEngine::shutdown()" << LL_ENDL;
LLAudioEngine::shutdown();
- llinfos << "LLAudioEngine_FMODEX::shutdown() closing FMOD Ex" << llendl;
+ LL_INFOS() << "LLAudioEngine_FMODEX::shutdown() closing FMOD Ex" << LL_ENDL;
if ( mSystem ) // speculative fix for MAINT-2657
{
mSystem->close();
mSystem->release();
}
- llinfos << "LLAudioEngine_FMODEX::shutdown() done closing FMOD Ex" << llendl;
+ LL_INFOS() << "LLAudioEngine_FMODEX::shutdown() done closing FMOD Ex" << LL_ENDL;
delete mListenerp;
mListenerp = NULL;
@@ -472,7 +472,7 @@ bool LLAudioChannelFMODEX::updateBuffer()
{
// This is bad, there should ALWAYS be a sound associated with a legit
// buffer.
- llerrs << "No FMOD sound!" << llendl;
+ LL_ERRS() << "No FMOD sound!" << LL_ENDL;
return false;
}
@@ -485,7 +485,7 @@ bool LLAudioChannelFMODEX::updateBuffer()
Check_FMOD_Error(result, "FMOD::System::playSound");
}
- //llinfos << "Setting up channel " << std::hex << mChannelID << std::dec << llendl;
+ //LL_INFOS() << "Setting up channel " << std::hex << mChannelID << std::dec << LL_ENDL;
}
// If we have a source for the channel, we need to update its gain.
@@ -502,8 +502,8 @@ bool LLAudioChannelFMODEX::updateBuffer()
{
S32 index;
mChannelp->getIndex(&index);
- llwarns << "Channel " << index << "Source ID: " << mCurrentSourcep->getID()
- << " at " << mCurrentSourcep->getPositionGlobal() << llendl;
+ LL_WARNS() << "Channel " << index << "Source ID: " << mCurrentSourcep->getID()
+ << " at " << mCurrentSourcep->getPositionGlobal() << LL_ENDL;
}*/
}
@@ -573,11 +573,11 @@ void LLAudioChannelFMODEX::cleanup()
{
if (!mChannelp)
{
- //llinfos << "Aborting cleanup with no channel handle." << llendl;
+ //LL_INFOS() << "Aborting cleanup with no channel handle." << LL_ENDL;
return;
}
- //llinfos << "Cleaning up channel: " << mChannelID << llendl;
+ //LL_INFOS() << "Cleaning up channel: " << mChannelID << LL_ENDL;
Check_FMOD_Error(mChannelp->stop(),"FMOD::Channel::stop");
mCurrentBufferp = NULL;
@@ -589,7 +589,7 @@ void LLAudioChannelFMODEX::play()
{
if (!mChannelp)
{
- llwarns << "Playing without a channel handle, aborting" << llendl;
+ LL_WARNS() << "Playing without a channel handle, aborting" << LL_ENDL;
return;
}
@@ -697,7 +697,7 @@ bool LLAudioBufferFMODEX::loadWAV(const std::string& filename)
if (result != FMOD_OK)
{
// We failed to load the file for some reason.
- llwarns << "Could not load data '" << filename << "': " << FMOD_ErrorString(result) << llendl;
+ LL_WARNS() << "Could not load data '" << filename << "': " << FMOD_ErrorString(result) << LL_ENDL;
//
// If we EVER want to load wav files provided by end users, we need
diff --git a/indra/llaudio/llaudioengine_openal.cpp b/indra/llaudio/llaudioengine_openal.cpp
index 34a057dcc0..e6ac586618 100755
--- a/indra/llaudio/llaudioengine_openal.cpp
+++ b/indra/llaudio/llaudioengine_openal.cpp
@@ -59,33 +59,33 @@ bool LLAudioEngine_OpenAL::init(const S32 num_channels, void* userdata)
if(!alutInit(NULL, NULL))
{
- llwarns << "LLAudioEngine_OpenAL::init() ALUT initialization failed: " << alutGetErrorString (alutGetError ()) << llendl;
+ LL_WARNS() << "LLAudioEngine_OpenAL::init() ALUT initialization failed: " << alutGetErrorString (alutGetError ()) << LL_ENDL;
return false;
}
- llinfos << "LLAudioEngine_OpenAL::init() OpenAL successfully initialized" << llendl;
+ LL_INFOS() << "LLAudioEngine_OpenAL::init() OpenAL successfully initialized" << LL_ENDL;
- llinfos << "OpenAL version: "
- << ll_safe_string(alGetString(AL_VERSION)) << llendl;
- llinfos << "OpenAL vendor: "
- << ll_safe_string(alGetString(AL_VENDOR)) << llendl;
- llinfos << "OpenAL renderer: "
- << ll_safe_string(alGetString(AL_RENDERER)) << llendl;
+ LL_INFOS() << "OpenAL version: "
+ << ll_safe_string(alGetString(AL_VERSION)) << LL_ENDL;
+ LL_INFOS() << "OpenAL vendor: "
+ << ll_safe_string(alGetString(AL_VENDOR)) << LL_ENDL;
+ LL_INFOS() << "OpenAL renderer: "
+ << ll_safe_string(alGetString(AL_RENDERER)) << LL_ENDL;
ALint major = alutGetMajorVersion ();
ALint minor = alutGetMinorVersion ();
- llinfos << "ALUT version: " << major << "." << minor << llendl;
+ LL_INFOS() << "ALUT version: " << major << "." << minor << LL_ENDL;
ALCdevice *device = alcGetContextsDevice(alcGetCurrentContext());
alcGetIntegerv(device, ALC_MAJOR_VERSION, 1, &major);
alcGetIntegerv(device, ALC_MAJOR_VERSION, 1, &minor);
- llinfos << "ALC version: " << major << "." << minor << llendl;
+ LL_INFOS() << "ALC version: " << major << "." << minor << LL_ENDL;
- llinfos << "ALC default device: "
+ LL_INFOS() << "ALC default device: "
<< ll_safe_string(alcGetString(device,
ALC_DEFAULT_DEVICE_SPECIFIER))
- << llendl;
+ << LL_ENDL;
return true;
}
@@ -125,24 +125,24 @@ void LLAudioEngine_OpenAL::allocateListener()
mListenerp = (LLListener *) new LLListener_OpenAL();
if(!mListenerp)
{
- llwarns << "LLAudioEngine_OpenAL::allocateListener() Listener creation failed" << llendl;
+ LL_WARNS() << "LLAudioEngine_OpenAL::allocateListener() Listener creation failed" << LL_ENDL;
}
}
// virtual
void LLAudioEngine_OpenAL::shutdown()
{
- llinfos << "About to LLAudioEngine::shutdown()" << llendl;
+ LL_INFOS() << "About to LLAudioEngine::shutdown()" << LL_ENDL;
LLAudioEngine::shutdown();
- llinfos << "About to alutExit()" << llendl;
+ LL_INFOS() << "About to alutExit()" << LL_ENDL;
if(!alutExit())
{
- llwarns << "Nuts." << llendl;
- llwarns << "LLAudioEngine_OpenAL::shutdown() ALUT shutdown failed: " << alutGetErrorString (alutGetError ()) << llendl;
+ LL_WARNS() << "Nuts." << LL_ENDL;
+ LL_WARNS() << "LLAudioEngine_OpenAL::shutdown() ALUT shutdown failed: " << alutGetErrorString (alutGetError ()) << LL_ENDL;
}
- llinfos << "LLAudioEngine_OpenAL::shutdown() OpenAL successfully shut down" << llendl;
+ LL_INFOS() << "LLAudioEngine_OpenAL::shutdown() OpenAL successfully shut down" << LL_ENDL;
delete mListenerp;
mListenerp = NULL;
@@ -160,7 +160,7 @@ LLAudioChannel *LLAudioEngine_OpenAL::createChannel()
void LLAudioEngine_OpenAL::setInternalGain(F32 gain)
{
- //llinfos << "LLAudioEngine_OpenAL::setInternalGain() Gain: " << gain << llendl;
+ //LL_INFOS() << "LLAudioEngine_OpenAL::setInternalGain() Gain: " << gain << LL_ENDL;
alListenerf(AL_GAIN, gain);
}
@@ -188,7 +188,7 @@ void LLAudioChannelOpenAL::play()
{
if (mALSource == AL_NONE)
{
- llwarns << "Playing without a mALSource, aborting" << llendl;
+ LL_WARNS() << "Playing without a mALSource, aborting" << LL_ENDL;
return;
}
@@ -213,8 +213,8 @@ void LLAudioChannelOpenAL::playSynced(LLAudioChannel *channelp)
alGetSourcef(masterchannelp->mALSource, AL_SEC_OFFSET,
&master_offset);
- llinfos << "Syncing with master at " << master_offset
- << "sec" << llendl;
+ LL_INFOS() << "Syncing with master at " << master_offset
+ << "sec" << LL_ENDL;
// *TODO: detect when this fails, maybe use AL_SAMPLE_
alSourcef(mALSource, AL_SEC_OFFSET, master_offset);
}
@@ -334,18 +334,18 @@ bool LLAudioBufferOpenAL::loadWAV(const std::string& filename)
ALenum error = alutGetError();
if (gDirUtilp->fileExists(filename))
{
- llwarns <<
+ LL_WARNS() <<
"LLAudioBufferOpenAL::loadWAV() Error loading "
<< filename
- << " " << alutGetErrorString(error) << llendl;
+ << " " << alutGetErrorString(error) << LL_ENDL;
}
else
{
// It's common for the file to not actually exist.
- lldebugs <<
+ LL_DEBUGS() <<
"LLAudioBufferOpenAL::loadWAV() Error loading "
<< filename
- << " " << alutGetErrorString(error) << llendl;
+ << " " << alutGetErrorString(error) << LL_ENDL;
}
return false;
}
@@ -369,7 +369,7 @@ U32 LLAudioBufferOpenAL::getLength()
bool LLAudioEngine_OpenAL::initWind()
{
ALenum error;
- llinfos << "LLAudioEngine_OpenAL::initWind() start" << llendl;
+ LL_INFOS() << "LLAudioEngine_OpenAL::initWind() start" << LL_ENDL;
mNumEmptyWindALBuffers = MAX_NUM_WIND_BUFFERS;
@@ -379,7 +379,7 @@ bool LLAudioEngine_OpenAL::initWind()
if((error=alGetError()) != AL_NO_ERROR)
{
- llwarns << "LLAudioEngine_OpenAL::initWind() Error creating wind sources: "<<error<<llendl;
+ LL_WARNS() << "LLAudioEngine_OpenAL::initWind() Error creating wind sources: "<<error<<LL_ENDL;
}
mWindGen = new LLWindGen<WIND_SAMPLE_T>;
@@ -392,18 +392,18 @@ bool LLAudioEngine_OpenAL::initWind()
if(mWindBuf==NULL)
{
- llerrs << "LLAudioEngine_OpenAL::initWind() Error creating wind memory buffer" << llendl;
+ LL_ERRS() << "LLAudioEngine_OpenAL::initWind() Error creating wind memory buffer" << LL_ENDL;
return false;
}
- llinfos << "LLAudioEngine_OpenAL::initWind() done" << llendl;
+ LL_INFOS() << "LLAudioEngine_OpenAL::initWind() done" << LL_ENDL;
return true;
}
void LLAudioEngine_OpenAL::cleanupWind()
{
- llinfos << "LLAudioEngine_OpenAL::cleanupWind()" << llendl;
+ LL_INFOS() << "LLAudioEngine_OpenAL::cleanupWind()" << LL_ENDL;
if (mWindSource != AL_NONE)
{
@@ -479,7 +479,7 @@ void LLAudioEngine_OpenAL::updateWind(LLVector3 wind_vec, F32 camera_altitude)
mNumEmptyWindALBuffers = llmin(mNumEmptyWindALBuffers + processed * 3 - unprocessed, MAX_NUM_WIND_BUFFERS-unprocessed);
mNumEmptyWindALBuffers = llmax(mNumEmptyWindALBuffers, 0);
- //llinfos << "mNumEmptyWindALBuffers: " << mNumEmptyWindALBuffers <<" (" << unprocessed << ":" << processed << ")" << llendl;
+ //LL_INFOS() << "mNumEmptyWindALBuffers: " << mNumEmptyWindALBuffers <<" (" << unprocessed << ":" << processed << ")" << LL_ENDL;
while(processed--) // unqueue old buffers
{
@@ -490,7 +490,7 @@ void LLAudioEngine_OpenAL::updateWind(LLVector3 wind_vec, F32 camera_altitude)
error = alGetError();
if(error != AL_NO_ERROR)
{
- llwarns << "LLAudioEngine_OpenAL::updateWind() error swapping (unqueuing) buffers" << llendl;
+ LL_WARNS() << "LLAudioEngine_OpenAL::updateWind() error swapping (unqueuing) buffers" << LL_ENDL;
}
else
{
@@ -506,7 +506,7 @@ void LLAudioEngine_OpenAL::updateWind(LLVector3 wind_vec, F32 camera_altitude)
alGenBuffers(1,&buffer);
if((error=alGetError()) != AL_NO_ERROR)
{
- llwarns << "LLAudioEngine_OpenAL::updateWind() Error creating wind buffer: " << error << llendl;
+ LL_WARNS() << "LLAudioEngine_OpenAL::updateWind() Error creating wind buffer: " << error << LL_ENDL;
break;
}
@@ -519,14 +519,14 @@ void LLAudioEngine_OpenAL::updateWind(LLVector3 wind_vec, F32 camera_altitude)
error = alGetError();
if(error != AL_NO_ERROR)
{
- llwarns << "LLAudioEngine_OpenAL::updateWind() error swapping (bufferdata) buffers" << llendl;
+ LL_WARNS() << "LLAudioEngine_OpenAL::updateWind() error swapping (bufferdata) buffers" << LL_ENDL;
}
alSourceQueueBuffers(mWindSource, 1, &buffer);
error = alGetError();
if(error != AL_NO_ERROR)
{
- llwarns << "LLAudioEngine_OpenAL::updateWind() error swapping (queuing) buffers" << llendl;
+ LL_WARNS() << "LLAudioEngine_OpenAL::updateWind() error swapping (queuing) buffers" << LL_ENDL;
}
--mNumEmptyWindALBuffers;
@@ -538,7 +538,7 @@ void LLAudioEngine_OpenAL::updateWind(LLVector3 wind_vec, F32 camera_altitude)
{
alSourcePlay(mWindSource);
- lldebugs << "Wind had stopped - probably ran out of buffers - restarting: " << (unprocessed+mNumEmptyWindALBuffers) << " now queued." << llendl;
+ LL_DEBUGS() << "Wind had stopped - probably ran out of buffers - restarting: " << (unprocessed+mNumEmptyWindALBuffers) << " now queued." << LL_ENDL;
}
}
diff --git a/indra/llaudio/lllistener_openal.cpp b/indra/llaudio/lllistener_openal.cpp
index b3d4b02f09..9dd4c86854 100755
--- a/indra/llaudio/lllistener_openal.cpp
+++ b/indra/llaudio/lllistener_openal.cpp
@@ -41,13 +41,13 @@ LLListener_OpenAL::~LLListener_OpenAL()
void LLListener_OpenAL::translate(LLVector3 offset)
{
- //llinfos << "LLListener_OpenAL::translate() : " << offset << llendl;
+ //LL_INFOS() << "LLListener_OpenAL::translate() : " << offset << LL_ENDL;
LLListener::translate(offset);
}
void LLListener_OpenAL::setPosition(LLVector3 pos)
{
- //llinfos << "LLListener_OpenAL::setPosition() : " << pos << llendl;
+ //LL_INFOS() << "LLListener_OpenAL::setPosition() : " << pos << LL_ENDL;
LLListener::setPosition(pos);
}
@@ -58,7 +58,7 @@ void LLListener_OpenAL::setVelocity(LLVector3 vel)
void LLListener_OpenAL::orient(LLVector3 up, LLVector3 at)
{
- //llinfos << "LLListener_OpenAL::orient() up: " << up << " at: " << at << llendl;
+ //LL_INFOS() << "LLListener_OpenAL::orient() up: " << up << " at: " << at << LL_ENDL;
LLListener::orient(up, at);
}
@@ -84,7 +84,7 @@ void LLListener_OpenAL::commitDeferredChanges()
void LLListener_OpenAL::setDopplerFactor(F32 factor)
{
- //llinfos << "LLListener_OpenAL::setDopplerFactor() : " << factor << llendl;
+ //LL_INFOS() << "LLListener_OpenAL::setDopplerFactor() : " << factor << LL_ENDL;
alDopplerFactor(factor);
}
@@ -92,7 +92,7 @@ F32 LLListener_OpenAL::getDopplerFactor()
{
ALfloat factor;
factor = alGetFloat(AL_DOPPLER_FACTOR);
- //llinfos << "LLListener_OpenAL::getDopplerFactor() : " << factor << llendl;
+ //LL_INFOS() << "LLListener_OpenAL::getDopplerFactor() : " << factor << LL_ENDL;
return factor;
}
diff --git a/indra/llaudio/llstreamingaudio_fmodex.cpp b/indra/llaudio/llstreamingaudio_fmodex.cpp
index 42f30aa1c4..9c9e85c00c 100644
--- a/indra/llaudio/llstreamingaudio_fmodex.cpp
+++ b/indra/llaudio/llstreamingaudio_fmodex.cpp
@@ -91,7 +91,7 @@ void LLStreamingAudio_FMODEX::start(const std::string& url)
{
//if (!mInited)
//{
- // llwarns << "startInternetStream before audio initialized" << llendl;
+ // LL_WARNS() << "startInternetStream before audio initialized" << LL_ENDL;
// return;
//}
@@ -100,13 +100,13 @@ void LLStreamingAudio_FMODEX::start(const std::string& url)
if (!url.empty())
{
- llinfos << "Starting internet stream: " << url << llendl;
+ LL_INFOS() << "Starting internet stream: " << url << LL_ENDL;
mCurrentInternetStreamp = new LLAudioStreamManagerFMODEX(mSystem,url);
mURL = url;
}
else
{
- llinfos << "Set internet stream to null" << llendl;
+ LL_INFOS() << "Set internet stream to null" << LL_ENDL;
mURL.clear();
}
}
@@ -121,7 +121,7 @@ void LLStreamingAudio_FMODEX::update()
LLAudioStreamManagerFMODEX *streamp = *iter;
if (streamp->stopStream())
{
- llinfos << "Closed dead stream" << llendl;
+ LL_INFOS() << "Closed dead stream" << LL_ENDL;
delete streamp;
mDeadStreams.erase(iter++);
}
@@ -181,7 +181,7 @@ void LLStreamingAudio_FMODEX::update()
{
if (!strcmp(tag.name, "Sample Rate Change"))
{
- llinfos << "Stream forced changing sample rate to " << *((float *)tag.data) << llendl;
+ LL_INFOS() << "Stream forced changing sample rate to " << *((float *)tag.data) << LL_ENDL;
mFMODInternetStreamChannelp->setFrequency(*((float *)tag.data));
}
continue;
@@ -195,9 +195,9 @@ void LLStreamingAudio_FMODEX::update()
mFMODInternetStreamChannelp->getPaused(&paused);
if(!paused)
{
- llinfos << "Stream starvation detected! Pausing stream until buffer nearly full." << llendl;
- llinfos << " (diskbusy="<<diskbusy<<")" << llendl;
- llinfos << " (progress="<<progress<<")" << llendl;
+ LL_INFOS() << "Stream starvation detected! Pausing stream until buffer nearly full." << LL_ENDL;
+ LL_INFOS() << " (diskbusy="<<diskbusy<<")" << LL_ENDL;
+ LL_INFOS() << " (progress="<<progress<<")" << LL_ENDL;
mFMODInternetStreamChannelp->setPaused(true);
}
}
@@ -220,14 +220,14 @@ void LLStreamingAudio_FMODEX::stop()
if (mCurrentInternetStreamp)
{
- llinfos << "Stopping internet stream: " << mCurrentInternetStreamp->getURL() << llendl;
+ LL_INFOS() << "Stopping internet stream: " << mCurrentInternetStreamp->getURL() << LL_ENDL;
if (mCurrentInternetStreamp->stopStream())
{
delete mCurrentInternetStreamp;
}
else
{
- llwarns << "Pushing stream to dead list: " << mCurrentInternetStreamp->getURL() << llendl;
+ LL_WARNS() << "Pushing stream to dead list: " << mCurrentInternetStreamp->getURL() << LL_ENDL;
mDeadStreams.push_back(mCurrentInternetStreamp);
}
mCurrentInternetStreamp = NULL;
@@ -314,9 +314,9 @@ LLAudioStreamManagerFMODEX::LLAudioStreamManagerFMODEX(FMOD::System *system, con
if (result!= FMOD_OK)
{
- llwarns << "Couldn't open fmod stream, error "
+ LL_WARNS() << "Couldn't open fmod stream, error "
<< FMOD_ErrorString(result)
- << llendl;
+ << LL_ENDL;
mReady = false;
return;
}
@@ -329,7 +329,7 @@ FMOD::Channel *LLAudioStreamManagerFMODEX::startStream()
// We need a live and opened stream before we try and play it.
if (!mInternetStream || getOpenState() != FMOD_OPENSTATE_READY)
{
- llwarns << "No internet stream to start playing!" << llendl;
+ LL_WARNS() << "No internet stream to start playing!" << LL_ENDL;
return NULL;
}
diff --git a/indra/llaudio/llstreamingaudio_fmodex.h b/indra/llaudio/llstreamingaudio_fmodex.h
index 1dee18ae7d..2787840ba1 100644
--- a/indra/llaudio/llstreamingaudio_fmodex.h
+++ b/indra/llaudio/llstreamingaudio_fmodex.h
@@ -49,9 +49,9 @@ class LLStreamingAudio_FMODEX : public LLStreamingAudioInterface
/*virtual*/ void start(const std::string& url);
/*virtual*/ void stop();
- /*virtual*/ void pause(int pause);
+ /*virtual*/ void pause(S32 pause);
/*virtual*/ void update();
- /*virtual*/ int isPlaying();
+ /*virtual*/ S32 isPlaying();
/*virtual*/ void setGain(F32 vol);
/*virtual*/ F32 getGain();
/*virtual*/ std::string getURL();
diff --git a/indra/llaudio/llvorbisencode.cpp b/indra/llaudio/llvorbisencode.cpp
index dfd5da12b3..2e1ed9b505 100755
--- a/indra/llaudio/llvorbisencode.cpp
+++ b/indra/llaudio/llvorbisencode.cpp
@@ -127,7 +127,7 @@ S32 check_for_invalid_wav_formats(const std::string& in_fname, std::string& erro
return(LLVORBISENC_CHUNK_SIZE_ERR);
}
-// llinfos << "chunk found: '" << wav_header[0] << wav_header[1] << wav_header[2] << wav_header[3] << "'" << llendl;
+// LL_INFOS() << "chunk found: '" << wav_header[0] << wav_header[1] << wav_header[2] << wav_header[3] << "'" << LL_ENDL;
if (!(strncmp((char *)&(wav_header[0]),"fmt ",4)))
{
@@ -224,7 +224,7 @@ S32 encode_vorbis_file(const std::string& in_fname, const std::string& out_fname
std::string error_msg;
if ((format_error = check_for_invalid_wav_formats(in_fname, error_msg)))
{
- llwarns << error_msg << ": " << in_fname << llendl;
+ LL_WARNS() << error_msg << ": " << in_fname << LL_ENDL;
return(format_error);
}
@@ -237,8 +237,8 @@ S32 encode_vorbis_file(const std::string& in_fname, const std::string& out_fname
infile.open(in_fname,LL_APR_RB);
if (!infile.getFileHandle())
{
- llwarns << "Couldn't open temporary ogg file for writing: " << in_fname
- << llendl;
+ LL_WARNS() << "Couldn't open temporary ogg file for writing: " << in_fname
+ << LL_ENDL;
return(LLVORBISENC_SOURCE_OPEN_ERR);
}
@@ -246,8 +246,8 @@ S32 encode_vorbis_file(const std::string& in_fname, const std::string& out_fname
outfile.open(out_fname,LL_APR_WPB);
if (!outfile.getFileHandle())
{
- llwarns << "Couldn't open upload sound file for reading: " << in_fname
- << llendl;
+ LL_WARNS() << "Couldn't open upload sound file for reading: " << in_fname
+ << LL_ENDL;
return(LLVORBISENC_DEST_OPEN_ERR);
}
@@ -265,7 +265,7 @@ S32 encode_vorbis_file(const std::string& in_fname, const std::string& out_fname
+ ((U32) wav_header[5] << 8)
+ wav_header[4];
-// llinfos << "chunk found: '" << wav_header[0] << wav_header[1] << wav_header[2] << wav_header[3] << "'" << llendl;
+// LL_INFOS() << "chunk found: '" << wav_header[0] << wav_header[1] << wav_header[2] << wav_header[3] << "'" << LL_ENDL;
if (!(strncmp((char *)&(wav_header[0]),"fmt ",4)))
{
@@ -308,8 +308,8 @@ S32 encode_vorbis_file(const std::string& in_fname, const std::string& out_fname
// vorbis_encode_ctl(&vi,OV_ECTL_RATEMANAGE_AVG,NULL) ||
// vorbis_encode_setup_init(&vi))
{
- llwarns << "unable to initialize vorbis codec at quality " << quality << llendl;
- // llwarns << "unable to initialize vorbis codec at bitrate " << bitrate << llendl;
+ LL_WARNS() << "unable to initialize vorbis codec at quality " << quality << LL_ENDL;
+ // LL_WARNS() << "unable to initialize vorbis codec at bitrate " << bitrate << LL_ENDL;
return(LLVORBISENC_DEST_OPEN_ERR);
}
@@ -498,7 +498,7 @@ S32 encode_vorbis_file(const std::string& in_fname, const std::string& out_fname
libvorbis. They're never freed or manipulated directly */
// fprintf(stderr,"Vorbis encoding: Done.\n");
- llinfos << "Vorbis encoding: Done." << llendl;
+ LL_INFOS() << "Vorbis encoding: Done." << LL_ENDL;
#endif
return(LLVORBISENC_NOERR);