This builds on top of 51d2bb:
* v6 routes templates/states have a version per <Route>
* older route-states are assumed to be from ardour-5
Stateful::loading_state_version 3002,
unless specified otherwise
Currently using Ardour-5 route templates (state version "3002")
with Ardour6 fails. As opposed to session-templates, Route
templates were not versioned.
This ensures future compatibility (and may allow to interpret
unversioned templates as "3002")
Loop recording creates a single long source, regions have to be
"split" from this source, using "start" as offset.
Since MIDI uses absolute timestamps, offsetting this by accumulating
buffer_position += (*ci)->samples;
like Track::use_captured_audio_sources() does, is not correct.
Furthermore, record_enabled() may be off when stopping recording,
MIDI needs to be flushed regardless.
DiskWriter::transport_looped() is called from the session
when engine loops. This does not take local disk-reader run()
latency offset into account.
finish_capture() needs to be postponed until the disk-writer
itself reaches the loop-position. This is achieved by
postponing loop() and calling it once loop-length of samples
has been captured.
This works because engaging loop always seeks to the loop-position
and first loop resets _capture_captured.
Ardour 5.x slave check was incorrectly ported to A6's TMM:
In Ardour 5 the comparison tested for *not* MTC:
```
if (!dynamic_cast<MTC_Slave*>(_slave)) { ..send MMC.. }
```
Other MMC messages (Record, Locate) are sent unconditionally.
This fixes an issue that after changing backends (::set_backend),
the session-transport was in inconsistent state. If it was rolling,
it continued to roll with "stop" being unavailable.
set_session_extents had a bug; it wasn't calling locations->add()
on the newly created location.
The correct implementation was in set_session_range_location,
but this was only called from one place.
This function was removed, and set_session_extents will be used in its place.
set_session_extents will create a session location if one no longer exists,
so there is no need for set_session_range_location.
* Windows: delete waf installed .dll.a files
* Windows: override waf's conf.env.LIBDIR = conf.env.BINDIR
with explicit --libdir
* Windows: fix asm (`x86_64-w64-mingw32-as` -D flag is for
debug messages, -D defines are not available)
* Mac: override waf adding -install_name (and
-Wl,-compatibility_version -Wl,-current_version)
by moving -dynamiclib from linkflags to ldflags
* Mac: Allow libs with compat version number suffix
(not needed anymore, but may help in the future)
Previously this was inherited via PBD.
On MacOS/X, this adds
"-undefined dynamic_lookup -flat_namespace"
and various "-framework .." options to linkflags
Without this flag, .dylibs fail to link usually because
of missing `-lintl` (Undefined symbols: "_libintl_dgettext")
On other systems this is a NO-OP:
CFLAGS_OSX, CXXFLAGS_OSX and LINKFLAGS_OSX
are only set on the darwin platform.
In prior versions: if Auto Input was enabled, the default behavior was
to monitor the Input of all tracks when stopped; even if they aren't armed.
Tape Machine Mode changed the behavior of Auto Input so that it doesn't
always monitor the track inputs when transport is stopped.
After some discussion on IRC, we determined that Tape mode is likely
more practical for a DAW user, and therefore a better default.
Rather than default an ambiguously-named preference "on", we decided
to invert the behavior, rename it sensibly(?), and default it OFF.
This adds the time when a log message is displayed.
ARDOUR_UI::display_message() parses the prefix,
so the timestamp cannot be prefixed in the beforehand.
Still, UI::process_error_message() is called directly in
the same thread, so this makes no significant difference.
This fixes Audio/MIDI alignment when recording normally.
Loop and/or Punch-in recording is still not aligned properly
(both audio and MIDI).
_accumulated_capture_offset is initialized once, accumulated
offsets (rec_nframes) are kept, even when ::check_record_status()
is called multiple times.
Bug was introduced in 8ed33f1bc7 symbol visibility setting
in CFLAGS, CXXFLAGS was overridden. This resulted in publicly exposed
and bound kiss_fft symbols in libqm-dsp.
At runtime those symbols were resolved using previously bound
symbols in libcodec (see below) that uses a mismatching implementation
(ardour/qm-dsp uses -Dkiss_fft_scalar=double)
#0 0x00007fffea793d40 in kiss_fftr () at /usr/lib/x86_64-linux-gnu/libcodec2.so.0.8.1
#1 0x00007fffcf4516ab in FFTReal::D::forward(double const*, double*, double*) (this=0x5555571d73a0, ri=0x55555a734810, ro=0x55555a7262b0, io=0x55555a728590)
at ../libs/qm-dsp/dsp/transforms/FFT.cpp:121
#2 0x00007fffcf4510fd in FFTReal::forward(double const*, double*, double*) (this=0x555559868190, ri=0x55555a734810, ro=0x55555a7262b0, io=0x55555a728590)
at ../libs/qm-dsp/dsp/transforms/FFT.cpp:186
* update AFL position when preference changes
* "after post-fader processors (before pan)" is before
the main-out (not at the end).
* Fix "immediately post-fader":
The amp, when added was the last element. ++after_end then
made the iterator point to .end()
This likely worked in the past when the monitor send was added
immediately after adding the fader/amp before any other processors.
When there is no overlap (Evoral::OverlapNone) of local transport
position and the record-range, MIDI data does not need to be
offset.
This matches audio recording: Only write to the capture ringbuffer
when there is an overlap.
(There is still some unknown, unresolved discrepancy remaining
to be tracked down)
to_write must not exceed `total = _samples_pending_write`.
If the write succeeds (events spanning `to_write` samples are written)
to_write is atomically subtracted from `_samples_pending_write`.
This produces synchronous events on Audio and MIDI ports.
One rvent per second, exactly at every second since engine-start.
MIDI: C-4 Note-on/off (1 sample long)
Audio: +1/-1 transition:
+1 in sync with Note-on,
-1 in sync with Note-off
the value is used by the parser context; the old code called it only after the *first* parser context
was created. therefore the first XMLTree::read() call has its behavior determined by libxml2's default
for this value, rather than by our explicit choice (do not treat whitespace as a note). All subequent
read() calls will use our value.
This variable inside libxml2 is actually per-thread, which just increases the stakes for calling
xmlKeepBlanksDefault() at the right time
Some builds of glib on macOS end up delivering IO_PRI when IO_IN is also set. This differs from our own build stack
version, but it isn't really an error, so we should handle it.
This partially reverts 2edbda2526.
Using cairo-groups increases performance on MacOS, and retains
retina-resolution.
However it adds a performance regression for MS Windows graphics
rendering. cairo-groups use a "similar" surface, not an image surface.
Empirically this adds significant overhead compared to rendering
using the CPU and using bitblt.
This reverts commit af30a6f001
because it breaks OSX/MacOS builds:
libs/surfaces/mackie/mackie_control_protocol.cc:945: error: 'G_SOURCE_FUNC' was not declared in this scope
Session::TransportStateChanged notifies about transport stop before the stop is complete (i.e. at the start of the declick).
Various other objects (notably control surfaces) connect to this signal and use it to modify their displayed state.
We need a method that can tell them we are stopped (or stopping) even though we are not "fully" stopped yet. This is
that method
This is similar to sort(1) --human-numeric-sort,
as opposed to naturally_less() negative numbers, hex-prefixes
and SI metric prefixes are taken into account.
For MacOS/X this is equivalent, rendering happens using a
CGBitmapContext + image-surface. Windows and Linux needs profiling
for respective equivalent surfaces.
This is an intermediate commit, before replacing image surfaces with
cairo pattern groups.
The eventual goal is to reduce flickering and/or use
CPU + bitblt for specific widgets instead of cairo
graphics-cards accel.
This also removes excessive calls to getenv() for every rendering
operation.
This might fix a "SessionHandleRef exists across session deletion",
when the shared_ptr was be pushed onto a x-thread pool, and not
invalidated in time before the session was closed.
destroy_sources () is only called from Session::remove_last_capture ().
The list of sources to be destroyed is the local scope of that method
and will hold a reference to the object.
copy-construct the list and removing elements one by one from the
copy is only unnecessary overhead.