mirror of
https://github.com/cookiengineer/audacity
synced 2026-03-02 09:54:42 +01:00
Meters: fix indication of clipping for screen readers.
This commit is contained in:
@@ -2240,9 +2240,12 @@ wxAccStatus MeterAx::GetName(int WXUNUSED(childId), wxString* name)
|
||||
}
|
||||
|
||||
float peak = 0.;
|
||||
bool clipped = false;
|
||||
for (int i = 0; i < m->mNumBars; i++)
|
||||
{
|
||||
peak = wxMax(peak, m->mBar[i].peakPeakHold);
|
||||
if (m->mBar[i].clipping)
|
||||
clipped = true;
|
||||
}
|
||||
|
||||
if (m->mDB)
|
||||
@@ -2254,7 +2257,7 @@ wxAccStatus MeterAx::GetName(int WXUNUSED(childId), wxString* name)
|
||||
*name += wxString::Format(_(" Peak %.2f "), peak);
|
||||
}
|
||||
|
||||
if (m->IsClipping())
|
||||
if (clipped)
|
||||
{
|
||||
*name += wxString::Format(_(" Clipped "));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user