1
0
mirror of https://github.com/cookiengineer/audacity synced 2025-08-07 23:51:14 +02:00

Clarify some comments, in figuring out the cause of bug 451 (p2).

This commit is contained in:
v.audacity 2011-10-10 21:26:35 +00:00
parent 3a1d4334f2
commit caf33fc995

View File

@ -739,9 +739,17 @@ bool Sequence::HandleXMLTag(const wxChar *tag, const wxChar **attrs)
if (!wxStrcmp(attr, wxT("start"))) if (!wxStrcmp(attr, wxT("start")))
wb->start = nValue; wb->start = nValue;
// Vaughan, 2011-10-10: I don't think we ever write a "len" attribute for "waveblock" tag,
// so I think this is actually legacy code, or something intended, but not completed.
// Anyway, might as well leave this code in, especially now that it has the check
// against mMaxSamples.
if (!wxStrcmp(attr, wxT("len"))) if (!wxStrcmp(attr, wxT("len")))
{ {
if (nValue > mMaxSamples) // mMaxSamples should already have been set by calls to the "sequence" clause below. // mMaxSamples should already have been set by calls to the "sequence" clause below.
// The check intended here was already done in DirManager::HandleXMLTag(), where
// it let the block be built, then checked against mMaxSamples, and deleted the block
// if the size of the block is bigger than mMaxSamples.
if (nValue > mMaxSamples)
{ {
delete (wb); delete (wb);
mErrorOpening = true; mErrorOpening = true;