Since control-ports have a fixed value for the current process-block,
Ardour splits a plugin's run() process cycle on every automation event
to facilitate sample-accurate automation.
Since automation is interpolated between events, this ensures that each
explicit automation point is reached (not interpolated).
Plugins where this is not required and which favor a fixed block-size,
can now specify an optional Feature: NoSampleAccurateControl.
One example: a convolution plugin with smoothed gain control.
This is useful for USB devices. Since there is a ringbuffer in the driver
(common on ALSA but also other platforms) to align the USB stream with
USB bus timing the latency can differ every time the device is re-opened.
2 remaining problems:
* IO selectors are not updated if you change the connection outside the dialog.
* occasional crash on the next startup, after a connection is made from the menu.
The user can now press+release Shift, then another key OR press Shift, then another key before releasing Shift. Both
event sequences will have the same result
Hopefully this resolves glitches on hyperthreading machines.
Apart from using unnamed Semaphores, pthread-w32 includes additional locks
(guess: mem-barriers), a fallback implementation and windows-specific
tricks that I'd rather not want to know about :)
For drivers that correctly report latency values(ASIO) this should result a
much closer alignment of audio in a loopback test. Measurement and
adjustment may still be needed, especially for non-ASIO drivers.
Testing with the RME HDSP Multiface and Yamaha AG06 using ASIO drivers results
in maximum offset of a couple of samples.
This does involve nagivating some really gnarly menus, which is unfortunate, but we don't have a good general
solution for this yet (it is fundamentally the same problem that affects the key binding editor and Mackie support