Commit Graph

9088 Commits

Author SHA1 Message Date
Paul Licameli
84c8aa0fcc Fix some cases where seeking (with mouse) let RingBuffer go empty 2018-08-25 20:08:08 -04:00
Paul Licameli
b2df5e0673 Declare and allocate time value queue 2018-08-25 20:08:08 -04:00
Paul Licameli
e91918042a Don't let the ring buffer empty when seeking past end of track...
... just allow a short stutter padded with silence in that case.
2018-08-25 20:08:08 -04:00
Paul Licameli
67a9823434 split out function AdvancedTrackTime; more caution about termination 2018-08-25 20:08:08 -04:00
Paul Licameli
2806f40ab5 Don't let the RingBuffer run dry when seek-drag is very slow...
... but not stopped.  This may even make the play head back up and re-play a
little bit.
2018-08-25 20:08:08 -04:00
Paul Licameli
5cfbfd364e Set the playback RingBuffer latency appropriately for seeking 2018-08-25 20:08:07 -04:00
Paul Licameli
111d2c8673 Can specify a minimum to maintain in the playback RingBuffer...
... this may be more than the batch size used in ongoing playback.

It is expected that this larger batch size is used only once when priming
the queue before starting play.  But then FillBuffers() may attempt to
refill up to the minimum in case demand is outpacing supply.

Thus the new number defines a "yellow zone" for the queue.
2018-08-25 20:08:07 -04:00
Paul Licameli
06fe9e843e remove some casting 2018-08-25 20:08:07 -04:00
Paul Licameli
45231b8f6a Consume equal amounts from play ring buffers in each callback pass...
... which should be the whole framesPerBuffer normally.

Also rename another function used in producing the samples.
2018-08-25 20:08:07 -04:00
Paul Licameli
8a6351d9cd Guarantee cleanup of partial allocation on all error return paths...
... such as when allocating for capture channels fails after that for
playback succeeds
2018-08-25 20:08:06 -04:00
Paul Licameli
3a94acd631 Remove unnecessary variable 2018-08-25 20:08:06 -04:00
Paul Licameli
03678eccba use mRate not sampleRate 2018-08-25 20:08:06 -04:00
Paul Licameli
575e631d49 line lengths 2018-08-25 20:08:06 -04:00
Paul Licameli
8e151aba8d Split out AudioIO::AllocateBuffers 2018-08-25 20:08:05 -04:00
Paul Licameli
eeb5f1ec20 Revert "Fix the hiccup at the start of scrub or play at speed..."
(It didn't really achieve what that commit comment said)

This reverts commit 26f72b110c.
2018-08-25 19:42:12 -04:00
James Crook
d79c071d6d Change 'mouse_move' to 'move_mouse'.
Fixing a hyperlink.
2018-08-25 17:41:28 +01:00
James Crook
74d0420b96 Bug 1763 - Clicks on starting/stopping playback.
Does not fix the Loop-Play part.
2018-08-25 17:21:18 +01:00
James Crook
b91300caf0 Bug 1947 - Clicky play when dynamically changing number of playing channels
Rather than 'cut' (i.e. drop, not cut as in 'cut preview') channels immediately, we now only do so
if their last gain was already 0.0.  Instead they micro-fade out.  Later when the channels come back,
their last gain will be 0.0, so they will micro-fade in.

A comment explains that the code would be cleaner if we just computed gains, and not whether to
drop channels.
2018-08-25 13:07:45 +01:00
Steve Daulton
f296f42392 Fix misleading error message
We are testing specifically for a selection in an 'audio' track.
2018-08-25 12:41:29 +01:00
Paul Licameli
ac1017ee1d A preference checkbox for always scrubbing unpinned, does nothing yet 2018-08-24 18:12:25 -04:00
Paul Licameli
c86a46dc99 fix Mac build 2018-08-24 17:59:18 -04:00
James Crook
9012b98eca Init mOldGains
I'd neglected to do this, which can lead to unwanted noise.
2018-08-24 22:51:31 +01:00
James Crook
0ce83abbfb Bug 1940 - Clicky play when adjusting Pan or Volume TCP controls 2018-08-24 22:30:20 +01:00
James Crook
ac5b743dd2 Bug 1944 - Many "scriptables" link to non-existent pages or incorrect target pages 2018-08-24 19:18:04 +01:00
James Crook
66df5786de Make AUD-DO return a cons.
This is simple parsing of the response from AUD-DO.  The first part is the string message, the second 1 or NIL depending on if scripting reported OK or not.  Note that illegal scripting options often don't produce a 'Failed' but are silently substituted with valid ones.
2018-08-24 18:45:09 +01:00
James Crook
9b84deb43b Bug 1946 - Nyquist ;type tool effects crash if returning labels from Nyquist 2018-08-24 16:53:34 +01:00
Steve Daulton
e1ae057806 Disable experimental loudness normalizing 2018-08-22 20:45:50 +01:00
Steve Daulton
4ec1393c27 Error if Nyquist Prompt requires track election 2018-08-21 16:28:59 +01:00
Steve Daulton
94b3bf3c22 Remove superfluous log message 2018-08-21 14:09:56 +01:00
Steve Daulton
b9ec43433e Bug 1934 residual
Allow generate type plug-ins spawned from Nyquist Prompt to create
a new track if none selected.

This commit also fixes preview in generators when there is no selection.
2018-08-21 14:02:48 +01:00
Paul Licameli
06b5d2e945 Bug1932 followup: Times, not sample counts, in scrubbing options...
... because the correct rate is not known where options are constructed
2018-08-20 20:44:10 -04:00
David Bailes
ecb1cbdf3a Play at speed slider: fix page up/down increments
These increments were accidentally changed by the commit: 5e10ec0def

Changed back to original values.
2018-08-20 15:08:32 +01:00
David Bailes
805d7023eb TimeDialog: minor accessibility change
Since the move to wxWidgets 3.1.1, NVDA now reads the name of a wxStaticBox. So in this dialog, there is no longer the need for the accessibility name of the NumericTextCtrl to duplicate the name of the wxStaticBox.
2018-08-20 11:36:15 +01:00
James Crook
0df8c7e3a0 Wording: "Latency compensation" 2018-08-19 21:32:49 +01:00
James Crook
3bb48a21df Bug 1932 - (Residual) Fix stopping behavior with Play-At-Speed.
1. The rate actually used by the sound card now sets the stopping sample number.
2. The tolerance in the 'stop position' is additionally trimmed to 20 samples.
2018-08-19 10:37:43 +01:00
James Crook
aaad7dd08d Bug 1932 - Scrubbing (and Play-at-speed) with WASAPI host (MSW only) or very short buffer preference (on Mac also) is very clicketty 2018-08-18 20:35:18 +01:00
Paul Licameli
26f72b110c Fix the hiccup at the start of scrub or play at speed...
... We need to start the polling of mouse state before starting the audio
stream, and not "nudge" AudioThread, so that AudioThread primes the ring
buffer correctly, not inserting some silence.

This requires yields to timer events in AudioIO::StartStream.
2018-08-16 21:21:44 -04:00
Paul Licameli
6fa5c93b8e Fix typo in comment 2018-08-15 20:20:47 -04:00
Steve Daulton
5be7f7db0b White space changes
The Objective C++ syntax '[[' used in a couple of places (Mac only),
breaks the parser in kdevelop. As suggested by Paul, a space between the
brackets fixes the problem.
Also removed some trailing spaces.
2018-08-15 11:29:12 +01:00
David Bailes
18646a2668 Select Command dialog: minor focus fix
Problem: when the list first becomes focus, no item in the list is the focus.
2018-08-14 13:17:39 +01:00
James Crook
b2feab61a9 TrackPanelHasFocus commands now always available to Macros
Previously running a TrackPanelHasFocus effect from the Macros dialog could fail, because the menu item was disabled (because track panel did not have focus).
2018-08-13 16:52:13 +01:00
Steve Daulton
8eef6dc3ef Fix bug 1938
Nyquist / Adagio variable 'S' should have the value 0.25 in all but
legacy process and analyze effects.
2018-08-13 16:45:21 +01:00
Steve Daulton
0d9cd4b024 Fix bug 1937
';type tool' effects cannot return audio from Nyquist.
2018-08-13 14:28:33 +01:00
James Crook
3480f5aa3a Bug 1934 - Generate audio from Nyquist prompt crash
We now default to Effect (EffectTypeProcess), if no type was specified.
2018-08-13 12:29:31 +01:00
Steve Daulton
11da92d668 Allow capture retries if time since Rescan() < 10s
The time since Rescan() of recording device is the important factor,
not the "newness" of the project.
2018-08-13 00:33:38 +01:00
Paul Licameli
aeba34b152 Bug1930: should draw bottom channel when append-recording...
... Bug happened only when append-recording by pressing the toolbar button, not
by using a shortcut key; and the blank track did get drawn if you moused over
it or hid and showed the window.

Turns out TrackPanel::ProcessUIHandleResult did the needed update, which was
lacking otherwise.  Now TrackList::UpdatePendingTracks is called in another
place.
2018-08-12 19:28:24 -04:00
Paul Licameli
542adefac1 Bug1931: more precautions, higher level and more general...
... Do for release as was already done for click and drag:  hold a shared
pointer.

This will protect against reentrancy surprises as in this bug, where a
reference to the handle may be removed during one of the handle's own
methods.
2018-08-12 15:55:27 -04:00
Paul Licameli
328aa58966 Bug1933: commit 2c28af05e8 needs null checks 2018-08-12 15:44:08 -04:00
Paul-Licameli
932734c89a Windows: don't crash if double-clicking on ruler during playback 2018-08-12 14:43:45 -04:00
Paul Licameli
04a69f0a4c Bug1931 -- Dbl-click ruler in Windows shouldn't violate assertion...
... This change isn't needed for Mac, but is harmless there.
2018-08-12 14:16:16 -04:00