mirror of
https://github.com/cookiengineer/audacity
synced 2025-12-12 15:46:25 +01:00
[bug 451] Notify on the error where "len" tag (which is still valid, not legacy) for a "waveblock" is greater than mMaxSamples (max samples per block).
This commit is contained in:
@@ -738,10 +738,15 @@ bool Sequence::HandleXMLTag(const wxChar *tag, const wxChar **attrs)
|
||||
if (!wxStrcmp(attr, wxT("start")))
|
||||
wb->start = nValue;
|
||||
|
||||
// Handle length tag from legacy project file
|
||||
if (!wxStrcmp(attr, wxT("len")))
|
||||
{
|
||||
if (nValue > mMaxSamples) // mMaxSamples should already have been set by calls to the "sequence" clause below.
|
||||
{
|
||||
mErrorOpening = true;
|
||||
return false;
|
||||
}
|
||||
mDirManager->SetLoadingBlockLength(nValue);
|
||||
|
||||
}
|
||||
} // while
|
||||
|
||||
mBlock->Add(wb);
|
||||
|
||||
Reference in New Issue
Block a user