From 03156bf9b77ea624abcb20cbf9b56b5c10938904 Mon Sep 17 00:00:00 2001 From: Tofu Linden Date: Wed, 25 Nov 2009 14:56:55 +0000 Subject: lots of debuggy annotation to trace into the audio playback failure. it seems to be a VFS callback issue. --- indra/llaudio/llaudiodecodemgr.cpp | 18 +++++++++++++----- 1 file 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 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 } -- cgit v1.2.3 From f57abb0272597f869ed538522bc406b6f21e154c Mon Sep 17 00:00:00 2001 From: Tofu Linden Date: Fri, 27 Nov 2009 19:15:43 +0000 Subject: Backed out changeset 4c84d72f16ca --- indra/llaudio/llaudiodecodemgr.cpp | 18 +++++------------- 1 file changed, 5 insertions(+), 13 deletions(-) diff --git a/indra/llaudio/llaudiodecodemgr.cpp b/indra/llaudio/llaudiodecodemgr.cpp index ca0a665a97..ae959eaa81 100644 --- a/indra/llaudio/llaudiodecodemgr.cpp +++ b/indra/llaudio/llaudiodecodemgr.cpp @@ -68,7 +68,6 @@ public: ~WriteResponder() {} void completed(S32 bytes) { - llinfos << "vorbis decoder COMPLETED callback with " << bytes << llendl; mDecoder->ioComplete(bytes); } LLPointer mDecoder; @@ -203,7 +202,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()) @@ -356,14 +355,13 @@ BOOL LLVorbisDecodeState::decodeSection() } if (mDone) { - llwarns << mOutFilename << " Already done with vorbis decode, aborting!" << llendl; +// llwarns << "Already done with 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 */ @@ -403,10 +401,9 @@ BOOL LLVorbisDecodeState::finishDecode() } #if !defined(USE_WAV_VFILE) - if (mFileHandle == LLLFSThread::nullHandle()) // haven't started to write to disk yet... + if (mFileHandle == LLLFSThread::nullHandle()) #endif { - llwarns << "mFileHandle is still null in vorbis decode for " << getUUID() << llendl; ov_clear(&mVF); // write "data" chunk length, in little-endian format @@ -478,10 +475,7 @@ 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)); @@ -501,7 +495,6 @@ BOOL LLVorbisDecodeState::finishDecode() } else { - llwarns << "claiming to not be done in finishDecode" << llendl; return FALSE; // not done } } @@ -509,11 +502,11 @@ BOOL LLVorbisDecodeState::finishDecode() mDone = TRUE; #if defined(USE_WAV_VFILE) - // write the data into the VFS. + // write the data. 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; } @@ -560,7 +553,6 @@ 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 } -- cgit v1.2.3 From 3eb48e40151f386e604dc19c54d6761c3c19fa8b Mon Sep 17 00:00:00 2001 From: Steve Bennetts Date: Sun, 29 Nov 2009 22:13:32 -0800 Subject: Fix for Windows crash (incorrect date format crashes windows) --- indra/llcommon/llstring.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/indra/llcommon/llstring.cpp b/indra/llcommon/llstring.cpp index 3030ae2c8b..c027aa7bdd 100644 --- a/indra/llcommon/llstring.cpp +++ b/indra/llcommon/llstring.cpp @@ -717,7 +717,7 @@ void LLStringOps::setupDatetimeInfo (bool daylight) datetimeToCodes["day"] = "%d"; // 31 datetimeToCodes["hour24"] = "%H"; // 14 datetimeToCodes["hour"] = "%H"; // 14 - datetimeToCodes["hour12"] = "%l"; // 02 + datetimeToCodes["hour12"] = "%I"; // 02 datetimeToCodes["min"] = "%M"; // 59 datetimeToCodes["ampm"] = "%p"; // AM datetimeToCodes["second"] = "%S"; // 59 -- cgit v1.2.3 From d4e01315e3f39dd14bb2c14f09e4e94749542b06 Mon Sep 17 00:00:00 2001 From: Steve Bennetts Date: Sun, 29 Nov 2009 22:49:15 -0800 Subject: EXT-2595 - Sounds not playing because LFSThread (Local File System) wasn't being updated. --- indra/newview/llappviewer.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/indra/newview/llappviewer.cpp b/indra/newview/llappviewer.cpp index f196ebbf93..eb08707b61 100644 --- a/indra/newview/llappviewer.cpp +++ b/indra/newview/llappviewer.cpp @@ -907,6 +907,7 @@ static LLFastTimer::DeclareTimer FTM_SLEEP("Sleep"); static LLFastTimer::DeclareTimer FTM_TEXTURE_CACHE("Texture Cache"); static LLFastTimer::DeclareTimer FTM_DECODE("Image Decode"); static LLFastTimer::DeclareTimer FTM_VFS("VFS Thread"); +static LLFastTimer::DeclareTimer FTM_LFS("LFS Thread"); static LLFastTimer::DeclareTimer FTM_PAUSE_THREADS("Pause Threads"); static LLFastTimer::DeclareTimer FTM_IDLE("Idle"); static LLFastTimer::DeclareTimer FTM_PUMP("Pump"); @@ -1123,6 +1124,10 @@ bool LLAppViewer::mainLoop() LLFastTimer ftm(FTM_VFS); io_pending += LLVFSThread::updateClass(1); } + { + LLFastTimer ftm(FTM_LFS); + io_pending += LLLFSThread::updateClass(1); + } if (io_pending > 1000) { -- cgit v1.2.3