Bugzilla – Bug 1824
Preview fails (with Error Opening Sound Device) for built-in Generate effects when no selection
Last modified: 2019-09-26 06:33:15 UTC
Unless there is a selection, clicking the Preview button in built-in effects fails to play a preview. Bug reported on Windows, and confirmed on Linux.
Bug confirmed on macOS 10.13.2 High Sierra audacity-macos-nightly-2.2.2-1fe857c.dmg - 26.27 MB | version: 2.2.2--16Jan18 I'm unclear why this is marked as a regression - I get no preview for built-in generators all the way back to 2.0.3 The plug-in generators (below the line) do generate previews even when there is no selection.
(In reply to Peter Sampson from comment #1) > I'm unclear why this is marked as a regression - I get no preview for > built-in generators all the way back to 2.0.3 I thought that generators gave a preview without a selection in older versions (possibly 1.3.x), though I could be wrong, so I've changed it to "regression: ?" As Peter says "not a regression" going back to 2.0.3, I've downgraded to P4.
Testing on W10 with audacity-2.3.3-alpha-267-f320612f10e44f212c28175a57172a5811d30608 I get "Error Opening Sound Device" when I use the Preview button - both with a selection present and no selection present. But playing was fine before using the and indeed after applying the generator after dismissing the EOSD With an empty project using the Preview button in generators blinks on depression, but does nothing - OK makes the generator work
Confirmed on Mac too with 2.3.3 alpha jc001 on macOS 10.14.5
Bug #2177 is a duplicate of this
*** Bug 2177 has been marked as a duplicate of this bug. ***
As far as I can see, the preview for built-in generators was introduced in 2.1.1. This bug appeared in 2.1.3, and was the result of this commit: Author: Paul Licameli <paul.licameli@gmail.com> Date: 3 years ago (05/04/2016 22:06:24) Commit hash: df45886d6b5800c5897cf05e7daf230f7d546954 Child: cea79d5b73 Parent: 7886464688 Bug1340: sync-lock should work when generating audio This commit simply removes the line: mT1 = mT0 + mDuration; from the function: void Effect::SetDuration(double seconds) That line was introduced by Leland in the commit: 0d62be77765f758dab08c50b93ab40380db855d8 This commit probably caused bug 1340, but I haven't confirmed this.
(In reply to David Bailes from comment #7) Also relevant is this commit by Steve, shortly after Leland's commit: Author: Steve Daulton <Stevethefiddle@users.noreply.github.com> Author date: 4 years ago (28/05/2015 17:31:07) Commit date: 4 years ago (29/05/2015 22:08:16) Commit hash: 5378b0a9517bea6b6d22d2493c385f4df474d0b8 Child: 62cc10c7c4 Parent: ebb6709966 Update to non-real-time preview. Fixes and updates on top of some code clean-up from Leland. In this commit, in the function void Effect::Preview(bool dryOnly), conditional statements based on whether the effect is a generator are replaced by conditional statement based on whether the effect is a generator AND it's nyquist. In particular the statement: if ((t1 > mT1) && !(isNyquist && isGenerator)) { t1 = mT1; } Why isNyquist && isGenerator rather than just isGenerator? If I hardcode isNyquist to true, this appears to fix the bug. (At least to a first approximation.)
Demoted to P3
David wrote: > In particular the statement: > if ((t1 > mT1) && !(isNyquist && isGenerator)) { > t1 = mT1; > } I think that's the problem. I suspect that I was fixing a problem with Nyquist generators and hadn't noticed that, in the case of no selection, it was also a problem for built-in generators. Fix committed at 5d4c884764865
(In reply to Steve Daulton from comment #10) Testing on W10 with audacity-2.3.3-alpha-344-a77a3ab2ac9620666083e17b420f4edc931a3d0f This now preciews properly on Windows a) totally empty project - OK b) just an empty track - OK c) track(s) in project point selection in a waveform - OK
Test on Windows suffices. RESOLVED FIXED.