Commit Graph

29280 Commits

Author SHA1 Message Date
db59711bc9
Fix SessionHandleRef shared-ptr leak when unfreezing tracks 2020-03-14 13:25:54 +01:00
8f37865070
Prevent freeze/bounce of sidechain processors
This also consolidates code to test if a processor can be frozen
from various places.
2020-03-14 13:25:54 +01:00
97f3d9496b
Show latency display/config button for in all plugin UIs 2020-03-14 13:25:51 +01:00
John Emmas
e3ad436bda Update 'CURRENT_SESSION_FILE_VERSION' for our MSVC builds 2020-03-14 11:23:26 +00:00
91a87fbc5b somewhat convoluted reworking to get TransportMastersWidget's per-row port combos to update for hotplug
This approach should extended to other things, notably control surfaces
2020-03-13 22:16:37 -06:00
d95f6039f8 import_pt.cc: Remove process lock on AudioEngine && save less often 2020-03-14 12:03:22 +11:00
91c92f8e25 remove debug output 2020-03-13 13:52:38 -06:00
7ba8714e37 add/alter DEBUG_TRACE output 2020-03-13 13:52:38 -06:00
ee1f8a6fc7 add comment and additional reset when reinitializing transport master engine DLL 2020-03-13 13:52:38 -06:00
c83d509203 when locating to follow a transport master, reset engine DLL 2020-03-13 13:52:38 -06:00
f5ec5ea929 add new API to TransportMasterManager to manage use of DiskReader::{inc,dec}_no_disk_output() 2020-03-13 13:52:38 -06:00
cc43ec3ef6 adjust TransportFSM to avoid declick to locate if DiskReader::_no_disk_output is set
Under those conditions, the DR will not execute a code path that will cause the declick to take place
and therefore the declick will never finish
2020-03-13 13:52:38 -06:00
cf15b6ad7a prevent out-of-window MTC messages from moving transport if we're not using MTC
in 5.x, we would only run the MTC parsing code if slaved to MTC. That's no longer true in 6.0, and without
this change, MTC will cause a locate at startup
2020-03-13 13:52:38 -06:00
26b6b8d840
mingw/gcc-8: use glib's stat(), drop hardlink support 2020-03-13 01:21:51 +01:00
64ddc5dd32
Fix setting automation state for Aux-sends
When switching the Mixer to show sends, using _amp as
intermediate for automation is not correct.
The control is not owned by the amp.
The same is true for VCAs, prefer the control (see 8400ebd175)
2020-03-12 18:44:30 +01:00
5b113c9c5b
Fix un/bypassing Aux-send panners
This fixes issues with send-panner bypass whenever the
target bus input-count is different from the send's channel count.

--

Previously, when the aux-send panner was bypassed, data was
copied using BufferSet::read_from().
This sets the channel count of the output buffer set (here: mixbufs)
to match the input (here: bufs).

e.g. mono to stereo, "1 in -> 2 out" out was changed to "1 in -> 1 out".

Un-bypassing the panner later does not reconfigure the I/O.
Mixbufs remained mono, and PannerShell::run() "1 in -> 1 out"
does nothing. The panner was effectively not functional.
2020-03-12 02:23:49 +01:00
33f85b094b
NO-OP: reduce scope 2020-03-12 02:13:27 +01:00
dd30b8b31e
NO-OP: whitespace 2020-03-12 01:58:50 +01:00
6ad3ce7bff audio clocks that are not editable are not focusable either 2020-03-11 09:07:28 -06:00
96daa4036a fix apparent free-ordering issue reported in #7926 2020-03-11 08:50:29 -06:00
12c4a88db6
Prevent stuck VCA button
This is for Mixbus, which always shows the VCA button regardless
of VCAs being present in the session.
2020-03-11 15:13:18 +01:00
d979c9d09c
Fix win32, mingw/gcc-8.3 builds 2020-03-11 07:20:00 +01:00
7202f3ad28
Add Lua binding to query a region's playlist 2020-03-10 23:54:31 +01:00
925be49b2d
Remove redundant collectgarbage() calls from scripts
Since 8112d6472e garbage is automatically collected
after running a Lua GUI script.
2020-03-10 23:31:20 +01:00
f921b4790f
Add Lua example snippet to set region fades 2020-03-10 23:20:07 +01:00
6569653a3d
Add Lua bindings to access region-fades 2020-03-10 23:10:51 +01:00
a254ce22a8
Fix optimized mingw/gcc-8.2 builds
gcc-8.2 -O3 optimization enables -finline-functions.
For reasons yet unknown this causes issues with Glib::Threads::Private
when loading sessions (creating new ones is fine) and likely some
other operations.

Without this change the following happens (5.12 as well as current git)
when loading an existing session:

---
[Switching to Thread 6092.0x12fc]
Breakpoint 1, ARDOUR::SessionEvent::create_per_thread_pool (name=..., nitems=4096)
    at ../libs/ardour/session_events.cc:60
60      in ../libs/ardour/session_events.cc
$6 = (const std::__cxx11::string &) @0x210dfc60: {static npos = 18446744073709551615,
  _M_dataplus = {<std::allocator<char>> = {<__gnu_cxx::new_allocator<char>> = {<No data fields>}, <No data fields>},
    _M_p = 0x210dfc70 "GUI"}, _M_string_length = 3, {_M_local_buf = "GUI\000\000\000\000\000<E0>P<DA>:\000\000\000",
    _M_allocated_capacity = 4805959}}
#0  ARDOUR::SessionEvent::create_per_thread_pool (name=..., nitems=4096) at ../libs/ardour/session_events.cc:60
#1  0x0000000000434e77 in ?? ()

[..]

Thread 1 (Thread 6092.0x12fc):
#0  0x0000000061f152ef in PBD::RingBuffer<void*>::write (this=this@entry=0x50, src=src@entry=0x210dcdc8,
    cnt=cnt@entry=1) at ../libs/pbd/pbd/ringbuffer.h:170
#1  0x0000000061ee954d in push (t=<optimized out>, this=0x0) at ../libs/pbd/pool.cc:290
#2  CrossThreadPool::flush_pending_with_ev (this=0x0, ptr=<optimized out>) at ../libs/pbd/pool.cc:254
#3  0x00000000218d5b01 in operator() (a0=0x210dcdc8, this=0x48)
    at /home/ardour/win-stack-w64/include/boost/function/function_template.hpp:682
#4  operator()<boost::function<void(ARDOUR::SessionEvent*)>, boost::_bi::list0> (a=<synthetic pointer>, f=...,
    this=0x68) at /home/ardour/win-stack-w64/include/boost/bind/bind.hpp:259
#5  operator() (this=0x48) at /home/ardour/win-stack-w64/include/boost/bind/bind.hpp:1294
#6  boost::detail::function::void_function_obj_invoker0<boost::_bi::bind_t<boost::_bi::unspecified, boost::function<void (ARDOUR::SessionEvent*)>, boost::_bi::list1<boost::_bi::value<ARDOUR::SessionEvent*> > >, void>::invoke(boost::detail::function::function_buffer&) (function_obj_ptr=...)
    at /home/ardour/win-stack-w64/include/boost/function/function_template.hpp:159
#7  0x0000000063e2dc39 in operator() (this=0x210dcf70)
    at /home/ardour/win-stack-w64/include/boost/function/function_template.hpp:682
#8  AbstractUI<Gtkmm2ext::UIRequest>::call_slot(PBD::EventLoop::InvalidationRecord*, boost::function<void ()> const&)
    (this=0x3ada50e0, invalidation=0x0, f=...) at ../libs/pbd/pbd/abstract_ui.cc:434
#9  0x00000000216cbb96 in ARDOUR::SessionEventManager::merge_event (this=<optimized out>, ev=<optimized out>)
    at /home/ardour/win-stack-w64/include/boost/function/function_template.hpp:507
#10 0x00000000216e3861 in non-virtual thunk to ARDOUR::Session::queue_event(ARDOUR::SessionEvent*) ()
    at ../../win-stack-w64/include/glibmm-2.4/glibmm/threads.h:709
#11 0x00000000216c91bf in ARDOUR::SessionEventManager::clear_events(ARDOUR::SessionEvent::Type, boost::function<void ()>) (this=this@entry=0x4256cc08, type=type@entry=ARDOUR::SessionEvent::Skip, after=...)
    at ../libs/ardour/session_events.cc:156
#12 0x000000002168874a in ARDOUR::Session::sync_locations_to_skips (this=this@entry=0x4256ca90)
    at /usr/lib/gcc/x86_64-w64-mingw32/8.3-posix/include/c++/new:169
#13 0x0000000021688802 in ARDOUR::Session::update_skips (this=this@entry=0x4256ca90, loc=loc@entry=0x0,
    consolidate=consolidate@entry=false) at ../libs/ardour/session.cc:1683
#14 0x0000000021699649 in _locations_changed (locations=..., this=0x4256ca90) at ../libs/ardour/session.cc:1859
#15 apply<ARDOUR::Session> (method=
    (void (ARDOUR::Session::*)(ARDOUR::Session * const, const ARDOUR::Locations::LocationList &)) 0x216994f0 <ARDOUR::Session::_locations_changed(std::__cxx11::list<ARDOUR::Location*, std::allocator<ARDOUR::Location*> > const&)>,
    obj=..., this=0x40ff4c60) at ../libs/ardour/ardour/location.h:240
#16 ARDOUR::Session::locations_changed (this=this@entry=0x4256ca90) at ../libs/ardour/session.cc:1840
#17 0x0000000021700abd in ARDOUR::Session::set_state (this=0x4256ca90, node=..., version=6000)
    at ../libs/ardour/session_state.cc:1657
#18 0x0000000021713456 in ARDOUR::Session::post_engine_init (this=this@entry=0x4256ca90) at ../libs/pbd/pbd/xml++.h:81
#19 0x00000000216ad5cd in ARDOUR::Session::Session (this=0x4256ca90, eng=..., fullpath=..., snapshot_name=...,
    bus_profile=<optimized out>, mix_template=...) at ../libs/ardour/session.cc:383
#20 0x000000000046db8b in ?? ()
Backtrace stopped: previous frame inner to this frame (corrupt stack?)

---

Note that in the trace starting at #19 the source-file references
are offset :post_engine_init() isn't in xml++.h
(likely debug symbols are incorrect due to inline functions)

The application crashes due to #2 ::flush_pending_with_ev (this=0x0 ..)
But the earlier breakpoint above shows that the ThreadPool was
created, and this #11 ::clear_events() should not assign NULL.

(This happens on a single-core CPU, too)
2020-03-10 20:55:50 +01:00
ebd743d795
NO-OP: use set/clear_flag() API instead of set_flags() 2020-03-10 20:55:50 +01:00
2b17ded785
Add convenience ControlFlags operators
Explicit functions for operator&=~ and operator|=
2020-03-10 20:55:50 +01:00
45f5513b66 remove debug output 2020-03-10 11:56:10 -06:00
bc638c0496 create transport master in the factory method if the engine is running
This fixes the GUI thinking there is no port because it is notified about the TM before the port
is created
2020-03-10 11:56:00 -06:00
f827294b0b small improvements to Transport Masters dialog (in preferences and elsewhere) 2020-03-10 11:40:03 -06:00
aad60e37b9 small adjustments to TransportMaster API to better accomodate the "ignore/accept commands" concept 2020-03-10 11:39:39 -06:00
843907654c do not reset default transport speed when stopping to prepare for a locate 2020-03-10 09:16:39 -06:00
Nikolaus Gullotta
5dcac21092
Adhere to Ardour style guide - 810b2fb78d 2020-03-10 09:41:50 -05:00
John Emmas
4e137d5cbb Avoid using 'boost::aligned_storage' which is known to be problematic in MSVC builds:-
https://www.boost.org/doc/libs/1_65_0/libs/type_traits/doc/html/boost_typetraits/reference/aligned_storage.html
2020-03-10 12:28:52 +00:00
9ef5f4d159 Session::have_looped must only be true when we locate because we reached the loop end
Locating the start of the loop range at transport start does not count as "have looped". This was preventing
pre-roll when starting to loop, which in turn caused data/event loss because the start/end sample ranges
would be incorrect inside process
2020-03-09 15:40:21 -06:00
1d17993a29
Revert failed experiment, scripted multiple MIDI outputs via dsp_run()
This reverts commit 8702ff2189,
and b10d9cf09b.

There was a misconception on the iterator (port vs message
in sequence), besides Ardour's mixer-strip is preferably used
with a single MIDI port. Most plugin-standards also only support
one port.

If need be LuaDSP run_map() can be used to handle multiple
MIDI I/O ports already.
2020-03-09 22:12:23 +01:00
Nikolaus Gullotta
810b2fb78d
Prevent double free of global observers
We accomplish this by explicitly setting the global_obs to NULL after
free'ing it. The crash that led to this fix can be replicated as such

$ sendosc localhost 3819 /set_surface i 8 i 159 i 8
$ sendosc localhost 3819 /set_surface i 0 i 0 i 0
$ sendosc localhost 3819 /set_surface i 0 i 0 i 0

In this example the observer is created, then free'd, and then free'd
*again* because the new observer was never made (sur->feedback[x]
checks fail)
2020-03-09 13:02:38 -05:00
379115a20e
Fix MacOS 10.11 (clang-8.0.0) builds
gcc, and recent clang-10 can construct new objects
using references as arguments.

However clang-8 (and MSVC?) do not:
   "error: no matching function for call to 'operator new'"

The compiler apparently does not expand the template
  class A  <-> `A*`  vs. `A const&`
for different cases.
2020-03-09 18:33:11 +01:00
70e2ddbc1b
Allow to bundle gdb with optimized windows builds
Preferably also configure with "--optimize --debug-symbols"
when setting the PACKAGE_GDB environment variable
2020-03-08 23:34:20 +01:00
7696380cfd
Replace strftime() with Glib::DateTime() -- GUI
This is mainly for windows compatibility "%F" is not supported.
An alternative would be to s/%F/%Y-%m-%d/ to produce the ISO date.
2020-03-08 23:32:12 +01:00
9e2b896516
Replace strftime() with Glib::DateTime()
This is mainly for windows compatibility "%F" is not supported.
An alternative would be to s/%F/%Y-%m-%d/ to produce the ISO date.
2020-03-08 23:31:51 +01:00
6f29f45c81
Fix typo in f265bbbf82 2020-03-08 04:23:45 +01:00
82c8e6c9d0
Fix count-in and loop-as-mode metronome clicks 2020-03-08 03:51:04 +01:00
f265bbbf82
mingw/gcc-8.2 compat: _xgetbv() needs -mxsave
Otherwise this causes PBD::FPU to fail with
error: inlining failed in call to always_inline ‘long long int _xgetbv(unsigned int)’
2020-03-08 02:41:15 +01:00
b0e7ba1262
Fix for modern boost + updated buildstack
Ardour's boost is not compiled --with-system, this causes issues
with modern compilers (gcc 8.2) when linking.
2020-03-08 02:38:30 +01:00
ede853d791
NO-OP: whitespace 2020-03-08 02:32:07 +01:00
1196eed89d
Remove Mixbus send special case
Mixbus v6 uses AutomationType BusSendLevel like other Sends,
however with different min/max range compared to default Ardour
Aux sends. Control surfaces should use interface/internal API.
2020-03-07 02:33:36 +01:00
9c97724fc9
Fix OSC endless loop for tracks with hidden plugins 2020-03-07 02:23:56 +01:00