13
0
Commit Graph

129 Commits

Author SHA1 Message Date
50232a23a7 temporal: hide superclock_t variant of TempoMap::metric_at()
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
2023-06-12 12:36:16 -06:00
65346496f5
Refactor Ctrl Surface API
* reserve "probe" to actually probe for devices
* use separate probe for libusb and MIDI port devices
* use "available" to check if surface can be used
* allow both methods to be NULL
* remove unused ControlProtocolDescriptor* argument

Most surface just return `true` for available.
2023-05-03 15:38:42 +02:00
847f1e54c1
Clean up ctrl surface API
Remove unused fields, no mandatory surfaces
2023-05-01 02:22:45 +02:00
f718279949 surfaces & event loops: i really mean no more request buffer factories 2023-04-21 13:55:58 -06:00
b35518e212 switch from boost::{shared,weak}_ptr to std::{shared,weak}_ptr
This is mostly a simple lexical search+replace but the absence of operator< for
std::weak_ptr<T> leads to some complications, particularly with Evoral::Sequence
and ExportPortChannel.
2023-03-24 14:19:15 -06:00
39ed528e25 std-ize: convert all boost shared/weak ptr includes to <memory>
Also fix stdint.h -> cstdint and alphabetically order std includes
2023-03-24 14:19:15 -06:00
Marijn Kruisselbrink
bf7f6386d5
Re-enable lib/ardour/test/session_test.
This test seems to be compiling and passing just fine (when run in
isolation), so turning it back on seems like a good idea. To make it
pass when run as part of the full ardour test suite, this does remove
the WebSockets control surface from the control surfaces test though, as
that control surface messes up the event loop of the main thread, which
would otherwise cause use-after-free crashes in the session test.
2023-01-02 20:31:12 +01:00
3f3d0c7e49
Surfaces and panners should not export headers
Those are not shared libraries but only dynamically loaded
plugin objects. Their headers are their own.
2022-11-19 01:11:53 +01:00
9758e6280f use new event loop callback to ensure that all surface/control protocol threads have tempo map ptr set 2022-05-16 15:24:52 -06:00
7c3268d12f temporal: TempoMap::use() returns a const ptr to enforce semantics (library version)
This commit leaves two issues outstanding:

1. unclear/ugly semantics for drag operations that reset the GUI thread's tempo map to the writable copy
2. undo/redo for the tempo map

These will be addressed in future commits
2022-04-08 11:58:04 -06:00
Remi Thebault
a77ac7107f
fix websockets toggle_roll
Also fix BasicUI::toggle_roll who is supposed to do
the same as spacebar but doesn't.
2022-04-08 19:48:23 +02:00
Remi Thebault
93987de09f
websockets provide BBT 2022-04-08 19:39:25 +02:00
Mads Kiilerich
8bb91099c5 wscript: drop configure statements already present in the top level wscript
Avoid repeated pointless configure messages like:
Checking for 'g++' (C++ compiler!)                   : /usr/lib64/ccache/g++
Checking for 'gcc' (C compiler)                      : /usr/lib64/ccache/gcc
2022-01-22 22:19:03 +01:00
2066b6b33a
websockets: require Windows7 (with pollfd) 2021-10-13 21:40:39 +02:00
2e0a069c51
WebSockets: use v7 tempo-map correctly 2021-10-12 15:32:41 +02:00
364fffd458 temporal: TempoMap::Changed is now a static member named TempoMap::MapChanged 2021-08-13 12:51:32 -06:00
bed76798f3 manual fixups after rebase against master (general libs edition) 2021-08-13 12:51:31 -06:00
79763893b3 remove/hide Session::tempo_map() and use TempoMap::use() instead (thread local shared ptr) 2021-08-13 12:51:30 -06:00
f67029bd02 random commit to facilitate trivial move of work from laptop back to main system 2021-08-13 12:51:29 -06:00
cc6b58ef00
Fix Windows builds (pthread handle abstraction) 2021-06-17 13:32:10 +02:00
f85bbaa97d
Fix C++11ism 2021-06-16 03:03:26 +02: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
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
Luciano Iam
e3569b6469
WebSockets: notify server there are pending client updates
This is an update to the surface ArdourFeedback class that is needed to support
the new event loop integration method.

The various session event callbacks cannot be queued in the surface event loop
because that would create a delay between the time such events are fired and
the time for writing to clients arrive, due to lws_service() blocking while
it waits to read. To solve this issue a helper AbstractUI is created for
catching events as soon as possible and issuing a call to lws_cancel_service().

See WebsocketsServer::glib_idle_callback()
2021-06-13 22:00:29 +02:00
Luciano Iam
b3661af92a
WebSockets: additional method for event loop integration
Some distro repositories offer versions of libwebsockets that have not been
compiled with LWS_WITH_GLIB or LWS_WITH_EXTERNAL_POLL enabled. For such cases
a different event loop integration method is needed.

True for Ubuntu 20.04 as of Jun '21
2021-06-13 22:00:29 +02:00
Luciano Iam
5f504f23ac
WebSockets: reduce server log verbosity 2021-06-13 22:00:28 +02:00
Luciano Iam
373d905a93
Update websockets surface author email in source files 2021-06-13 22:00:28 +02:00
Luciano Iam
12a7480ea3
Move #include inside header guard 2021-06-13 22:00:28 +02:00
ce43161d4e
WebSockets: log hostname and listen-port 2020-11-23 20:12:57 +01:00
7d4cd5c76a
Fix C++11ism 2020-11-20 13:32:20 +01:00
Luciano Iam
9ee828b47b
WS: properly support MIDI strips 2020-11-19 17:03:36 +01:00
Luciano Iam
9c08c058a3
WS: crash bugfix related to missing strip panner
Surface made Ardour crash when a client connected
and some session track was not a VCA nor had a panner,
like MIDI strips.
2020-09-04 01:59:53 +02:00
63a117bf93
And another boost/C++11 fix
This fixes Undefined symbols:
"ArdourSurface::hash_value(ArdourSurface::NodeState const&)", referenced from:
  boost::hash<ArdourSurface::NodeState>::operator()(ArdourSurface::NodeState const&) constin client.cc.1.o
  boost::hash<ArdourSurface::NodeState>::operator()(ArdourSurface::NodeState const&) constin server.cc.1.o
2020-08-31 08:28:50 +02:00
a9c2350e87
Fix yet another C++11ism 2020-08-31 07:52:48 +02:00
39110463f3
Amend cdd48926d1 use ScopedConnectionList directly 2020-08-31 07:41:11 +02:00
cdd48926d1
Remove more libwebsocket C++11isms
* amend previous commit, fix runtime_error implementation
* Do not copy-construct classes that have a PBD::scoped connection list.
  Replace std::map::emplace[C+11], an store shared pointers the std::map.
* Update ArdourMixerStrip is-a ScopedConnectionList (not has-a)
2020-08-30 22:57:43 +02:00
8eb4dcb675
Fix websocket C++11ism 2020-08-30 21:15:33 +02:00
af79240c81
Namespace libwebsocket surface classes
Using the global names-pace for classes named "Json", "TypedValue",
"ArdourTransport", "ArdourMixerPlugin" etc is not acceptable.
2020-08-30 21:15:07 +02:00
Luciano Iam
665e0686e5
WS: noop use a namespace for JSON utilities
Instead of a class with static methods

Also correct some whitespace to prevent triggering of OCD cycles
2020-08-30 19:29:28 +02:00
Luciano Iam
aa38491b7d
WS: move VCA detection to mixer strip interface
Expose the wrapped Stripable the least as possible
2020-08-30 19:29:28 +02:00
Luciano Iam
e510c0cb75
WS: consistent naming of strip/plugin/param identifiers
Rename all {object}_n variables and arguments to {object}_id

Parts of code were using the former convention, now use the latter everywhere
Another step towards supporting visual position agnostic identifiers in the future
2020-08-30 19:29:28 +02:00
Luciano Iam
c32a5917f3
WS: handle strips and plugins removal 2020-08-30 19:29:27 +02:00
Luciano Iam
a8f917e7e2
WS: prepare for handling object disconnections
Use maps instead of vectors for holding strips and plugins
This allows to deal with "holes" after objects are removed

Also paves the way for a future improved way of identifying
individual strips and plugins
2020-08-30 19:29:27 +02:00
Luciano Iam
7521d8ab6f
WS: add some meaningful error messages 2020-08-30 19:29:27 +02:00
Luciano Iam
3509fe1589
WS: use an object-oriented internal API for the mixer
- This allows to better handle strips & plugins connection lifecycles
- Coherent with the JS client design
2020-08-30 19:29:27 +02:00
Luciano Iam
4a4734fbb1
WebSockets: properly release strips and plugins when removed
This should fix some crashes reported by the beta testing team
2020-08-30 19:29:27 +02:00