+2 samples glitch [CLOSED]

On really high frequencies (more than 500000Hz) Audacity shows length as 2 more samples than the correct length. This is a weird glitch.

Please give precise steps to reproduce this issue.

  1. Generate anything 1 second
  2. set project sample rate to more than 500000Hz
  3. enjoy 2 extra samples in length

I’m using Audacity 2.2.0. I don’t see two extra samples.

I’m using Audacity 2.1.3. I see 2 extra samples in length.

Out of interest, I tested with Audacity 2.1.2 (I don’t have 2.1.3 installed at the moment), and I can’t reproduce the problem in 2.1.2 either. Perhaps your steps to reproduce are not detailed or precise enough.

Maybe you should try in Windows instead. Also, interestingly, 2 samples is the starting point too.

It’s the same on WIndows, Mac OS and Linux.
As I previously suggested, you had not given sufficient detail. If you set the time format to “samples”, then you will see 500001 samples, which I presume you agree is the correct number of samples in 1 second when the sample rate is 500001 samples per second.

The problem here is that the conversion from samples to time in the controls is not sufficiently precise at extreme sample rates.
I’ve proposed a fix, so now it’s a matter for the Release Manager to decide whether to put the fix into Audacity 2.2.1 (due for release at the beginning of December).

Sorry, I didn’t think of that. You behave like it’s a fatal design flaw, when it’s actually not thinking of something. Also, when you type in generators on such frequencies, each time you type a digit, it adds a sample.

I don’t understand what you are trying to say,
You spotted a bug, albeit very much a “fringe” case, but a bug nevertheless. I’ve located the cause of the bug and proposed a fix, which is now in the hands of the Release Manager.

That’s not funny! Learn English. :frowning:

Not yet resolved, but dealt with, so topic closed.