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/audioengine.cpp | |
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/audioengine.cpp')
-rw-r--r-- | linden/indra/llaudio/audioengine.cpp | 56 |
1 files changed, 28 insertions, 28 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 | ||