+2 samples glitch [CLOSED]

Anything you think is missing, or needs enhancement, goes here.
Forum rules
If you require help using Audacity, please post on the forum board relevant to your operating system:
Windows
Mac OS X
GNU/Linux and Unix-like
Piotr Grochowski
Posts: 162
Joined: Fri Jun 23, 2017 12:45 pm
Operating System: Windows 10

+2 samples glitch [CLOSED]

Post by Piotr Grochowski » Tue Nov 07, 2017 9:56 am

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

steve
Site Admin
Posts: 47579
Joined: Sat Dec 01, 2007 11:43 am
Operating System: Linux *buntu
Contact:

Re: +2 samples glitch

Post by steve » Tue Nov 07, 2017 9:59 am

Please give precise steps to reproduce this issue.
9/10 questions are answered in the FREQUENTLY ASKED QUESTIONS (FAQ)

Piotr Grochowski
Posts: 162
Joined: Fri Jun 23, 2017 12:45 pm
Operating System: Windows 10

Re: +2 samples glitch

Post by Piotr Grochowski » Wed Nov 08, 2017 6:26 pm

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

steve
Site Admin
Posts: 47579
Joined: Sat Dec 01, 2007 11:43 am
Operating System: Linux *buntu
Contact:

Re: +2 samples glitch

Post by steve » Wed Nov 08, 2017 9:21 pm

I'm using Audacity 2.2.0. I don't see two extra samples.
9/10 questions are answered in the FREQUENTLY ASKED QUESTIONS (FAQ)

Piotr Grochowski
Posts: 162
Joined: Fri Jun 23, 2017 12:45 pm
Operating System: Windows 10

Re: +2 samples glitch

Post by Piotr Grochowski » Thu Nov 09, 2017 4:00 pm

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

steve
Site Admin
Posts: 47579
Joined: Sat Dec 01, 2007 11:43 am
Operating System: Linux *buntu
Contact:

Re: +2 samples glitch

Post by steve » Thu Nov 09, 2017 6:01 pm

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.
9/10 questions are answered in the FREQUENTLY ASKED QUESTIONS (FAQ)

Piotr Grochowski
Posts: 162
Joined: Fri Jun 23, 2017 12:45 pm
Operating System: Windows 10

Re: +2 samples glitch

Post by Piotr Grochowski » Fri Nov 10, 2017 12:20 pm

Maybe you should try in Windows instead. Also, interestingly, 2 samples is the starting point too.
wGrnp3X.png
wGrnp3X.png (48.77 KiB) Viewed 613 times

steve
Site Admin
Posts: 47579
Joined: Sat Dec 01, 2007 11:43 am
Operating System: Linux *buntu
Contact:

Re: +2 samples glitch

Post by steve » Fri Nov 10, 2017 5:27 pm

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).
9/10 questions are answered in the FREQUENTLY ASKED QUESTIONS (FAQ)

Piotr Grochowski
Posts: 162
Joined: Fri Jun 23, 2017 12:45 pm
Operating System: Windows 10

Re: +2 samples glitch

Post by Piotr Grochowski » Fri Nov 10, 2017 6:00 pm

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.

steve
Site Admin
Posts: 47579
Joined: Sat Dec 01, 2007 11:43 am
Operating System: Linux *buntu
Contact:

Re: +2 samples glitch

Post by steve » Fri Nov 10, 2017 6:20 pm

Piotr Grochowski wrote:You behave like it's a fatal design flaw, when it's actually not thinking of something
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.
9/10 questions are answered in the FREQUENTLY ASKED QUESTIONS (FAQ)

Locked