audacity / audacity/audacity

"Find Clipping" shows wrong number of samples in the labels

Open
#5,188 1 comment 0 reactions 0 assignees View on GitHub
AU3-bug P4
Dominant language
C++
Stars
18.4k
Forks
2.7k
Avg merge
3d 3h
Merged PRs (30d)
85

Description

### Bug description

When using Find Clipping, the count of the clipping samples displayed in the labels, doesn't match the actual number.

### Steps to reproduce

1. Delete PluginSettings.cfg to get default effect settings
2. Generate Chirp with default settings
3. Amplify by 3 dB with Allow Clipping
4. View -> Show Clipping on
5. Analyze > Find Clipping
6. See the count of samples displayed in the labels
7. Select all clipping samples and see the length in the Selection toolbar set to samples display

### Expected behavior

The number in the label matches the one in the selection toolbar.

### Actual behavior

The displayed count is off by one. The label says the clipping part has one length in samples, but the selection toolbar below has a different number of samples:

![image](https://github.com/audacity/audacity/assets/70063970/491c2b0b-a9c0-401e-9a30-eb8244eab8b1)

### Audacity Version

current master / alpha / nightly build

### Operating system

Other

### Additional context

From #

Contributor guide

Open the contributing guide

Research direction

Reproduce the issue by deleting PluginSettings.cfg, generating a default Chirp, amplifying by 3 dB with Allow Clipping, and using Show Clipping and Analyze > Find Clipping. Compare the clipping count in the labels with the sample length shown in the Selection toolbar. Done means both counts match for this case and the relevant tests or checks pass.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp
Domain
desktop
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.