On windows this is still limited by the timer resolution, but
it's a start. This is mainly intended to be used with NDI or
other external sources without actual audio hardware.
This correctly sets audio port I/O latency using the
portaudio API.
Per MIDI device port settings are not completely implemented.
En/disabling MIDI devices or setting custom MIDI port latency
is not functional as-is.
Sequence<Time>::append() expects events to be sorted.
Previously this only worked for non-overlapping region,
or if all events in the later region(s) are after than the
last even in any earlier region.
This fixes several callsites that were passing samplepos_t to get a TempoMetric,
some of them somewhat significant (e.g. VST plugins that want tempo information).
Bad API design on my part, apologies.
This commit combines libs/ and gtk2_ardour because the new private status
of the ::metric_at() call would be a blocking point for git bisect
* Use an atomic reference count since the freeze-thread
can call use_playlist.
* Remove explicit argument to construct unused playlist
because playlists are unused by default. This also
lead to use-count becoming negative (or rather UINT32_MAX)
This fixes a random crash with stop-and-forget capture.
When aborting capture, the disk-writer can emit
midi_write_source->drop_references ()
in the butler thread, which leads to a direct call to
Session::remove_source.
This can happen before or after Region::source_deleted
is called which is initiated from the same signal.
Furthermore it was possible that Region::source deleted
was called concurrently from the UI thread via SourceRemoved
for whole file regions, which lead to memory corruption.
TransportMasterManager::destroy () destroys any remaining
TransportMasters which in turn unregister their ports.
However the PortEngine was already destroyed.
When starting RangePlay while the transport is already rolling
the transport is now stopped (and de-clicked) before locating.
This should not clear the RangeStop event when it is caused
by a RangePlay request.