diff options
author | Anders Arnholm | 2008-12-19 10:12:25 +0100 |
---|---|---|
committer | Anders Arnholm | 2008-12-19 10:12:25 +0100 |
commit | 324dfa1561efba6492b72ad4d9306e69b9124776 (patch) | |
tree | ec203e765d20e7e042bbb042cd520f00b3185f43 /linden/indra/llaudio | |
parent | Make openal-1 version info (diff) | |
download | meta-impy-324dfa1561efba6492b72ad4d9306e69b9124776.zip meta-impy-324dfa1561efba6492b72ad4d9306e69b9124776.tar.gz meta-impy-324dfa1561efba6492b72ad4d9306e69b9124776.tar.bz2 meta-impy-324dfa1561efba6492b72ad4d9306e69b9124776.tar.xz |
Clean up logging to used standard LL metods.
Diffstat (limited to 'linden/indra/llaudio')
-rw-r--r-- | linden/indra/llaudio/audioengine.cpp | 56 | ||||
-rw-r--r-- | linden/indra/llaudio/audioengine_openal.cpp | 74 |
2 files changed, 65 insertions, 65 deletions
diff --git a/linden/indra/llaudio/audioengine.cpp b/linden/indra/llaudio/audioengine.cpp index 239981b..da9bcba 100644 --- a/linden/indra/llaudio/audioengine.cpp +++ b/linden/indra/llaudio/audioengine.cpp | |||
@@ -116,7 +116,7 @@ bool LLAudioEngine::init(const S32 num_channels, void* userdata) | |||
116 | // Initialize the decode manager | 116 | // Initialize the decode manager |
117 | gAudioDecodeMgrp = new LLAudioDecodeMgr; | 117 | gAudioDecodeMgrp = new LLAudioDecodeMgr; |
118 | 118 | ||
119 | llinfos << "LLAudioEngine::init() AudioEngine successfully initialized" << llendl; | 119 | LL_INFOS("AudioEngine") << "LLAudioEngine::init() AudioEngine successfully initialized" << llendl; |
120 | 120 | ||
121 | return true; | 121 | return true; |
122 | } | 122 | } |
@@ -171,7 +171,7 @@ void LLAudioEngine::shutdown() | |||
171 | // virtual | 171 | // virtual |
172 | void LLAudioEngine::startInternetStream(const std::string& url) | 172 | void LLAudioEngine::startInternetStream(const std::string& url) |
173 | { | 173 | { |
174 | llinfos << "entered startInternetStream()" << llendl; | 174 | LL_INFOS("AudioEngine") << "entered startInternetStream()" << llendl; |
175 | 175 | ||
176 | if (!mInternetStreamMedia) | 176 | if (!mInternetStreamMedia) |
177 | { | 177 | { |
@@ -179,7 +179,7 @@ void LLAudioEngine::startInternetStream(const std::string& url) | |||
179 | if (mgr) | 179 | if (mgr) |
180 | { | 180 | { |
181 | mInternetStreamMedia = mgr->createSourceFromMimeType(LLURI(url).scheme(), "audio/mpeg"); // assumes that whatever media implementation supports mp3 also supports vorbis. | 181 | mInternetStreamMedia = mgr->createSourceFromMimeType(LLURI(url).scheme(), "audio/mpeg"); // assumes that whatever media implementation supports mp3 also supports vorbis. |
182 | llinfos << "mInternetStreamMedia is now " << mInternetStreamMedia << llendl; | 182 | LL_INFOS("AudioEngine") << "mInternetStreamMedia is now " << mInternetStreamMedia << llendl; |
183 | } | 183 | } |
184 | } | 184 | } |
185 | 185 | ||
@@ -187,14 +187,14 @@ void LLAudioEngine::startInternetStream(const std::string& url) | |||
187 | return; | 187 | return; |
188 | 188 | ||
189 | if (!url.empty()) { | 189 | if (!url.empty()) { |
190 | llinfos << "Starting internet stream: " << url << llendl; | 190 | LL_INFOS("AudioEngine") << "Starting internet stream: " << url << llendl; |
191 | mInternetStreamURL = url; | 191 | mInternetStreamURL = url; |
192 | mInternetStreamMedia->navigateTo ( url ); | 192 | mInternetStreamMedia->navigateTo ( url ); |
193 | llinfos << "Playing....." << llendl; | 193 | LL_INFOS("AudioEngine") << "Playing....." << llendl; |
194 | mInternetStreamMedia->addCommand(LLMediaBase::COMMAND_START); | 194 | mInternetStreamMedia->addCommand(LLMediaBase::COMMAND_START); |
195 | mInternetStreamMedia->updateMedia(); | 195 | mInternetStreamMedia->updateMedia(); |
196 | } else { | 196 | } else { |
197 | llinfos << "setting stream to NULL"<< llendl; | 197 | LL_INFOS("AudioEngine") << "setting stream to NULL"<< llendl; |
198 | mInternetStreamURL.clear(); | 198 | mInternetStreamURL.clear(); |
199 | mInternetStreamMedia->addCommand(LLMediaBase::COMMAND_STOP); | 199 | mInternetStreamMedia->addCommand(LLMediaBase::COMMAND_STOP); |
200 | mInternetStreamMedia->updateMedia(); | 200 | mInternetStreamMedia->updateMedia(); |
@@ -205,12 +205,12 @@ void LLAudioEngine::startInternetStream(const std::string& url) | |||
205 | // virtual | 205 | // virtual |
206 | void LLAudioEngine::stopInternetStream() | 206 | void LLAudioEngine::stopInternetStream() |
207 | { | 207 | { |
208 | llinfos << "entered stopInternetStream()" << llendl; | 208 | LL_INFOS("AudioEngine") << "entered stopInternetStream()" << llendl; |
209 | 209 | ||
210 | if(mInternetStreamMedia) | 210 | if(mInternetStreamMedia) |
211 | { | 211 | { |
212 | if( ! mInternetStreamMedia->addCommand(LLMediaBase::COMMAND_STOP)){ | 212 | if( ! mInternetStreamMedia->addCommand(LLMediaBase::COMMAND_STOP)){ |
213 | llinfos << "attempting to stop stream failed!" << llendl; | 213 | LL_INFOS("AudioEngine") << "attempting to stop stream failed!" << llendl; |
214 | } | 214 | } |
215 | mInternetStreamMedia->updateMedia(); | 215 | mInternetStreamMedia->updateMedia(); |
216 | } | 216 | } |
@@ -221,7 +221,7 @@ void LLAudioEngine::stopInternetStream() | |||
221 | // virtual | 221 | // virtual |
222 | void LLAudioEngine::pauseInternetStream(int pause) | 222 | void LLAudioEngine::pauseInternetStream(int pause) |
223 | { | 223 | { |
224 | llinfos << "entered pauseInternetStream()" << llendl; | 224 | LL_INFOS("AudioEngine") << "entered pauseInternetStream()" << llendl; |
225 | 225 | ||
226 | if(!mInternetStreamMedia) | 226 | if(!mInternetStreamMedia) |
227 | return; | 227 | return; |
@@ -230,12 +230,12 @@ void LLAudioEngine::pauseInternetStream(int pause) | |||
230 | { | 230 | { |
231 | if(! mInternetStreamMedia->addCommand(LLMediaBase::COMMAND_PAUSE)) | 231 | if(! mInternetStreamMedia->addCommand(LLMediaBase::COMMAND_PAUSE)) |
232 | { | 232 | { |
233 | llinfos << "attempting to pause stream failed!" << llendl; | 233 | LL_INFOS("AudioEngine") << "attempting to pause stream failed!" << llendl; |
234 | } | 234 | } |
235 | } else { | 235 | } else { |
236 | if(! mInternetStreamMedia->addCommand(LLMediaBase::COMMAND_START)) | 236 | if(! mInternetStreamMedia->addCommand(LLMediaBase::COMMAND_START)) |
237 | { | 237 | { |
238 | llinfos << "attempting to unpause stream failed!" << llendl; | 238 | LL_INFOS("AudioEngine") << "attempting to unpause stream failed!" << llendl; |
239 | } | 239 | } |
240 | } | 240 | } |
241 | mInternetStreamMedia->updateMedia(); | 241 | mInternetStreamMedia->updateMedia(); |
@@ -386,7 +386,7 @@ void LLAudioEngine::idle(F32 max_decode_time) | |||
386 | LLAudioChannel *channelp = getFreeChannel(max_priority); | 386 | LLAudioChannel *channelp = getFreeChannel(max_priority); |
387 | if (channelp) | 387 | if (channelp) |
388 | { | 388 | { |
389 | //llinfos << "Replacing source in channel due to priority!" << llendl; | 389 | //LL_INFOS("AudioEngine") << "Replacing source in channel due to priority!" << llendl; |
390 | max_sourcep->setChannel(channelp); | 390 | max_sourcep->setChannel(channelp); |
391 | channelp->setSource(max_sourcep); | 391 | channelp->setSource(max_sourcep); |
392 | if (max_sourcep->isSyncSlave()) | 392 | if (max_sourcep->isSyncSlave()) |
@@ -553,7 +553,7 @@ void LLAudioEngine::idle(F32 max_decode_time) | |||
553 | { | 553 | { |
554 | if (!mBuffers[i]->mInUse && mBuffers[i]->mLastUseTimer.getElapsedTimeF32() > 30.f) | 554 | if (!mBuffers[i]->mInUse && mBuffers[i]->mLastUseTimer.getElapsedTimeF32() > 30.f) |
555 | { | 555 | { |
556 | //llinfos << "Flushing unused buffer!" << llendl; | 556 | //LL_INFOS("AudioEngine") << "Flushing unused buffer!" << llendl; |
557 | mBuffers[i]->mAudioDatap->mBufferp = NULL; | 557 | mBuffers[i]->mAudioDatap->mBufferp = NULL; |
558 | delete mBuffers[i]; | 558 | delete mBuffers[i]; |
559 | mBuffers[i] = NULL; | 559 | mBuffers[i] = NULL; |
@@ -666,8 +666,8 @@ LLAudioBuffer *LLAudioEngine::getFreeBuffer() | |||
666 | 666 | ||
667 | if (buffer_id >= 0) | 667 | if (buffer_id >= 0) |
668 | { | 668 | { |
669 | llinfos << "Taking over unused buffer " << buffer_id << llendl; | 669 | LL_INFOS("AudioEngine") << "Taking over unused buffer " << buffer_id << llendl; |
670 | //llinfos << "Flushing unused buffer!" << llendl; | 670 | //LL_INFOS("AudioEngine") << "Flushing unused buffer!" << llendl; |
671 | mBuffers[buffer_id]->mAudioDatap->mBufferp = NULL; | 671 | mBuffers[buffer_id]->mAudioDatap->mBufferp = NULL; |
672 | delete mBuffers[buffer_id]; | 672 | delete mBuffers[buffer_id]; |
673 | mBuffers[buffer_id] = createBuffer(); | 673 | mBuffers[buffer_id] = createBuffer(); |
@@ -879,7 +879,7 @@ void LLAudioEngine::triggerSound(const LLUUID &audio_uuid, const LLUUID& owner_i | |||
879 | const S32 type, const LLVector3d &pos_global) | 879 | const S32 type, const LLVector3d &pos_global) |
880 | { | 880 | { |
881 | // Create a new source (since this can't be associated with an existing source. | 881 | // Create a new source (since this can't be associated with an existing source. |
882 | //llinfos << "Localized: " << audio_uuid << llendl; | 882 | //LL_INFOS("AudioEngine") << "Localized: " << audio_uuid << llendl; |
883 | 883 | ||
884 | if (mMuted) | 884 | if (mMuted) |
885 | { | 885 | { |
@@ -1101,10 +1101,10 @@ bool LLAudioEngine::hasLocalFile(const LLUUID &uuid) | |||
1101 | 1101 | ||
1102 | void LLAudioEngine::startNextTransfer() | 1102 | void LLAudioEngine::startNextTransfer() |
1103 | { | 1103 | { |
1104 | //llinfos << "LLAudioEngine::startNextTransfer()" << llendl; | 1104 | //LL_INFOS("AudioEngine") << "LLAudioEngine::startNextTransfer()" << llendl; |
1105 | if (mCurrentTransfer.notNull() || getMuted()) | 1105 | if (mCurrentTransfer.notNull() || getMuted()) |
1106 | { | 1106 | { |
1107 | //llinfos << "Transfer in progress, aborting" << llendl; | 1107 | //LL_INFOS("AudioEngine") << "Transfer in progress, aborting" << llendl; |
1108 | return; | 1108 | return; |
1109 | } | 1109 | } |
1110 | 1110 | ||
@@ -1285,7 +1285,7 @@ void LLAudioEngine::startNextTransfer() | |||
1285 | 1285 | ||
1286 | if (asset_id.notNull()) | 1286 | if (asset_id.notNull()) |
1287 | { | 1287 | { |
1288 | llinfos << "Getting asset data for: " << asset_id << llendl; | 1288 | LL_INFOS("AudioEngine") << "Getting asset data for: " << asset_id << llendl; |
1289 | gAudiop->mCurrentTransfer = asset_id; | 1289 | gAudiop->mCurrentTransfer = asset_id; |
1290 | gAudiop->mCurrentTransferTimer.reset(); | 1290 | gAudiop->mCurrentTransferTimer.reset(); |
1291 | gAssetStorage->getAssetData(asset_id, LLAssetType::AT_SOUND, | 1291 | gAssetStorage->getAssetData(asset_id, LLAssetType::AT_SOUND, |
@@ -1293,7 +1293,7 @@ void LLAudioEngine::startNextTransfer() | |||
1293 | } | 1293 | } |
1294 | else | 1294 | else |
1295 | { | 1295 | { |
1296 | //llinfos << "No pending transfers?" << llendl; | 1296 | //LL_INFOS("AudioEngine") << "No pending transfers?" << llendl; |
1297 | } | 1297 | } |
1298 | } | 1298 | } |
1299 | 1299 | ||
@@ -1303,7 +1303,7 @@ void LLAudioEngine::assetCallback(LLVFS *vfs, const LLUUID &uuid, LLAssetType::E | |||
1303 | { | 1303 | { |
1304 | if (result_code) | 1304 | if (result_code) |
1305 | { | 1305 | { |
1306 | llinfos << "Boom, error in audio file transfer: " << LLAssetStorage::getErrorString( result_code ) << " (" << result_code << ")" << llendl; | 1306 | LL_INFOS("AudioEngine") << "Boom, error in audio file transfer: " << LLAssetStorage::getErrorString( result_code ) << " (" << result_code << ")" << llendl; |
1307 | // Need to mark data as bad to avoid constant rerequests. | 1307 | // Need to mark data as bad to avoid constant rerequests. |
1308 | LLAudioData *adp = gAudiop->getAudioData(uuid); | 1308 | LLAudioData *adp = gAudiop->getAudioData(uuid); |
1309 | if (adp) | 1309 | if (adp) |
@@ -1524,7 +1524,7 @@ bool LLAudioSource::isDone() | |||
1524 | { | 1524 | { |
1525 | // We don't have a channel assigned, and it's been | 1525 | // We don't have a channel assigned, and it's been |
1526 | // over 5 seconds since we tried to play it. Don't bother. | 1526 | // over 5 seconds since we tried to play it. Don't bother. |
1527 | //llinfos << "No channel assigned, source is done" << llendl; | 1527 | //LL_INFOS("AudioEngine") << "No channel assigned, source is done" << llendl; |
1528 | return true; | 1528 | return true; |
1529 | } | 1529 | } |
1530 | else | 1530 | else |
@@ -1684,7 +1684,7 @@ LLAudioChannel::LLAudioChannel() : | |||
1684 | LLAudioChannel::~LLAudioChannel() | 1684 | LLAudioChannel::~LLAudioChannel() |
1685 | { | 1685 | { |
1686 | // Need to disconnect any sources which are using this channel. | 1686 | // Need to disconnect any sources which are using this channel. |
1687 | //llinfos << "Cleaning up audio channel" << llendl; | 1687 | //LL_INFOS("AudioEngine") << "Cleaning up audio channel" << llendl; |
1688 | if (mCurrentSourcep) | 1688 | if (mCurrentSourcep) |
1689 | { | 1689 | { |
1690 | mCurrentSourcep->setChannel(NULL); | 1690 | mCurrentSourcep->setChannel(NULL); |
@@ -1695,12 +1695,12 @@ LLAudioChannel::~LLAudioChannel() | |||
1695 | 1695 | ||
1696 | void LLAudioChannel::setSource(LLAudioSource *sourcep) | 1696 | void LLAudioChannel::setSource(LLAudioSource *sourcep) |
1697 | { | 1697 | { |
1698 | //llinfos << this << ": setSource(" << sourcep << ")" << llendl; | 1698 | //LL_INFOS("AudioEngine") << this << ": setSource(" << sourcep << ")" << llendl; |
1699 | 1699 | ||
1700 | if (!sourcep) | 1700 | if (!sourcep) |
1701 | { | 1701 | { |
1702 | // Clearing the source for this channel, don't need to do anything. | 1702 | // Clearing the source for this channel, don't need to do anything. |
1703 | //llinfos << "Clearing source for channel" << llendl; | 1703 | //LL_INFOS("AudioEngine") << "Clearing source for channel" << llendl; |
1704 | cleanup(); | 1704 | cleanup(); |
1705 | mCurrentSourcep = NULL; | 1705 | mCurrentSourcep = NULL; |
1706 | mWaiting = false; | 1706 | mWaiting = false; |
@@ -1710,7 +1710,7 @@ void LLAudioChannel::setSource(LLAudioSource *sourcep) | |||
1710 | if (sourcep == mCurrentSourcep) | 1710 | if (sourcep == mCurrentSourcep) |
1711 | { | 1711 | { |
1712 | // Don't reallocate the channel, this will make FMOD goofy. | 1712 | // Don't reallocate the channel, this will make FMOD goofy. |
1713 | //llinfos << "Calling setSource with same source!" << llendl; | 1713 | //LL_INFOS("AudioEngine") << "Calling setSource with same source!" << llendl; |
1714 | } | 1714 | } |
1715 | 1715 | ||
1716 | mCurrentSourcep = sourcep; | 1716 | mCurrentSourcep = sourcep; |
@@ -1802,7 +1802,7 @@ bool LLAudioData::load() | |||
1802 | if (mBufferp) | 1802 | if (mBufferp) |
1803 | { | 1803 | { |
1804 | // We already have this sound in a buffer, don't do anything. | 1804 | // We already have this sound in a buffer, don't do anything. |
1805 | llinfos << "Already have a buffer for this sound, don't bother loading!" << llendl; | 1805 | LL_INFOS("AudioEngine") << "Already have a buffer for this sound, don't bother loading!" << llendl; |
1806 | return true; | 1806 | return true; |
1807 | } | 1807 | } |
1808 | 1808 | ||
@@ -1810,7 +1810,7 @@ bool LLAudioData::load() | |||
1810 | if (!mBufferp) | 1810 | if (!mBufferp) |
1811 | { | 1811 | { |
1812 | // No free buffers, abort. | 1812 | // No free buffers, abort. |
1813 | llinfos << "Not able to allocate a new audio buffer, aborting." << llendl; | 1813 | LL_INFOS("AudioEngine") << "Not able to allocate a new audio buffer, aborting." << llendl; |
1814 | return false; | 1814 | return false; |
1815 | } | 1815 | } |
1816 | 1816 | ||
diff --git a/linden/indra/llaudio/audioengine_openal.cpp b/linden/indra/llaudio/audioengine_openal.cpp index 002dfba..f13a5fa 100644 --- a/linden/indra/llaudio/audioengine_openal.cpp +++ b/linden/indra/llaudio/audioengine_openal.cpp | |||
@@ -62,33 +62,33 @@ bool LLAudioEngine_OpenAL::init(const S32 num_channels, void* userdata) | |||
62 | 62 | ||
63 | if(!alutInit(NULL, NULL)) | 63 | if(!alutInit(NULL, NULL)) |
64 | { | 64 | { |
65 | llwarns << "LLAudioEngine_OpenAL::init() ALUT initialization failed: " << alutGetErrorString (alutGetError ()) << llendl; | 65 | LL_WARNS("OpenAL") << "LLAudioEngine_OpenAL::init() ALUT initialization failed: " << alutGetErrorString (alutGetError ()) << LL_ENDL; |
66 | return false; | 66 | return false; |
67 | } | 67 | } |
68 | 68 | ||
69 | llinfos << "LLAudioEngine_OpenAL::init() OpenAL successfully initialized" << llendl; | 69 | LL_INFOS("OpenAL") << "LLAudioEngine_OpenAL::init() OpenAL successfully initialized" << LL_ENDL; |
70 | 70 | ||
71 | llinfos << "OpenAL version: " | 71 | LL_INFOS("OpenAL") << "OpenAL version: " |
72 | << ll_safe_string(alGetString(AL_VERSION)) << llendl; | 72 | << ll_safe_string(alGetString(AL_VERSION)) << LL_ENDL; |
73 | llinfos << "OpenAL vendor: " | 73 | LL_INFOS("OpenAL") << "OpenAL vendor: " |
74 | << ll_safe_string(alGetString(AL_VENDOR)) << llendl; | 74 | << ll_safe_string(alGetString(AL_VENDOR)) << LL_ENDL; |
75 | llinfos << "OpenAL renderer: " | 75 | LL_INFOS("OpenAL") << "OpenAL renderer: " |
76 | << ll_safe_string(alGetString(AL_RENDERER)) << llendl; | 76 | << ll_safe_string(alGetString(AL_RENDERER)) << LL_ENDL; |
77 | 77 | ||
78 | ALint major = alutGetMajorVersion (); | 78 | ALint major = alutGetMajorVersion (); |
79 | ALint minor = alutGetMinorVersion (); | 79 | ALint minor = alutGetMinorVersion (); |
80 | llinfos << "ALUT version: " << major << "." << minor << llendl; | 80 | LL_INFOS("OpenAL") << "ALUT version: " << major << "." << minor << LL_ENDL; |
81 | 81 | ||
82 | ALCdevice *device = alcGetContextsDevice(alcGetCurrentContext()); | 82 | ALCdevice *device = alcGetContextsDevice(alcGetCurrentContext()); |
83 | 83 | ||
84 | alcGetIntegerv(device, ALC_MAJOR_VERSION, 1, &major); | 84 | alcGetIntegerv(device, ALC_MAJOR_VERSION, 1, &major); |
85 | alcGetIntegerv(device, ALC_MAJOR_VERSION, 1, &minor); | 85 | alcGetIntegerv(device, ALC_MAJOR_VERSION, 1, &minor); |
86 | llinfos << "ALC version: " << major << "." << minor << llendl; | 86 | LL_INFOS("OpenAL") << "ALC version: " << major << "." << minor << LL_ENDL; |
87 | 87 | ||
88 | llinfos << "ALC default device: " | 88 | LL_INFOS("OpenAL") << "ALC default device: " |
89 | << ll_safe_string(alcGetString(device, | 89 | << ll_safe_string(alcGetString(device, |
90 | ALC_DEFAULT_DEVICE_SPECIFIER)) | 90 | ALC_DEFAULT_DEVICE_SPECIFIER)) |
91 | << llendl; | 91 | << LL_ENDL; |
92 | 92 | ||
93 | return true; | 93 | return true; |
94 | } | 94 | } |
@@ -128,24 +128,24 @@ void LLAudioEngine_OpenAL::allocateListener() | |||
128 | mListenerp = (LLListener *) new LLListener_OpenAL(); | 128 | mListenerp = (LLListener *) new LLListener_OpenAL(); |
129 | if(!mListenerp) | 129 | if(!mListenerp) |
130 | { | 130 | { |
131 | llwarns << "LLAudioEngine_OpenAL::allocateListener() Listener creation failed" << llendl; | 131 | LL_WARNS("OpenAL") << "LLAudioEngine_OpenAL::allocateListener() Listener creation failed" << LL_ENDL; |
132 | } | 132 | } |
133 | } | 133 | } |
134 | 134 | ||
135 | // virtual | 135 | // virtual |
136 | void LLAudioEngine_OpenAL::shutdown() | 136 | void LLAudioEngine_OpenAL::shutdown() |
137 | { | 137 | { |
138 | llinfos << "About to LLAudioEngine::shutdown()" << llendl; | 138 | LL_INFOS("OpenAL") << "About to LLAudioEngine::shutdown()" << LL_ENDL; |
139 | LLAudioEngine::shutdown(); | 139 | LLAudioEngine::shutdown(); |
140 | 140 | ||
141 | llinfos << "About to alutExit()" << llendl; | 141 | LL_INFOS("OpenAL") << "About to alutExit()" << LL_ENDL; |
142 | if(!alutExit()) | 142 | if(!alutExit()) |
143 | { | 143 | { |
144 | llwarns << "Nuts." << llendl; | 144 | LL_WARNS("OpenAL") << "Nuts." << LL_ENDL; |
145 | llwarns << "LLAudioEngine_OpenAL::shutdown() ALUT shutdown failed: " << alutGetErrorString (alutGetError ()) << llendl; | 145 | LL_WARNS("OpenAL") << "LLAudioEngine_OpenAL::shutdown() ALUT shutdown failed: " << alutGetErrorString (alutGetError ()) << LL_ENDL; |
146 | } | 146 | } |
147 | 147 | ||
148 | llinfos << "LLAudioEngine_OpenAL::shutdown() OpenAL successfully shut down" << llendl; | 148 | LL_INFOS("OpenAL") << "LLAudioEngine_OpenAL::shutdown() OpenAL successfully shut down" << LL_ENDL; |
149 | 149 | ||
150 | delete mListenerp; | 150 | delete mListenerp; |
151 | mListenerp = NULL; | 151 | mListenerp = NULL; |
@@ -163,7 +163,7 @@ LLAudioChannel *LLAudioEngine_OpenAL::createChannel() | |||
163 | 163 | ||
164 | void LLAudioEngine_OpenAL::setInternalGain(F32 gain) | 164 | void LLAudioEngine_OpenAL::setInternalGain(F32 gain) |
165 | { | 165 | { |
166 | //llinfos << "LLAudioEngine_OpenAL::setInternalGain() Gain: " << gain << llendl; | 166 | //LL_INFOS("OpenAL") << "LLAudioEngine_OpenAL::setInternalGain() Gain: " << gain << LL_ENDL; |
167 | alListenerf(AL_GAIN, gain); | 167 | alListenerf(AL_GAIN, gain); |
168 | } | 168 | } |
169 | 169 | ||
@@ -191,7 +191,7 @@ void LLAudioChannelOpenAL::play() | |||
191 | { | 191 | { |
192 | if (mALSource == AL_NONE) | 192 | if (mALSource == AL_NONE) |
193 | { | 193 | { |
194 | llwarns << "Playing without a mALSource, aborting" << llendl; | 194 | LL_WARNS("OpenAL") << "Playing without a mALSource, aborting" << LL_ENDL; |
195 | return; | 195 | return; |
196 | } | 196 | } |
197 | 197 | ||
@@ -216,8 +216,8 @@ void LLAudioChannelOpenAL::playSynced(LLAudioChannel *channelp) | |||
216 | alGetSourcef(masterchannelp->mALSource, AL_SEC_OFFSET, | 216 | alGetSourcef(masterchannelp->mALSource, AL_SEC_OFFSET, |
217 | &master_offset); | 217 | &master_offset); |
218 | 218 | ||
219 | llinfos << "Syncing with master at " << master_offset | 219 | LL_INFOS("OpenAL") << "Syncing with master at " << master_offset |
220 | << "sec" << llendl; | 220 | << "sec" << LL_ENDL; |
221 | // *TODO: detect when this fails, maybe use AL_SAMPLE_ | 221 | // *TODO: detect when this fails, maybe use AL_SAMPLE_ |
222 | alSourcef(mALSource, AL_SEC_OFFSET, master_offset); | 222 | alSourcef(mALSource, AL_SEC_OFFSET, master_offset); |
223 | } | 223 | } |
@@ -341,18 +341,18 @@ bool LLAudioBufferOpenAL::loadWAV(const std::string& filename) | |||
341 | ALenum error = alutGetError(); | 341 | ALenum error = alutGetError(); |
342 | if (gDirUtilp->fileExists(filename)) | 342 | if (gDirUtilp->fileExists(filename)) |
343 | { | 343 | { |
344 | llwarns << | 344 | LL_WARNS("OpenAL") << |
345 | "LLAudioBufferOpenAL::loadWAV() Error loading " | 345 | "LLAudioBufferOpenAL::loadWAV() Error loading " |
346 | << filename | 346 | << filename |
347 | << " " << alutGetErrorString(error) << llendl; | 347 | << " " << alutGetErrorString(error) << LL_ENDL; |
348 | } | 348 | } |
349 | else | 349 | else |
350 | { | 350 | { |
351 | // It's common for the file to not actually exist. | 351 | // It's common for the file to not actually exist. |
352 | lldebugs << | 352 | LL_DEBUGS("OpenAL") << |
353 | "LLAudioBufferOpenAL::loadWAV() Error loading " | 353 | "LLAudioBufferOpenAL::loadWAV() Error loading " |
354 | << filename | 354 | << filename |
355 | << " " << alutGetErrorString(error) << llendl; | 355 | << " " << alutGetErrorString(error) << LL_ENDL; |
356 | } | 356 | } |
357 | return false; | 357 | return false; |
358 | } | 358 | } |
@@ -376,7 +376,7 @@ U32 LLAudioBufferOpenAL::getLength() | |||
376 | void LLAudioEngine_OpenAL::initWind() | 376 | void LLAudioEngine_OpenAL::initWind() |
377 | { | 377 | { |
378 | ALenum error; | 378 | ALenum error; |
379 | llinfos << "LLAudioEngine_OpenAL::initWind() start" << llendl; | 379 | LL_INFOS("OpenAL") << "LLAudioEngine_OpenAL::initWind() start" << LL_ENDL; |
380 | 380 | ||
381 | mNumEmptyWindALBuffers = MAX_NUM_WIND_BUFFERS; | 381 | mNumEmptyWindALBuffers = MAX_NUM_WIND_BUFFERS; |
382 | 382 | ||
@@ -386,7 +386,7 @@ void LLAudioEngine_OpenAL::initWind() | |||
386 | 386 | ||
387 | if((error=alGetError()) != AL_NO_ERROR) | 387 | if((error=alGetError()) != AL_NO_ERROR) |
388 | { | 388 | { |
389 | llwarns << "LLAudioEngine_OpenAL::initWind() Error creating wind sources: "<<error<<llendl; | 389 | LL_WARNS("OpenAL") << "LLAudioEngine_OpenAL::initWind() Error creating wind sources: "<<error<<LL_ENDL; |
390 | } | 390 | } |
391 | 391 | ||
392 | mWindGen = new LLWindGen<WIND_SAMPLE_T>; | 392 | mWindGen = new LLWindGen<WIND_SAMPLE_T>; |
@@ -399,16 +399,16 @@ void LLAudioEngine_OpenAL::initWind() | |||
399 | 399 | ||
400 | if(mWindBuf==NULL) | 400 | if(mWindBuf==NULL) |
401 | { | 401 | { |
402 | llerrs << "LLAudioEngine_OpenAL::initWind() Error creating wind memory buffer" << llendl; | 402 | LL_ERRS("OpenAL") << "LLAudioEngine_OpenAL::initWind() Error creating wind memory buffer" << LL_ENDL; |
403 | mEnableWind=false; | 403 | mEnableWind=false; |
404 | } | 404 | } |
405 | 405 | ||
406 | llinfos << "LLAudioEngine_OpenAL::initWind() done" << llendl; | 406 | LL_INFOS("OpenAL") << "LLAudioEngine_OpenAL::initWind() done" << LL_ENDL; |
407 | } | 407 | } |
408 | 408 | ||
409 | void LLAudioEngine_OpenAL::cleanupWind() | 409 | void LLAudioEngine_OpenAL::cleanupWind() |
410 | { | 410 | { |
411 | llinfos << "LLAudioEngine_OpenAL::cleanupWind()" << llendl; | 411 | LL_INFOS("OpenAL") << "LLAudioEngine_OpenAL::cleanupWind()" << LL_ENDL; |
412 | 412 | ||
413 | if (mWindSource != AL_NONE) | 413 | if (mWindSource != AL_NONE) |
414 | { | 414 | { |
@@ -484,7 +484,7 @@ void LLAudioEngine_OpenAL::updateWind(LLVector3 wind_vec, F32 camera_altitude) | |||
484 | mNumEmptyWindALBuffers = llmin(mNumEmptyWindALBuffers + processed * 3 - unprocessed, MAX_NUM_WIND_BUFFERS-unprocessed); | 484 | mNumEmptyWindALBuffers = llmin(mNumEmptyWindALBuffers + processed * 3 - unprocessed, MAX_NUM_WIND_BUFFERS-unprocessed); |
485 | mNumEmptyWindALBuffers = llmax(mNumEmptyWindALBuffers, 0); | 485 | mNumEmptyWindALBuffers = llmax(mNumEmptyWindALBuffers, 0); |
486 | 486 | ||
487 | //llinfos << "mNumEmptyWindALBuffers: " << mNumEmptyWindALBuffers <<" (" << unprocessed << ":" << processed << ")" << llendl; | 487 | //LL_INFOS("OpenAL") << "mNumEmptyWindALBuffers: " << mNumEmptyWindALBuffers <<" (" << unprocessed << ":" << processed << ")" << LL_ENDL; |
488 | 488 | ||
489 | while(processed--) // unqueue old buffers | 489 | while(processed--) // unqueue old buffers |
490 | { | 490 | { |
@@ -495,7 +495,7 @@ void LLAudioEngine_OpenAL::updateWind(LLVector3 wind_vec, F32 camera_altitude) | |||
495 | error = alGetError(); | 495 | error = alGetError(); |
496 | if(error != AL_NO_ERROR) | 496 | if(error != AL_NO_ERROR) |
497 | { | 497 | { |
498 | llwarns << "LLAudioEngine_OpenAL::updateWind() error swapping (unqueuing) buffers" << llendl; | 498 | LL_WARNS("OpenAL") << "LLAudioEngine_OpenAL::updateWind() error swapping (unqueuing) buffers" << LL_ENDL; |
499 | } | 499 | } |
500 | else | 500 | else |
501 | { | 501 | { |
@@ -511,7 +511,7 @@ void LLAudioEngine_OpenAL::updateWind(LLVector3 wind_vec, F32 camera_altitude) | |||
511 | alGenBuffers(1,&buffer); | 511 | alGenBuffers(1,&buffer); |
512 | if((error=alGetError()) != AL_NO_ERROR) | 512 | if((error=alGetError()) != AL_NO_ERROR) |
513 | { | 513 | { |
514 | llwarns << "LLAudioEngine_OpenAL::initWind() Error creating wind buffer: " << error << llendl; | 514 | LL_WARNS("OpenAL") << "LLAudioEngine_OpenAL::initWind() Error creating wind buffer: " << error << LL_ENDL; |
515 | break; | 515 | break; |
516 | } | 516 | } |
517 | 517 | ||
@@ -523,12 +523,12 @@ void LLAudioEngine_OpenAL::updateWind(LLVector3 wind_vec, F32 camera_altitude) | |||
523 | mWindBufFreq); | 523 | mWindBufFreq); |
524 | error = alGetError(); | 524 | error = alGetError(); |
525 | if(error != AL_NO_ERROR) | 525 | if(error != AL_NO_ERROR) |
526 | llwarns << "LLAudioEngine_OpenAL::updateWind() error swapping (bufferdata) buffers" << llendl; | 526 | LL_WARNS("OpenAL") << "LLAudioEngine_OpenAL::updateWind() error swapping (bufferdata) buffers" << LL_ENDL; |
527 | 527 | ||
528 | alSourceQueueBuffers(mWindSource, 1, &buffer); | 528 | alSourceQueueBuffers(mWindSource, 1, &buffer); |
529 | error = alGetError(); | 529 | error = alGetError(); |
530 | if(error != AL_NO_ERROR) | 530 | if(error != AL_NO_ERROR) |
531 | llwarns << "LLAudioEngine_OpenAL::updateWind() error swapping (queuing) buffers" << llendl; | 531 | LL_WARNS("OpenAL") << "LLAudioEngine_OpenAL::updateWind() error swapping (queuing) buffers" << LL_ENDL; |
532 | 532 | ||
533 | --mNumEmptyWindALBuffers; | 533 | --mNumEmptyWindALBuffers; |
534 | } | 534 | } |
@@ -539,6 +539,6 @@ void LLAudioEngine_OpenAL::updateWind(LLVector3 wind_vec, F32 camera_altitude) | |||
539 | { | 539 | { |
540 | alSourcePlay(mWindSource); | 540 | alSourcePlay(mWindSource); |
541 | 541 | ||
542 | llinfos << "Wind had stopped - probably ran out of buffers - restarting: " << (unprocessed+mNumEmptyWindALBuffers) << " now queued." << llendl; | 542 | LL_INFOS("OpenAL") << "Wind had stopped - probably ran out of buffers - restarting: " << (unprocessed+mNumEmptyWindALBuffers) << " now queued." << LL_ENDL; |
543 | } | 543 | } |
544 | } | 544 | } |