1
0
mirror of https://github.com/cookiengineer/audacity synced 2025-08-16 08:34:10 +02:00

Fix for Bug 697 Incorrect naming of Compressor 'release phase'

http://bugzilla.audacityteam.org/show_bug.cgi?id=697
Patch by Steve Daulton alters the UI strings but leaves variable naming alone. Provides backwards compatibility with old chains via a string substitution - to come out in time.
This commit is contained in:
RichardAsh1981@gmail.com 2013-12-23 10:31:47 +00:00
parent b967013fdf
commit 0b2e58dde9
3 changed files with 11 additions and 6 deletions

@ -136,6 +136,9 @@ bool BatchCommands::ReadChain(const wxString & chain)
wxString parm = tf[i].Mid(splitAt + 1).Strip(wxString::trailing); wxString parm = tf[i].Mid(splitAt + 1).Strip(wxString::trailing);
// Backward compatibility for old Chain scripts // Backward compatibility for old Chain scripts
// Please comment the version of audacity these are introduced in, so
// that old ones can easily be removed once users have had a chance to
// migrate
if (cmd == wxT("SaveMP3_56k_before")) if (cmd == wxT("SaveMP3_56k_before"))
cmd = wxT("ExportMP3_56k_before"); cmd = wxT("ExportMP3_56k_before");
else if (cmd == wxT("SaveMP3_56k_after")) else if (cmd == wxT("SaveMP3_56k_after"))
@ -146,6 +149,8 @@ bool BatchCommands::ReadChain(const wxString & chain)
cmd = wxT("ExportMP3"); cmd = wxT("ExportMP3");
else if (cmd == wxT("ExportWav")) else if (cmd == wxT("ExportWav"))
cmd = wxT("ExportWAV"); cmd = wxT("ExportWAV");
else if (cmd == wxT("Compressor") && (parm.find(wxT("DecayTime")) != parm.npos))
parm.Replace(wxT("DecayTime"), wxT("ReleaseTime"), NULL); // 2.0.6
// Add to lists // Add to lists
mCommandChain.Add(cmd); mCommandChain.Add(cmd);

@ -102,7 +102,7 @@ bool EffectCompressor::TransferParameters( Shuttle & shuttle )
shuttle.TransferDouble( wxT("NoiseFloor"), mNoiseFloorDB, -40.0f ); shuttle.TransferDouble( wxT("NoiseFloor"), mNoiseFloorDB, -40.0f );
shuttle.TransferDouble( wxT("Ratio"), mRatio, 2.0f ); shuttle.TransferDouble( wxT("Ratio"), mRatio, 2.0f );
shuttle.TransferDouble( wxT("AttackTime"), mAttackTime, 0.2f ); shuttle.TransferDouble( wxT("AttackTime"), mAttackTime, 0.2f );
shuttle.TransferDouble( wxT("DecayTime"), mDecayTime, 1.0f ); shuttle.TransferDouble( wxT("ReleaseTime"), mDecayTime, 1.0f );
shuttle.TransferBool( wxT("Normalize"), mNormalize, true ); shuttle.TransferBool( wxT("Normalize"), mNormalize, true );
shuttle.TransferBool( wxT("UsePeak"), mUsePeak, false ); shuttle.TransferBool( wxT("UsePeak"), mUsePeak, false );
return true; return true;
@ -658,11 +658,11 @@ void CompressorDialog::PopulateOrExchange(ShuttleGui & S)
mAttackText = S.AddVariableText(wxT("XXXX secs"), true, mAttackText = S.AddVariableText(wxT("XXXX secs"), true,
wxALIGN_LEFT | wxALIGN_CENTER_VERTICAL); wxALIGN_LEFT | wxALIGN_CENTER_VERTICAL);
mDecayLabel = S.AddVariableText(_("Decay Time:"), true, mDecayLabel = S.AddVariableText(_("Release Time:"), true,
wxALIGN_RIGHT | wxALIGN_CENTER_VERTICAL); wxALIGN_RIGHT | wxALIGN_CENTER_VERTICAL);
S.SetStyle(wxSL_HORIZONTAL); S.SetStyle(wxSL_HORIZONTAL);
mDecaySlider = S.Id(DecayID).AddSlider(wxT(""), 2, 30, 1); mDecaySlider = S.Id(DecayID).AddSlider(wxT(""), 2, 30, 1);
mDecaySlider->SetName(_("Decay Time")); mDecaySlider->SetName(_("Release Time"));
mDecayText = S.AddVariableText(wxT("XXXX secs"), true, mDecayText = S.AddVariableText(wxT("XXXX secs"), true,
wxALIGN_LEFT | wxALIGN_CENTER_VERTICAL); wxALIGN_LEFT | wxALIGN_CENTER_VERTICAL);
} }
@ -741,7 +741,7 @@ bool CompressorDialog::TransferDataFromWindow()
mAttackText->SetLabel(wxString::Format(_("%.1f secs"), attack)); mAttackText->SetLabel(wxString::Format(_("%.1f secs"), attack));
mAttackText->SetName(mAttackText->GetLabel()); // fix for bug 577 (NVDA/Narrator screen readers do not read static text in dialogs) mAttackText->SetName(mAttackText->GetLabel()); // fix for bug 577 (NVDA/Narrator screen readers do not read static text in dialogs)
mDecayLabel->SetName(wxString::Format(_("Decay Time %.1f secs"), decay)); mDecayLabel->SetName(wxString::Format(_("Release Time %.1f secs"), decay));
mDecayText->SetLabel(wxString::Format(_("%.1f secs"), decay)); mDecayText->SetLabel(wxString::Format(_("%.1f secs"), decay));
mDecayText->SetName(mDecayText->GetLabel()); // fix for bug 577 (NVDA/Narrator screen readers do not read static text in dialogs) mDecayText->SetName(mDecayText->GetLabel()); // fix for bug 577 (NVDA/Narrator screen readers do not read static text in dialogs)

@ -82,7 +82,7 @@ public:
bool mNormalize; //MJS bool mNormalize; //MJS
bool mUsePeak; bool mUsePeak;
double mDecayTime; double mDecayTime; // The "Release" time.
double mAttackFactor; double mAttackFactor;
double mAttackInverseFactor; double mAttackInverseFactor;
double mDecayFactor; double mDecayFactor;
@ -144,7 +144,7 @@ public:
double noisefloor; double noisefloor;
double ratio; double ratio;
double attack; double attack;
double decay; double decay; // "release"
bool useGain; bool useGain;
bool usePeak; bool usePeak;