mirror of
https://github.com/cookiengineer/audacity
synced 2025-06-18 17:10:05 +02:00
More friendly warning about overlong Block File
Agreed several years ago on http://wiki.audacityteam.org/wiki/Wording .
This commit is contained in:
parent
870d334a5a
commit
7848042339
@ -1042,15 +1042,14 @@ void Sequence::WriteXML(XMLWriter &xmlFile)
|
|||||||
// See http://bugzilla.audacityteam.org/show_bug.cgi?id=451.
|
// See http://bugzilla.audacityteam.org/show_bug.cgi?id=451.
|
||||||
// Also, don't check against mMaxSamples for AliasBlockFiles, because if you convert sample format,
|
// Also, don't check against mMaxSamples for AliasBlockFiles, because if you convert sample format,
|
||||||
// mMaxSample gets changed to match the format, but the number of samples in the aliased file
|
// mMaxSample gets changed to match the format, but the number of samples in the aliased file
|
||||||
// has not changed (because sample format conversion was not actually done in the aliased file.
|
// has not changed (because sample format conversion was not actually done in the aliased file).
|
||||||
if (!bb.f->IsAlias() && (bb.f->GetLength() > mMaxSamples))
|
if (!bb.f->IsAlias() && (bb.f->GetLength() > mMaxSamples))
|
||||||
{
|
{
|
||||||
wxString sMsg =
|
wxString sMsg =
|
||||||
wxString::Format(
|
wxString::Format(
|
||||||
_("Sequence has block file with length %s > mMaxSamples %s.\nTruncating to mMaxSamples."),
|
_("Sequence has block file exceeding maximum %s samples per block.\nTruncating to this maximum length."),
|
||||||
Internat::ToString(((wxLongLong)bb.f->GetLength()).ToDouble(), 0).c_str(),
|
|
||||||
Internat::ToString(((wxLongLong)mMaxSamples).ToDouble(), 0).c_str());
|
Internat::ToString(((wxLongLong)mMaxSamples).ToDouble(), 0).c_str());
|
||||||
wxMessageBox(sMsg, _("Warning - Length in Writing Sequence"), wxICON_EXCLAMATION | wxOK);
|
wxMessageBox(sMsg, _("Warning - Truncating Overlong Block File"), wxICON_EXCLAMATION | wxOK);
|
||||||
wxLogWarning(sMsg);
|
wxLogWarning(sMsg);
|
||||||
bb.f->SetLength(mMaxSamples);
|
bb.f->SetLength(mMaxSamples);
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user