Audacity Bug Summary
••• Introduction •••
••• Keywords •••
    Audacity 3.0.3 development began 19th April 2021

Audacity Bugzilla



Bug 259 - Meters do not display negative peaks
Meters do not display negative peaks
Status: RESOLVED FIXED
Product: Audacity
Classification: Unclassified
Component: Audio IO
1.3.14 alpha
Per OS All
: P3 Repeatable
Assigned To: Default Assignee for New Bugs
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2010-11-19 10:25 UTC by Gale Andrews
Modified: 2018-08-20 11:54 UTC (History)
5 users (show)

See Also:
Steps To Reproduce:
1 New project, Generate any tone (in order to allow Nyquist prompt) 2 Effect > Nyquist Prompt. Enter (sum -0.6 (scale 0.6 (osc 60))) to produce clipped negative audio, click OK 3 Play. Meters show only RMS, yet the audio is clipped
Release Note:
Meters: although the red clipping warning line correctly detects clipped negative samples, negative (darker colored) peak audio is not displayed. Thus the clipping warning line may appear even though the meter level and max peak line remain below zero.
First Git SHA:
Group: ---
Workaround:
Closed: 2018-08-20 00:00:00


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Gale Andrews 2010-11-19 10:25:19 UTC
Confusing if meters and max peak line have remained below zero yet the red clipping line displays.
Comment 1 Richard Ash 2010-11-24 16:39:53 UTC
This looks trivial - stick a call to fabs() round sptr[j] in line 546 of src/widgets/Meter.cpp

However, having done so I'm less clear that it works as intended, it definitely needs some more testing to ensure that we both calculate the correct max and RMS, and that we display them correctly on screen.

The bug is most definitely there, however, so glad we found it.
Comment 2 Vaughan Johnson 2010-11-24 19:38:16 UTC
(In reply to comment #1)

Hi, Richard. I was just about to commit the same fix when I got your bugzilla update. I agree that's the right fix and have committed it. 

Btw, for testing, Steve suggested a good way to generate a test file for this, using Nyquist, at http://forum.audacityteam.org/viewtopic.php?f=21&t=44734, which he cited when he originally posted about this bug.

Rather than two tracks as he suggested, I took one sine and offset half above 0 and half below 0. Playing it, there's a click between the two halves, but the peak shows the same between them.
Comment 3 Gale Andrews 2010-11-26 09:23:40 UTC
Seems fine on Win 7, Win XP and Ubuntu. Meter shows correct levels as far as I can see according to vertical scale and .aup. Also tested recording stereo mix from a negative sine track to check the recording meters were behaving. Not yet been tested on Mac but I assume this is not platform-dependent. 

Any other test results/reasons not to resolve-fix?  

@Vaughan: I regarded it as P3 not P2 because at least clipping indicators were showing and retained after Stop, unlike in Bug 258.
Comment 4 Bill Wharrie 2010-11-27 12:46:03 UTC
(In reply to comment #3)
Tested on Mac, Audacity 1.3.13-alpha-Nov 27 2010 (Unicode). Playback meters now respond correctly to + and - peaks.
Comment 5 Gale Andrews 2010-11-28 07:57:08 UTC
Thanks for testing, Bill. Moved to Resolved - Fixed