Commit graph

32104 commits

Author SHA1 Message Date
David Robillard
76c6939693 WIP: Document SessionController 2021-06-17 11:22:08 -04:00
David Robillard
01476e352e Prefer SessionController::ffwd() and rewind() in surfaces
I find button_varispeed() confusing, it might be a good idea to split it up
entirely.
2021-06-17 11:22:07 -04:00
David Robillard
ae8f00be50 Use SessionController::locate() in surfaces 2021-06-17 11:22:06 -04:00
David Robillard
d6106ad6d4 Use SessionController::set_transport_speed() in surfaces 2021-06-17 11:22:05 -04:00
David Robillard
eb0d3fa16a Use SessionController::midi_panic() in surfaces 2021-06-17 11:22:04 -04:00
David Robillard
f1fbb81af9 Factor away Editor::do_remove_location_at_playhead_cursor() 2021-06-17 11:22:03 -04:00
David Robillard
e7454a896b Factor away ARDOUR_UI::transport_ffwd_rewind() 2021-06-17 11:22:02 -04:00
David Robillard
b7e6bf20c4 Factor away duplicated Editor::goto_nth_marker() body 2021-06-17 11:22:01 -04:00
David Robillard
852d8de563 Factor away duplicated ARDOUR_UI::transport_roll() body 2021-06-17 11:08:50 -04:00
David Robillard
3d82eb1afd Factor away duplicated ARDOUR_UI::toggle_session_auto_loop() body 2021-06-17 11:08:24 -04:00
David Robillard
b0fb8ae2c9 Factor away duplicated ARDOUR_UI::toggle_roll() body 2021-06-17 11:07:58 -04:00
David Robillard
648124dacb WIP: Sync SessionController::transport_play() with ARDOUR_UI 2021-06-17 11:07:33 -04:00
David Robillard
c4a8dfddfe Sync SessionController::remove_marker_at_playhead() with Editor 2021-06-17 11:07:08 -04:00
David Robillard
30f5e50f85 Sync SessionController::toggle_roll() with ARDOUR_UI 2021-06-17 11:05:54 -04:00
David Robillard
125f7ea273 WIP: Add SessionControllerHandleRef
This can be used to ensure that whenever this has a reference to a session, it
also has a session controller set up to use that session.  Towards sharing code
between ARDOUR_UI and SessionController.

WIP: SessionHandleRef|Ptr are not safe abstractions, so this isn't either,
since derived types can and do manually mess around with the session pointer.
Probably lifetime bugs here, and probably a good idea to statically prevent
that, but a /lot/ of existing code uses _session directly.
2021-06-17 11:04:15 -04:00
David Robillard
83626ae637 Move SessionController to libardour 2021-06-17 11:03:11 -04:00
David Robillard
1559829e24 Factor out SessionController from BasicUI
Towards sharing this code with ARDOUR_UI.
2021-06-17 11:02:08 -04:00
David Robillard
8998efa8c8 Move RecordState to ardour/types.h
This allows it to be used without including session.h.  Using this pointless
cast syntax to make it easy to mechanically convert them all when we can
finally use strong enums.
2021-06-17 11:01:05 -04:00
David Robillard
43ea100381 Put BasicUI in namespace ARDOUR 2021-06-17 10:59:32 -04:00
David Robillard
e4163b47e0 Factor out ControlProtocol::get_session() 2021-06-17 10:58:30 -04:00
David Robillard
ab17e1e019 Remove some unnecessary Session dependency in Push2 surface 2021-06-17 10:57:29 -04:00
David Robillard
56fe5b47ae Rename ControlProtocol::session to ControlProtocol::_session
To match ARDOUR_UI, towards finally sharing code here.
2021-06-17 10:57:07 -04:00
David Robillard
927c7328cc Make some calculations const 2021-06-17 10:56:05 -04:00
David Robillard
181ec1e207 Remove null session checks from OSC surface
Control surface lifetime is managed to be shorter than the session lifetime, if
the session does not exist, then the control surface does not exist either.
2021-06-17 10:55:43 -04:00
David Robillard
e70a2dc461 Remove tranzport surface
This has not been possible to build for some time, so if anyone was going to
miss it, they would have already.
2021-06-17 10:51:45 -04:00
David Robillard
3a14559a9a Remove dead code in ContourDesignControlProtocol
These were identical to SessionController::prev_marker() and
SessionController::next_marker(), but weren't actually used.
2021-06-17 09:56:50 -04:00
David Robillard
73ad115486 Remove dead code in BasicUI and ControlProtocol 2021-06-17 09:56:49 -04:00
David Robillard
8adc08adc0 Clean up control_protocol includes
This order (most local first) is better because it's more likely to catch
missing includes.
2021-06-17 09:56:48 -04:00
David Robillard
0fae0055e9 Clean up whitespace 2021-06-17 09:56:47 -04:00
David Robillard
c6bdf8f2ff Factor out duplicated MidiByteArray 2021-06-17 09:56:46 -04:00
Robin Gareus
cc6b58ef00
Fix Windows builds (pthread handle abstraction) 2021-06-17 13:32:10 +02:00
Paul Davis
5e1e55c982 use UTF8 lower-left corner chars in performance meter to indicate nesting of values 2021-06-16 19:29:03 -06:00
Robin Gareus
0b1d5e4a45
Remove dead assignment 2021-06-16 22:30:09 +02:00
Robin Gareus
f85bbaa97d
Fix C++11ism 2021-06-16 03:03:26 +02:00
Paul Davis
4efe5b7ada continued tweaks for perf meters (including show average and dev in tooltip) 2021-06-15 14:03:55 -06:00
Paul Davis
ad9ac0911e remove some timing stats that it seems unlikely we will use 2021-06-15 14:03:55 -06:00
Ben Loftis
c62b6e0e3e Control Points should not obey Lock Edit, which was intended to lock regions and notes at the time where they were recorded.
Control Points should ignore x_constraint which is set in Drag::motion and potentially other places.
The only thing that should prevent CP sliding is can_slide which is false for the points at the ends of a region.
2021-06-14 11:51:16 -05:00
Luciano Iam
04104b68a6 WebSockets: fix surface build for older systems 2021-06-14 14:50:48 +02:00
Luciano Iam
5fffe985bb WebSockets: update some source headers 2021-06-14 14:45:51 +02:00
Luciano Iam
6cc59ad8e6 WebSockets: update some comments in source
Based on feedback from libwebsockets author
https://github.com/warmcat/libwebsockets/issues/2322#issuecomment-860572124
2021-06-14 12:25:29 +02:00
Luciano Iam
cef81b8c23 WebSockets: minor update in JS code style
Use anonymous blocks { } instead of anonymous functions as the outermost scope
in some files.

Also fix incorrect wording for a comment
2021-06-14 10:36:10 +02:00
Luciano Iam
f1d7e1759a WebSockets: repeat 8baf275 for JS files
Like ec131fc does
2021-06-14 10:25:45 +02:00
Luciano Iam
ebee3a8010 WebSockets: remove unnecessary code
Leftovers from copy and pasting from test_ui.cc
2021-06-14 10:02:25 +02:00
Luciano Iam
cb73eb350d WebSockets: less invasive version of 5407232
There is no need to connect signals twice, can connect them directly to the
helper UI loop and skip the surface loop. Then let the server decide if it is
necessary to call lws_cancel_service() or not.

Also rename WebsocketsServer::should_request_write() to read_blocks_event_loop()
it makes more sense for the caller now on-demand write logic is completely
implemented by the server class.
2021-06-14 10:02:25 +02:00
Robin Gareus
fc6fd7973f
Reset performance counters along with xrun count
This is mainly relevant after session export, which uses
freewheeling and processing take much longer than running realtime.
2021-06-14 03:14:07 +02:00
Robin Gareus
80c11a763a
Notify GUI of x-run counter resets 2021-06-14 03:09:46 +02:00
Robin Gareus
c06553c2de
Reset x-run counter after disabling freewheeling 2021-06-14 03:09:42 +02:00
Paul Davis
d6a1a64398 remove debug output 2021-06-13 18:36:44 -06:00
Paul Davis
6553d5adfc small tweak to perf display if timing stats are not available 2021-06-13 18:35:33 -06:00
Paul Davis
c15e6fd7db fix condition-variable race caused by not holding the request lock when signalling the var 2021-06-13 18:35:33 -06:00