realtime_stop() calls unset_play_loop(), unless loop is a
transport-state. Any later calls by butler_transport_work()
will never reach this get_play_loop() clause when just looping.
Besides while recording, locates are not possible,
so this case never triggered under normal operation
(Non-seamless looping is no longer supported since 6.0).
DiskWriter::seek() flushes all recorded audio/MIDI, and resets
buffers as if no recording has happened.
Data must be flushed to disk before any non-realtime locates happen.
This happens at transport-stop, which is usually called first.
Except since 8b048bb351 Session::butler_transport_work() may call
non_realtime_stop() after a non_realtime_locate() when looping
more than once.
If there is a tempo/meter change after the loop-end,
the capture duration was set incorrectly.
Previously `total_capture_beats` was set as if the recording
was linear passing though tempo-map changes after the loop.
_capture_start_sample is remains zero until
DiskWriter::check_record_status() starts recording.
This incorrectly increased _accumulated_capture_offset
during pre-roll which resulted in lost samples at the beginning.
Properly unload linux VST2 plugins and fix Mac VST2
bundle unloading - do not use dlclose():
CFBundleRef is reference counted, so we need to retain
a reference. Previously it went out of scope at the end
of mac_vst_load().
This is only relevant when manually scanning plugins,
initiated from the UI thread. Call back (in same thread) needs
to happen after detecting ambiguities and refilling the info lists.
* PRO: you can audition synths at the varispeed tuning; you can use x42 guitar tuner when stopped
* CON: this is NOT like a tape machine ... a tape machine has no 'speed' when stopped
ToDo: if we find that this is contentious, we could make a config var for it
* remove unused variables in session.h
* move default play speed (varispeed(sic)) into fsm
* request_transport_speed should -never- set the default_play_speed