From f9be883b82ff9b16af3568d4581e02b2fb90f4f2 Mon Sep 17 00:00:00 2001 From: "v.audacity" Date: Fri, 10 Sep 2010 03:19:24 +0000 Subject: [PATCH] Made requests for bug reports consistently go to feedback@audacityteam.org and compile issues go to "Compling Audacity" board on the Forum rather than going to -devel. Removed some related code cruft. --- src/Benchmark.cpp | 1 - src/Project.cpp | 6 ++---- src/Sequence.cpp | 45 +++++++++++++++++---------------------------- src/Sequence.h | 13 ------------- src/UndoManager.cpp | 19 ++++++++++--------- src/UndoManager.h | 2 +- win/compile.txt | 21 ++++++++++----------- 7 files changed, 40 insertions(+), 67 deletions(-) diff --git a/src/Benchmark.cpp b/src/Benchmark.cpp index 8819ddaca..af4932afb 100644 --- a/src/Benchmark.cpp +++ b/src/Benchmark.cpp @@ -397,7 +397,6 @@ void BenchmarkDialog::OnRun( wxCommandEvent &event ) t->GetClipByIndex(0)->GetSequence()->GetNumSamples()); goto fail; } - //t->Debug(); Printf(wxT("Performing %d edits...\n"), trials); wxTheApp->Yield(); diff --git a/src/Project.cpp b/src/Project.cpp index cbced7eb1..cb1ccc30d 100644 --- a/src/Project.cpp +++ b/src/Project.cpp @@ -3556,10 +3556,8 @@ void AudacityProject::PopState(TrackList * l) ODComputeSummaryTask* computeTask; Track* copyTrack; - while (t) { - // printf("Popping track with %d samples\n", - // ((WaveTrack *)t)->numSamples); - // ((WaveTrack *)t)->Debug(); + while (t) + { copyTrack=t->Duplicate(); mTracks->Add(copyTrack); diff --git a/src/Sequence.cpp b/src/Sequence.cpp index c3e3c6d03..91cdd2c24 100644 --- a/src/Sequence.cpp +++ b/src/Sequence.cpp @@ -934,10 +934,9 @@ bool Sequence::Read(samplePtr buffer, sampleFormat format, int result = f->ReadData(buffer, format, start, len); - if (result != len) { - // TODO err - wxPrintf(wxT("Expected to read %d samples, got %d samples.\n"), - len, result); + if (result != len) + { + wxLogError(wxT("Expected to read %d samples, got %d samples.\n"), len, result); if (result < 0) result = 0; ClearSamples(buffer, format, result, len-result); @@ -1621,29 +1620,26 @@ bool Sequence::ConsistencyCheck(const wxChar *whereStr) unsigned int i; sampleCount pos = 0; unsigned int numBlocks = mBlock->Count(); - bool error = false; + bool bError = false; for (i = 0; i < numBlocks; i++) { if (pos != mBlock->Item(i)->start) - error = true; + bError = true; pos += mBlock->Item(i)->f->GetLength(); } if (pos != mNumSamples) - error = true; + bError = true; - if (error) { - wxPrintf(wxT("*** Consistency check failed after %s ***\n"), whereStr); - Debug(); - printf("*** Please report this error to audacity-devel@lists.sourceforge.net ***\n"); - - printf("\n"); - printf("Recommended course of action:\n"); - printf("Undo the failed operation(s), then export or save your work and quit.\n"); - - return false; + if (bError) + { + wxLogError(wxT("*** Consistency check failed after %s ***\n"), whereStr); + wxString str; + DebugPrintf(&str); + wxLogError(wxT("%s"), str.c_str()); + wxLogError(wxT("*** Please report this error to feedback@audacityteam.org ***\n\n\Recommended course of action:\nUndo the failed operation(s), then export or save your work and quit.\n")); } - return true; + return !bError; } void Sequence::DebugPrintf(wxString *dest) @@ -1653,14 +1649,14 @@ void Sequence::DebugPrintf(wxString *dest) for (i = 0; i < mBlock->Count(); i++) { *dest += wxString::Format - (wxT("Block %3d: start %8d len %8d refs %d %s"), + (wxT(" Block %3d: start %8d len %8d refs %d %s"), i, mBlock->Item(i)->start, mBlock->Item(i)->f->GetLength(), mDirManager->GetRefCount(mBlock->Item(i)->f), mBlock->Item(i)->f->GetFileName().GetFullName().c_str()); if (pos != mBlock->Item(i)->start) - *dest += wxT(" ERROR\n"); + *dest += wxT(" ERROR\n"); else *dest += wxT("\n"); pos += mBlock->Item(i)->f->GetLength(); @@ -1670,14 +1666,7 @@ void Sequence::DebugPrintf(wxString *dest) (wxT("ERROR mNumSamples = %d\n"), mNumSamples); } -void Sequence::Debug() -{ - wxString s; - DebugPrintf(&s); - wxPrintf(wxT("%s"), s.c_str()); -} - -// Static +// static void Sequence::SetMaxDiskBlockSize(int bytes) { sMaxDiskBlockSize = bytes; diff --git a/src/Sequence.h b/src/Sequence.h index 8fad5f0b9..d826b3197 100644 --- a/src/Sequence.h +++ b/src/Sequence.h @@ -232,21 +232,8 @@ class Sequence: public XMLTagHandler { // This function prints information to stdout about the blocks in the // tracks and indicates if there are inconsistencies. - void Debug(); void DebugPrintf(wxString *dest); }; #endif // __AUDACITY_SEQUENCE__ - -// Indentation settings for Vim and Emacs and unique identifier for Arch, a -// version control system. Please do not modify past this point. -// -// Local Variables: -// c-basic-offset: 3 -// indent-tabs-mode: nil -// End: -// -// vim: et sts=3 sw=3 -// arch-tag: 7548fd38-7dc7-4c51-b5c5-04505be69088 - diff --git a/src/UndoManager.cpp b/src/UndoManager.cpp index 7e84912a9..10bff9e04 100644 --- a/src/UndoManager.cpp +++ b/src/UndoManager.cpp @@ -338,15 +338,16 @@ void UndoManager::StateSaved() ResetODChangesFlag(); } -void UndoManager::Debug() -{ - for (unsigned int i = 0; i < stack.Count(); i++) { - TrackListIterator iter(stack[i]->tracks); - WaveTrack *t = (WaveTrack *) (iter.First()); - wxPrintf(wxT("*%d* %s %f\n"), i, (i == (unsigned int)current) ? wxT("-->") : wxT(" "), - t ? t->GetEndTime()-t->GetStartTime() : 0); - } -} +// currently unused +//void UndoManager::Debug() +//{ +// for (unsigned int i = 0; i < stack.Count(); i++) { +// TrackListIterator iter(stack[i]->tracks); +// WaveTrack *t = (WaveTrack *) (iter.First()); +// wxPrintf(wxT("*%d* %s %f\n"), i, (i == (unsigned int)current) ? wxT("-->") : wxT(" "), +// t ? t->GetEndTime()-t->GetStartTime() : 0); +// } +//} ///to mark as unsaved changes without changing the state/tracks. void UndoManager::SetODChangesFlag() diff --git a/src/UndoManager.h b/src/UndoManager.h index 25c3a6abc..f200ed974 100644 --- a/src/UndoManager.h +++ b/src/UndoManager.h @@ -95,7 +95,7 @@ class AUDACITY_DLL_API UndoManager { bool UnsavedChanges(); void StateSaved(); - void Debug(); + // void Debug(); // currently unused ///to mark as unsaved changes without changing the state/tracks. void SetODChangesFlag(); diff --git a/win/compile.txt b/win/compile.txt index ff6d9416b..cc2d1f4cf 100644 --- a/win/compile.txt +++ b/win/compile.txt @@ -14,9 +14,10 @@ Authors: Martyn Shaw ======================================================================== -This version is currently accurate for Audacity version 1.3.13. . -If the advice here is inaccurate or incomplete, please -email audacity-devel@lists.sourceforge.net. +This version is currently accurate for Audacity version 1.3.13. +If you find the advice here inaccurate or incomplete, please +first discuss on the "Compling Audacity" forum at +http://forum.audacityteam.org/. See also "http://audacityteam.org/wiki/index.php?title=Developing_On_Windows". ======================================================================== @@ -309,14 +310,12 @@ So for instance, a Unicode Debug version of Audacity should have: in the "audacity\win\unicode debug" directory. - -That's all - if this procedure doesn't work, you can ask for -help on the Audacity development mailing list: -audacity-devel@lists.sourceforge.net. However, the first -suggestion is likely to be "try it again with a clean installation -of the wxWidgets source and the latest Audacity source from SVN", -so if that's not what you just attempted, you might want to try -that first... +If this procedure doesn't work, you can ask for help on the +"Compling Audacity" forum at http://forum.audacityteam.org/. +However, the first suggestion there is likely to be "try it again +with a clean installation of the wxWidgets source and the latest +Audacity source from SVN". So if that's not what you attempted, +please try that first. ---------------------------