mirror of
https://github.com/cookiengineer/audacity
synced 2026-01-19 15:06:07 +01:00
commit Gale's patch to consistently use RMS for Root Mean Square values in the UI. Fixes bug 767
This commit is contained in:
@@ -239,7 +239,7 @@ ContrastDialog::ContrastDialog(wxWindow * parent, wxWindowID id,
|
|||||||
S.SetBorder(5);
|
S.SetBorder(5);
|
||||||
S.StartHorizontalLay(wxCENTER, false);
|
S.StartHorizontalLay(wxCENTER, false);
|
||||||
{
|
{
|
||||||
S.AddTitle(_("Contrast Analyzer, for measuring rms volume differences between two selections of audio."));
|
S.AddTitle(_("Contrast Analyzer, for measuring RMS volume differences between two selections of audio."));
|
||||||
}
|
}
|
||||||
S.EndHorizontalLay();
|
S.EndHorizontalLay();
|
||||||
S.StartStatic( _("Parameters") );
|
S.StartStatic( _("Parameters") );
|
||||||
@@ -478,7 +478,7 @@ void ContrastDialog::results()
|
|||||||
mDiffText->ChangeValue(wxString::Format(_("indeterminate")));
|
mDiffText->ChangeValue(wxString::Format(_("indeterminate")));
|
||||||
else
|
else
|
||||||
if( fabs(diffdB) != std::numeric_limits<float>::infinity() )
|
if( fabs(diffdB) != std::numeric_limits<float>::infinity() )
|
||||||
mDiffText->ChangeValue(wxString::Format(_("%.1f dB Average rms"), diffdB));
|
mDiffText->ChangeValue(wxString::Format(_("%.1f dB Average RMS"), diffdB));
|
||||||
else
|
else
|
||||||
mDiffText->ChangeValue(wxString::Format(_("infinite dB difference")));
|
mDiffText->ChangeValue(wxString::Format(_("infinite dB difference")));
|
||||||
}
|
}
|
||||||
@@ -533,11 +533,11 @@ void ContrastDialog::OnExport(wxCommandEvent & WXUNUSED(event))
|
|||||||
f.AddLine(wxString::Format(_("Time ended = %2d hour(s), %2d minute(s), %.2f seconds."), h, m, s ));
|
f.AddLine(wxString::Format(_("Time ended = %2d hour(s), %2d minute(s), %.2f seconds."), h, m, s ));
|
||||||
if(foregrounddB != 1234.0) // see other instances of '1234.0' in here
|
if(foregrounddB != 1234.0) // see other instances of '1234.0' in here
|
||||||
if( fabs(foregrounddB) != std::numeric_limits<float>::infinity() )
|
if( fabs(foregrounddB) != std::numeric_limits<float>::infinity() )
|
||||||
f.AddLine(wxString::Format(_("Average rms = %.1f dB."), foregrounddB ));
|
f.AddLine(wxString::Format(_("Average RMS = %.1f dB."), foregrounddB ));
|
||||||
else
|
else
|
||||||
f.AddLine(wxString::Format(_("Average rms = zero.") ));
|
f.AddLine(wxString::Format(_("Average RMS = zero.") ));
|
||||||
else
|
else
|
||||||
f.AddLine(wxString::Format(_("Average rms = dB.")));
|
f.AddLine(wxString::Format(_("Average RMS = dB.")));
|
||||||
f.AddLine(wxT(""));
|
f.AddLine(wxT(""));
|
||||||
f.AddLine(_("Background"));
|
f.AddLine(_("Background"));
|
||||||
t = (float)mBackgroundStartT->GetTimeValue();
|
t = (float)mBackgroundStartT->GetTimeValue();
|
||||||
@@ -552,11 +552,11 @@ void ContrastDialog::OnExport(wxCommandEvent & WXUNUSED(event))
|
|||||||
f.AddLine(wxString::Format(_("Time ended = %2d hour(s), %2d minute(s), %.2f seconds."), h, m, s ));
|
f.AddLine(wxString::Format(_("Time ended = %2d hour(s), %2d minute(s), %.2f seconds."), h, m, s ));
|
||||||
if(backgrounddB != 1234.0)
|
if(backgrounddB != 1234.0)
|
||||||
if( fabs(backgrounddB) != std::numeric_limits<float>::infinity() )
|
if( fabs(backgrounddB) != std::numeric_limits<float>::infinity() )
|
||||||
f.AddLine(wxString::Format(_("Average rms = %.1f dB."), backgrounddB ));
|
f.AddLine(wxString::Format(_("Average RMS = %.1f dB."), backgrounddB ));
|
||||||
else
|
else
|
||||||
f.AddLine(wxString::Format(_("Average rms = zero.") ));
|
f.AddLine(wxString::Format(_("Average RMS = zero.") ));
|
||||||
else
|
else
|
||||||
f.AddLine(wxString::Format(_("Average rms = dB.")));
|
f.AddLine(wxString::Format(_("Average RMS = dB.")));
|
||||||
f.AddLine(wxT(""));
|
f.AddLine(wxT(""));
|
||||||
f.AddLine(_("Results"));
|
f.AddLine(_("Results"));
|
||||||
float diffdB = foregrounddB - backgrounddB;
|
float diffdB = foregrounddB - backgrounddB;
|
||||||
@@ -564,9 +564,9 @@ void ContrastDialog::OnExport(wxCommandEvent & WXUNUSED(event))
|
|||||||
f.AddLine(wxString::Format(_("Difference is indeterminate.") ));
|
f.AddLine(wxString::Format(_("Difference is indeterminate.") ));
|
||||||
else
|
else
|
||||||
if( fabs(diffdB) != std::numeric_limits<float>::infinity() )
|
if( fabs(diffdB) != std::numeric_limits<float>::infinity() )
|
||||||
f.AddLine(wxString::Format(_("Difference = %.1f Average rms dB."), diffdB ));
|
f.AddLine(wxString::Format(_("Difference = %.1f Average RMS dB."), diffdB ));
|
||||||
else
|
else
|
||||||
f.AddLine(wxString::Format(_("Difference = infinite Average rms dB.")));
|
f.AddLine(wxString::Format(_("Difference = infinite Average RMS dB.")));
|
||||||
if( diffdB > 20. )
|
if( diffdB > 20. )
|
||||||
f.AddLine(_("Success Criteria 1.4.7 of WCAG 2.0: Pass"));
|
f.AddLine(_("Success Criteria 1.4.7 of WCAG 2.0: Pass"));
|
||||||
else
|
else
|
||||||
|
|||||||
Reference in New Issue
Block a user