diff options
author | Tofu Linden <tofu.linden@lindenlab.com> | 2009-11-25 17:08:03 +0000 |
---|---|---|
committer | Tofu Linden <tofu.linden@lindenlab.com> | 2009-11-25 17:08:03 +0000 |
commit | 6631e4d872fd4bd0208e44320e0b189b624cda86 (patch) | |
tree | c31859da67fdbc70e171d92dda38f9401e85572c | |
parent | 57bc7dc44f31ef132a4abec228459c490c425eed (diff) | |
parent | 03156bf9b77ea624abcb20cbf9b56b5c10938904 (diff) |
merge.
-rw-r--r-- | indra/llaudio/llaudiodecodemgr.cpp | 18 |
1 files changed, 13 insertions, 5 deletions
diff --git a/indra/llaudio/llaudiodecodemgr.cpp b/indra/llaudio/llaudiodecodemgr.cpp index ae959eaa81..ca0a665a97 100644 --- a/indra/llaudio/llaudiodecodemgr.cpp +++ b/indra/llaudio/llaudiodecodemgr.cpp @@ -68,6 +68,7 @@ public: ~WriteResponder() {} void completed(S32 bytes) { + llinfos << "vorbis decoder COMPLETED callback with " << bytes << llendl; mDecoder->ioComplete(bytes); } LLPointer<LLVorbisDecodeState> mDecoder; @@ -202,7 +203,7 @@ BOOL LLVorbisDecodeState::initDecode() vfs_callbacks.close_func = vfs_close; vfs_callbacks.tell_func = vfs_tell; - //llinfos << "Initing decode from vfile: " << mUUID << llendl; + llinfos << "Initing decode from vfile: " << mUUID << llendl; mInFilep = new LLVFile(gVFS, mUUID, LLAssetType::AT_SOUND); if (!mInFilep || !mInFilep->getSize()) @@ -355,13 +356,14 @@ BOOL LLVorbisDecodeState::decodeSection() } if (mDone) { -// llwarns << "Already done with decode, aborting!" << llendl; + llwarns << mOutFilename << " Already done with vorbis decode, aborting!" << llendl; return TRUE; } char pcmout[4096]; /*Flawfinder: ignore*/ BOOL eof = FALSE; long ret=ov_read(&mVF, pcmout, sizeof(pcmout), 0, 2, 1, &mCurrentSection); + llinfos << mOutFilename << " vorbis decode returned " << ret << llendl; if (ret == 0) { /* EOF */ @@ -401,9 +403,10 @@ BOOL LLVorbisDecodeState::finishDecode() } #if !defined(USE_WAV_VFILE) - if (mFileHandle == LLLFSThread::nullHandle()) + if (mFileHandle == LLLFSThread::nullHandle()) // haven't started to write to disk yet... #endif { + llwarns << "mFileHandle is still null in vorbis decode for " << getUUID() << llendl; ov_clear(&mVF); // write "data" chunk length, in little-endian format @@ -475,7 +478,10 @@ BOOL LLVorbisDecodeState::finishDecode() mValid = FALSE; return TRUE; // we've finished } + #if !defined(USE_WAV_VFILE) + // start the write of the wav file to disk. + llwarns << "starting wav write to disk from vorbis decode " << mOutFilename << llendl; mBytesRead = -1; mFileHandle = LLLFSThread::sLocal->write(mOutFilename, &mWAVBuffer[0], 0, mWAVBuffer.size(), new WriteResponder(this)); @@ -495,6 +501,7 @@ BOOL LLVorbisDecodeState::finishDecode() } else { + llwarns << "claiming to not be done in finishDecode" << llendl; return FALSE; // not done } } @@ -502,11 +509,11 @@ BOOL LLVorbisDecodeState::finishDecode() mDone = TRUE; #if defined(USE_WAV_VFILE) - // write the data. + // write the data into the VFS. LLVFile output(gVFS, mUUID, LLAssetType::AT_SOUND_WAV); output.write(&mWAVBuffer[0], mWAVBuffer.size()); #endif - //llinfos << "Finished decode for " << getUUID() << llendl; + llinfos << "Finished decode for " << getUUID() << llendl; return TRUE; } @@ -553,6 +560,7 @@ void LLAudioDecodeMgr::Impl::processQueue(const F32 num_secs) // Decode in a loop until we're done or have run out of time. while(!(res = mCurrentDecodep->decodeSection()) && (decode_timer.getElapsedTimeF32() < num_secs)) { + llinfos << "vorbis/audio decode timer has " << decode_timer.getElapsedTimeF32() << "s elapsed, from an alottment of " << num_secs << "s" << llendl; // decodeSection does all of the work above } |