... which were meant to fix growth in lag between mouse movement and play head
movement.
Recent rewrites to keep RingBuffer more populated during scrub and seek should
make this unnecessary.
... One still called ScrubQueue, which should become a simple non-queuing
buffer later, communicating scrubbing instructions from the UI or poller
thread to the Audio thread.
The other, downstream of that, supplements the playback RingBuffers with
a correspondence between samples and track times, for use by the PortAudio
thread in updating the last-played position, which is in turn used by the
UI thread to update the display.
In future this queue of times may be used as the sole, general means for
PortAudio thread to update head position, not just a special case for scrubbing.
... from the Audio thread to the PortAudio thread; the old
ScrubQueue::Consumer() function keeps only a vestigial purpose to prevent the
scrub queue from blocking.
... so there is only one update per track of the atomics in RingBuffer in each
pass of the loop in FillBuffers, which will be needed to synchronize RingBuffer
and TimeQueue correctly.
... 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.
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.
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.
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.
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.
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.
... 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.
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.
Previously running a TrackPanelHasFocus effect from the Macros dialog could fail, because the menu item was disabled (because track panel did not have focus).