diff --git a/linden/indra/llaudio/audioengine_openal.cpp b/linden/indra/llaudio/audioengine_openal.cpp index a956131..9655703 100644 --- a/linden/indra/llaudio/audioengine_openal.cpp +++ b/linden/indra/llaudio/audioengine_openal.cpp @@ -61,33 +61,33 @@ bool LLAudioEngine_OpenAL::init(const S32 num_channels, void* userdata) if(!alutInit(NULL, NULL)) { - LL_WARNS("OpenAL") << "LLAudioEngine_OpenAL::init() ALUT initialization failed: " << alutGetErrorString (alutGetError ()) << LL_ENDL; + llwarns << "OpenAL: " << "LLAudioEngine_OpenAL::init() ALUT initialization failed: " << alutGetErrorString (alutGetError ()) << llendl; return false; } - LL_INFOS("OpenAL") << "LLAudioEngine_OpenAL::init() OpenAL successfully initialized" << LL_ENDL; + llinfos << "OpenAL: " << "LLAudioEngine_OpenAL::init() OpenAL successfully initialized" << llendl; - LL_INFOS("OpenAL") << "OpenAL version: " - << ll_safe_string(alGetString(AL_VERSION)) << LL_ENDL; - LL_INFOS("OpenAL") << "OpenAL vendor: " - << ll_safe_string(alGetString(AL_VENDOR)) << LL_ENDL; - LL_INFOS("OpenAL") << "OpenAL renderer: " - << ll_safe_string(alGetString(AL_RENDERER)) << LL_ENDL; + llinfos << "OpenAL: " << "OpenAL version: " + << ll_safe_string(alGetString(AL_VERSION)) << llendl; + llinfos << "OpenAL: " << "OpenAL vendor: " + << ll_safe_string(alGetString(AL_VENDOR)) << llendl; + llinfos << "OpenAL: " << "OpenAL renderer: " + << ll_safe_string(alGetString(AL_RENDERER)) << llendl; ALint major = alutGetMajorVersion (); ALint minor = alutGetMinorVersion (); - LL_INFOS("OpenAL") << "ALUT version: " << major << "." << minor << LL_ENDL; + llinfos << "OpenAL: " << "ALUT version: " << major << "." << minor << llendl; ALCdevice *device = alcGetContextsDevice(alcGetCurrentContext()); alcGetIntegerv(device, ALC_MAJOR_VERSION, 1, &major); alcGetIntegerv(device, ALC_MAJOR_VERSION, 1, &minor); - LL_INFOS("OpenAL") << "ALC version: " << major << "." << minor << LL_ENDL; + llinfos << "OpenAL: " << "ALC version: " << major << "." << minor << llendl; - LL_INFOS("OpenAL") << "ALC default device: " + llinfos << "OpenAL: " << "ALC default device: " << ll_safe_string(alcGetString(device, ALC_DEFAULT_DEVICE_SPECIFIER)) - << LL_ENDL; + << llendl; return true; } @@ -127,24 +127,24 @@ void LLAudioEngine_OpenAL::allocateListener() mListenerp = (LLListener *) new LLListener_OpenAL(); if(!mListenerp) { - LL_WARNS("OpenAL") << "LLAudioEngine_OpenAL::allocateListener() Listener creation failed" << LL_ENDL; + llwarns << "OpenAL: " << "LLAudioEngine_OpenAL::allocateListener() Listener creation failed" << llendl; } } // virtual void LLAudioEngine_OpenAL::shutdown() { - LL_INFOS("OpenAL") << "About to LLAudioEngine::shutdown()" << LL_ENDL; + llinfos << "OpenAL: " << "About to LLAudioEngine::shutdown()" << llendl; LLAudioEngine::shutdown(); - LL_INFOS("OpenAL") << "About to alutExit()" << LL_ENDL; + llinfos << "OpenAL: " << "About to alutExit()" << llendl; if(!alutExit()) { - LL_WARNS("OpenAL") << "Nuts." << LL_ENDL; - LL_WARNS("OpenAL") << "LLAudioEngine_OpenAL::shutdown() ALUT shutdown failed: " << alutGetErrorString (alutGetError ()) << LL_ENDL; + llwarns << "OpenAL: " << "Nuts." << llendl; + llwarns << "OpenAL: " << "LLAudioEngine_OpenAL::shutdown() ALUT shutdown failed: " << alutGetErrorString (alutGetError ()) << llendl; } - LL_INFOS("OpenAL") << "LLAudioEngine_OpenAL::shutdown() OpenAL successfully shut down" << LL_ENDL; + llinfos << "OpenAL: " << "LLAudioEngine_OpenAL::shutdown() OpenAL successfully shut down" << llendl; delete mListenerp; mListenerp = NULL; @@ -162,7 +162,7 @@ LLAudioChannel *LLAudioEngine_OpenAL::createChannel() void LLAudioEngine_OpenAL::setInternalGain(F32 gain) { - //LL_INFOS("OpenAL") << "LLAudioEngine_OpenAL::setInternalGain() Gain: " << gain << LL_ENDL; + //llinfos << "OpenAL: " << "LLAudioEngine_OpenAL::setInternalGain() Gain: " << gain << llendl; alListenerf(AL_GAIN, gain); } @@ -190,7 +190,7 @@ void LLAudioChannelOpenAL::play() { if (mALSource == AL_NONE) { - LL_WARNS("OpenAL") << "Playing without a mALSource, aborting" << LL_ENDL; + llwarns << "OpenAL: " << "Playing without a mALSource, aborting" << llendl; return; } @@ -215,8 +215,8 @@ void LLAudioChannelOpenAL::playSynced(LLAudioChannel *channelp) alGetSourcef(masterchannelp->mALSource, AL_SEC_OFFSET, &master_offset); - LL_INFOS("OpenAL") << "Syncing with master at " << master_offset - << "sec" << LL_ENDL; + llinfos << "OpenAL: " << "Syncing with master at " << master_offset + << "sec" << llendl; // *TODO: detect when this fails, maybe use AL_SAMPLE_ alSourcef(mALSource, AL_SEC_OFFSET, master_offset); } @@ -340,18 +340,18 @@ bool LLAudioBufferOpenAL::loadWAV(const std::string& filename) ALenum error = alutGetError(); if (gDirUtilp->fileExists(filename)) { - LL_WARNS("OpenAL") << + llwarns << "OpenAL: " << "LLAudioBufferOpenAL::loadWAV() Error loading " << filename - << " " << alutGetErrorString(error) << LL_ENDL; + << " " << alutGetErrorString(error) << llendl; } else { // It's common for the file to not actually exist. - LL_DEBUGS("OpenAL") << + lldebugs << "OpenAL: " << "LLAudioBufferOpenAL::loadWAV() Error loading " << filename - << " " << alutGetErrorString(error) << LL_ENDL; + << " " << alutGetErrorString(error) << llendl; } return false; } @@ -375,7 +375,7 @@ U32 LLAudioBufferOpenAL::getLength() void LLAudioEngine_OpenAL::initWind() { ALenum error; - LL_INFOS("OpenAL") << "LLAudioEngine_OpenAL::initWind() start" << LL_ENDL; + llinfos << "OpenAL: " << "LLAudioEngine_OpenAL::initWind() start" << llendl; mNumEmptyWindALBuffers = MAX_NUM_WIND_BUFFERS; @@ -385,7 +385,7 @@ void LLAudioEngine_OpenAL::initWind() if((error=alGetError()) != AL_NO_ERROR) { - LL_WARNS("OpenAL") << "LLAudioEngine_OpenAL::initWind() Error creating wind sources: "<; @@ -399,16 +399,16 @@ void LLAudioEngine_OpenAL::initWind() if(mWindBuf==NULL) { - LL_ERRS("OpenAL") << "LLAudioEngine_OpenAL::initWind() Error creating wind memory buffer" << LL_ENDL; + llerrs << "OpenAL: " << "LLAudioEngine_OpenAL::initWind() Error creating wind memory buffer" << llendl; mEnableWind=false; } - LL_INFOS("OpenAL") << "LLAudioEngine_OpenAL::initWind() done" << LL_ENDL; + llinfos << "OpenAL: " << "LLAudioEngine_OpenAL::initWind() done" << llendl; } void LLAudioEngine_OpenAL::cleanupWind() { - LL_INFOS("OpenAL") << "LLAudioEngine_OpenAL::cleanupWind()" << LL_ENDL; + llinfos << "OpenAL: " << "LLAudioEngine_OpenAL::cleanupWind()" << llendl; if (mWindSource != AL_NONE) { @@ -484,7 +484,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); - //LL_INFOS("OpenAL") << "mNumEmptyWindALBuffers: " << mNumEmptyWindALBuffers <<" (" << unprocessed << ":" << processed << ")" << LL_ENDL; + //llinfos << "OpenAL: " << "mNumEmptyWindALBuffers: " << mNumEmptyWindALBuffers <<" (" << unprocessed << ":" << processed << ")" << llendl; while(processed--) // unqueue old buffers { @@ -495,7 +495,7 @@ void LLAudioEngine_OpenAL::updateWind(LLVector3 wind_vec, F32 camera_altitude) error = alGetError(); if(error != AL_NO_ERROR) { - LL_WARNS("OpenAL") << "LLAudioEngine_OpenAL::updateWind() error swapping (unqueuing) buffers" << LL_ENDL; + llwarns << "OpenAL: " << "LLAudioEngine_OpenAL::updateWind() error swapping (unqueuing) buffers" << llendl; } else { @@ -511,7 +511,7 @@ void LLAudioEngine_OpenAL::updateWind(LLVector3 wind_vec, F32 camera_altitude) alGenBuffers(1,&buffer); if((error=alGetError()) != AL_NO_ERROR) { - LL_WARNS("OpenAL") << "LLAudioEngine_OpenAL::initWind() Error creating wind buffer: " << error << LL_ENDL; + llwarns << "OpenAL: " << "LLAudioEngine_OpenAL::initWind() Error creating wind buffer: " << error << llendl; break; } @@ -523,12 +523,12 @@ void LLAudioEngine_OpenAL::updateWind(LLVector3 wind_vec, F32 camera_altitude) mWindBufFreq); error = alGetError(); if(error != AL_NO_ERROR) - LL_WARNS("OpenAL") << "LLAudioEngine_OpenAL::updateWind() error swapping (bufferdata) buffers" << LL_ENDL; + llwarns << "OpenAL: " << "LLAudioEngine_OpenAL::updateWind() error swapping (bufferdata) buffers" << llendl; alSourceQueueBuffers(mWindSource, 1, &buffer); error = alGetError(); if(error != AL_NO_ERROR) - LL_WARNS("OpenAL") << "LLAudioEngine_OpenAL::updateWind() error swapping (queuing) buffers" << LL_ENDL; + llwarns << "OpenAL: " << "LLAudioEngine_OpenAL::updateWind() error swapping (queuing) buffers" << llendl; --mNumEmptyWindALBuffers; } @@ -539,6 +539,6 @@ void LLAudioEngine_OpenAL::updateWind(LLVector3 wind_vec, F32 camera_altitude) { alSourcePlay(mWindSource); - LL_INFOS("OpenAL") << "Wind had stopped - probably ran out of buffers - restarting: " << (unprocessed+mNumEmptyWindALBuffers) << " now queued." << LL_ENDL; + llinfos << "OpenAL: " << "Wind had stopped - probably ran out of buffers - restarting: " << (unprocessed+mNumEmptyWindALBuffers) << " now queued." << llendl; } }