Commit graph

33473 commits

Author SHA1 Message Date
Robin Gareus
747b24f063
Change LuaWindow into an ArdourWindow
* remember window visibility, size and position
* Show as toggle in the window-menu (rather than show action)
* reduce specialization, use WM and ArdourWindow infrastructure
  (transient parent, window-type, etc)
2021-09-20 04:26:24 +02:00
Robin Gareus
23c5793173
Remove duplicate calls to set_session
Windows managed as Proxy do not need direct calls to set_session().
This is already handled by WM::Manager::instance().set_session()

Also WM set_session() called it twice.
2021-09-20 04:21:21 +02:00
Robin Gareus
851fab7ec3
Print g_log messages to stdout as well
This handles an edge-case in case the message arrives
before the UI is up, there is still a message printed,
before Ardour crashes (e.g. when setup_windows() fails).
2021-09-20 04:16:09 +02:00
Robin Gareus
5a1201f05b
Fix duplicate libs 2021-09-19 23:39:51 +02:00
Robin Gareus
29f96ad13e
Fix cross-compile (undefined references for canvas-tests) 2021-09-19 23:38:44 +02:00
Robin Gareus
bcb9487c39
Only setup Editor tooltips once
ArdourUI::setup_tooltips() calls editor->setup_tooltips() already.
2021-09-19 18:51:56 +02:00
Robin Gareus
5fb54c008d
Fix shortcut display in editor tooltips #8798
After the editor is attached as tab to the main window,
looking up keyboard bindings using get_toplevel() no longer
works.

This uses the widget-hierarchy just like ARDOUR_UI does.
2021-09-19 18:46:06 +02:00
Robin Gareus
0b2b361b32
Dis/reconnect to session signals for each session
This allows to load a session from a running instance.
Prior to this change this caused a crash (_session = null)

```
#1  ARDOUR::Session::session_directory() const (this=0x0) at ../libs/ardour/ardour/session.h:257
#2  EditorSources::populate_row(Gtk::TreeRow, boost::shared_ptr<ARDOUR::Region>) (this=0x555559836900, row=..., region=...) at ../gtk2_ardour/editor_sources.cc:433
#3  EditorSources::regions_changed
[ .. signal propagation ..]
#20 ARDOUR::Region::send_change
#21 PBD::Stateful::resume_property_changes
#22 ARDOUR::AudioRegion::_set_state
#23 ARDOUR::AudioRegion::set_state
#24 ARDOUR::RegionFactory::create
#25 ARDOUR::Session::XMLAudioRegionFactory
#27 ARDOUR::Session::load_regions
#28 ARDOUR::Session::set_state
#29 ARDOUR::Session::post_engine_init
#30 ARDOUR::Session::Session
#31 ARDOUR_UI::load_session_stage_two
#32 ARDOUR_UI::load_session
#33 ARDOUR_UI::open_recent_session
```
2021-09-19 04:56:13 +02:00
John Emmas
666e62076c Part 2: Complete the changes needed to make 'boost::intrusive::list' work with MSVC
It turned out that 'boost::intrusive::list_base_hook<>' won't compile if its parent class is declared using '__declspec(dllexport)' - so rather than exporting each entire class, let's use the alternative approach and export the various class members individually.
2021-09-18 13:40:22 +01:00
Paul Davis
47f7958714 canvastable: remove unused vars; rename others 2021-09-17 14:36:09 -06:00
Paul Davis
44b1cea54a canvastable: minor optimization 2021-09-17 12:53:16 -06:00
Paul Davis
59c8b99fee canvastable: remove rows/cols members, reuse ::compute() for ::size_request() 2021-09-17 12:51:26 -06:00
Paul Davis
98e0ad901a canvas: significant design changes and implementation fixes for Table 2021-09-17 12:34:13 -06:00
Robin Gareus
e5599d1c85
Fix div/zero, allow switching backends
This is another attempt replacing 1288262ca7,
which performs better.
2021-09-15 17:52:59 +02:00
Robin Gareus
cb81b06a5d
Revert "Fix div/zero, allow switching backends"
This reverts commit 1288262ca7.
2021-09-15 17:52:53 +02:00
John Emmas
840e63e6b2 Prefer tags for 'boost::intrusive::list' rather than list_member_hook<>
list_member_hook<> is very troublesome in MSVC and is known to cause problems in other compilers when used inside a class which has a virtual base class.
2021-09-15 09:28:54 +01:00
Paul Davis
999fe54ab8 canvas: a few variable cleanups in Table and more use of for (auto ..) 2021-09-14 22:39:59 -06:00
Paul Davis
6aaba192a0 canvas: improve computation of Table bounding box 2021-09-14 21:39:24 -06:00
Paul Davis
0878894c59 triggerbox: set bg color for packing table in trigger UI 2021-09-14 21:38:48 -06:00
Paul Davis
b3854c2e92 canvas: just use stack and size counter instead of std::vector<> 2021-09-14 21:22:56 -06:00
Paul Davis
9925147aae triggerbox: follow UI changes to Table::attach() 2021-09-14 21:18:44 -06:00
Paul Davis
1c42c733f7 canvas: remove use of Table::Index from API of Table::attach() 2021-09-14 21:18:44 -06:00
Paul Davis
c952c57a99 canvas: actually follow CSS conventions for 1/2/3/4 arguments in padding 2021-09-14 21:18:44 -06:00
Robin Gareus
5eee8bf1a3
Allow to change process graph while auditioning
This fixes an issue with adding/removing tracks while auditioning.

Session::remove_routes() calls Graph::clear_other_chain(),
which will block until the graph chains have been swapped.
2021-09-15 04:03:18 +02:00
Paul Davis
5816ca31b8 triggerbox: add some padding around button elements (mostly just testing) 2021-09-14 18:50:01 -06:00
Paul Davis
473ef54614 canvas: fix initialization of FourDirections object 2021-09-14 18:49:41 -06:00
Paul Davis
9e60fb92c2 triggerbox: mark GUI buttons for expansion 2021-09-14 18:43:18 -06:00
Paul Davis
d6208eabd8 canvas: fix handling of expanding items in table layout 2021-09-14 18:42:59 -06:00
Paul Davis
932ae71cbb triggerbox: use correct table coords to position things 2021-09-14 18:29:39 -06:00
Paul Davis
5def36f780 canvas: somewhat functional homogenous table layout 2021-09-14 18:29:39 -06:00
Paul Davis
d71fcf1955 canvas: add Table debug bit 2021-09-14 18:29:39 -06:00
Paul Davis
46586f3a9d triggerbox: switch GUI packer from ConstraintPacker to Table (non-functional test platform) 2021-09-14 18:29:39 -06:00
Paul Davis
f05bb4afab canvas: new type, to centralize CSS-style padding/spacing initialization (but only used by Table so far) 2021-09-14 18:29:39 -06:00
Paul Davis
c5fcdc1119 canvas: more work on table layout, still incomplete 2021-09-14 18:29:39 -06:00
Robin Gareus
3195fb720a
Fix latency signal emission sequence when using JACK
Capture latency needs to be updated before playback latency,
various internal parts depend on this order (which is also
the default for libjack itself).
2021-09-14 22:03:51 +02:00
Robin Gareus
bc4eb334d9
Align printed port/latencies in debug script output 2021-09-14 21:39:54 +02:00
Robin Gareus
2c4a2fc6fa
Fix ambiguous latency detection (mostly revert eb0498bb2) 2021-09-14 21:39:53 +02:00
Robin Gareus
4998b2711b
Amend f301e692a: expose compensated port-latency
Retain min/max when copying inherited latency from
connected ports.

When there is a direct connection port A out -> port B in,
min/max latency range should be retained in direction
of signal flow.

Ardour can only adjust latency in reverse direction of signal flow
to match min = max with an internal delay-line. ie set playback
latency of an input port, or capture latency of an output port.
2021-09-14 21:39:53 +02:00
Robin Gareus
a84cb976a0
Add API to query I/O latency from port-engine
This allows to get public latency ranges for any port
including Ardour's latency-compensation as well as including
any latency induced by external JACK applications.

It is mainly useful to detect ambiguous latency and to
forward public port latency of connected ports.
2021-09-14 21:39:53 +02:00
Robin Gareus
f2ea9461f2
Fix API, Route::apply_latency_compensation() is not virtual 2021-09-14 21:39:53 +02:00
Paul Davis
44b11802bf canvas: initial (probably incorrect) implementation of Canvas::Table 2021-09-13 22:00:33 -06:00
Robin Gareus
1288262ca7
Fix div/zero, allow switching backends
When switching backends, the effective sample-rate is zero.
This only affects the butler thread (the only active thread when
stopped). The actual issue here is the butler calling
"non-realtime-stop" without a backend. However fixing 0/0
generally seems appropriate.
```
#0 in int_div_round<long>(long, long) (x=0, y=0) at ../libs/pbd/pbd/integer_division.h:36
#1 in Temporal::samples_to_superclock(int64_t, int) (samples=0, sr=0) at ../libs/temporal/temporal/superclock.h:39
#2 in Temporal::timepos_t::timepos_t(long) (this=0x7f94bc0a5890, s=0) at ../libs/temporal/temporal/timeline.h:55
#3 in ARDOUR::Automatable::non_realtime_locate(long) (this=0x55a12a980cc8, now=0) at ../libs/ardour/automatable.cc:421
#4 in ARDOUR::Route::non_realtime_locate(long) (this=0x55a12a980ae0, pos=0) at ../libs/ardour/route.cc:5462
#5 in ARDOUR::Session::non_realtime_stop(bool, int, bool&) (this=0x55a12e0cd000, abort=false, on_entry=1, finished=@0x7f94bc0a5e0f: true) at ../libs/ardour/session_transport.cc:1487
#6 in ARDOUR::Session::butler_transport_work(bool) (this=0x55a12e0cd000, have_process_lock=false) at ../libs/ardour/session_transport.cc:1153
#7 in ARDOUR::Butler::thread_work() (this=0x55a12f3b7000) at ../libs/ardour/butler.cc:222
#8 in ARDOUR::Butler::_thread_work(void*) (arg=0x55a12f3b7000) at ../libs/ardour/butler.cc:16
```
2021-09-11 04:54:40 +02:00
Robin Gareus
a8092461f7
Do not terminate on G_LOG_LEVEL_CRITICAL
There are cases where gtk modules log critical messages,
notably gtk-2.0/modules/libgail.so can trigger
`g_log: g_object_unref: assertion 'G_IS_OBJECT (object)' failed`,
which should not cause Ardour to terminate.
2021-09-10 23:41:33 +02:00
Robin Gareus
27b64ac36c
Remove unused headers 2021-09-10 23:41:29 +02:00
Paul Davis
f07885ea13 triggerbox: UI part of size_t => uint64_t change 2021-09-10 13:12:40 -06:00
Paul Davis
df1780f09d triggerbox: use uint64_t instead of size_t
Somewhat unbelievably, macOS defines size_t as unsigned long, which the compiler there
believes is distinct from unsigned long long even then they have the same bitwidth
and signedness. We don't have any string converters for unsigned long, only uint64_t
(unsigned long long), so various things break.
2021-09-10 13:12:14 -06:00
Paul Davis
2e4502763c triggerbox: (slowly) evolving the launch settings dialog 2021-09-10 13:05:19 -06:00
Paul Davis
e777acb7f9 triggerbox: add void* pointer to hold reference to anonymous UI object 2021-09-10 13:04:49 -06:00
Paul Davis
00d4765b57 gtkmm2ext: move initialization of CairoWidget members into initializer context 2021-09-10 13:03:57 -06:00
Paul Davis
9f0f1f1772 gtkmm2ext: when calling ::get_width()/get_height() on a cairowidget, if allocation is zero, use widget size 2021-09-10 13:03:32 -06:00