1
0
mirror of https://github.com/cookiengineer/audacity synced 2025-12-16 09:31:14 +01:00

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.

This commit is contained in:
v.audacity
2010-09-10 03:19:24 +00:00
parent a46081d5b5
commit f9be883b82
7 changed files with 40 additions and 67 deletions

View File

@@ -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;