Commit graph

19608 commits

Author SHA1 Message Date
Robin Gareus
f849f3ce2c
Use futex semaphores on Linux only 2022-05-12 00:56:33 +02:00
Robin Gareus
13cac5c139
Grow Graph and RTTask MPMC queues as required
This fixes an issue if with sessions where a process-graph can
have more than 1024 routes to be processed concurrently.
2022-05-12 00:44:39 +02:00
Robin Gareus
5ca76789c5
Allow to query capacity of MPMC queue
This is in preparation to grow the queue as needed.
2022-05-12 00:40:31 +02:00
Robin Gareus
c87a5cdcfd
Remove mutex from RTTaskList, use MPMC queue 2022-05-11 23:55:41 +02:00
Robin Gareus
34678c094a
Implement Futex semaphore 2022-05-11 23:55:41 +02:00
luz paz
36ae8e7022
Fixed typo that may also be a bugfix 2022-05-11 00:14:28 +02:00
luz paz
1e640563d6
Fix source comment typos in libs/ardour
Found via `codespell`
2022-05-11 00:14:28 +02:00
Ben Loftis
a251ba3b76 pt_import: since we aren't using undo here, need to delete the diff_command manually 2022-05-10 15:47:56 -05:00
Ben Loftis
f50d5507c3 midi_model: rename some midi diff functions, to (try to) avoid confusion
syntax for beginning and ending a diff command is:
 "new_diff_command"  ->  "apply_diff_command"

syntax for applying a diff_command is:
 "_as_commit" :  Begins and Commits a standalone undo Command
 "_as_subcommand" :  adds to undo but does not Begin or Commit a Command
 "_only" : (new) applies the note_diff but does not have any effect on undo
2022-05-10 15:47:20 -05:00
Ben Loftis
c44d692390 Create a trap for overlapping or nested undo commands 2022-05-10 13:14:08 -05:00
Paul Davis
a57f4fbce6 temporal: after changing a tempo point, reset the map starting at that point 2022-05-10 09:46:08 -06:00
Todd Naugle
be90b4e0ca US2400 - fix crash when no strip is selected
first selected could be null, so check that first.
This is untested since I don't have a surface.
2022-05-10 09:17:33 -05:00
Robin Gareus
834ca29cde
Silence DR after freewheel export 2022-05-10 16:01:39 +02:00
Robin Gareus
445e8c468e
Add TSFM API to immediately stop the transport
This is useful after a freewheel export, where a realtime-stop
is called, but the actual Locate/MustStop event is only processed
later. Once the session switches back to normal processing after
export the transport is still rolling, TSFM schedules a de-click
locate. This may play some remaining audio.

This new API allows to hard stop the transport, without going
via any session-events and process_with_events. It is intended to
be called from the freewheel process-callback in the last export
cycle.
2022-05-10 16:01:39 +02:00
Robin Gareus
2fc43c59c4
Fix audible hiccup at end of realtime export 2022-05-10 16:01:39 +02:00
Robin Gareus
1809b6ae9a
Reset port resampler after freewheeling
This clears out any data potently left there by export processing.
Previously this could cause an audible click.
2022-05-10 16:01:39 +02:00
Robin Gareus
a97e910b70
Debug efficiency of latency and graph order callbacks 2022-05-09 17:39:05 +02:00
Robin Gareus
3f1420880b
Implement IOPlug processing using the Process Graph 2022-05-09 17:39:05 +02:00
Robin Gareus
af6f8abdc7
Prepare IOPlug processing as GraphNode 2022-05-09 17:39:05 +02:00
Robin Gareus
c45a6b80c7
Session support to add/remove save/load IOPlugs 2022-05-09 17:39:05 +02:00
Robin Gareus
74f71c6683
Session-wide plugin support (IOPlug)
The idea is to run a plugin outside the process graph, and provide
its I/O as port (much like an external JACK app).

The intended use-case is NDI (provide additional I/O), but it could
also be useful for other cases.
2022-05-09 17:39:05 +02:00
Robin Gareus
8a90d4a414
Fix another possible memory leak in BPM detection code 2022-05-09 17:34:59 +02:00
Robin Gareus
f0a8b8cd6d
Fix an unlikely memory leak in zita-resampler 2022-05-07 04:19:16 +02:00
Robin Gareus
221975a982
Fix memory-leak in BPM detection 2022-05-07 04:19:12 +02:00
Robin Gareus
46117303da
Fix some potentially uninitialized variables 2022-05-07 04:19:09 +02:00
Robin Gareus
f5b280a850
Generalize graph processing
This allows to pass any GraphChain to the Graph to process.
It removes the need to use a mutex to swap two dedicated
chains (setup-chain <> active-chain, pending-chain).

Also various special cases pertaining to graph interaction
while auditioning and route-deletion can be removed.

This also unconditionally creates a graph-thread for GraphChains
to be processed, even if the main callback uses a special-cased
sorted RouteList if there is only one process thread.
2022-05-06 17:43:01 +02:00
Robin Gareus
5fa7d481c1
Optimize Route::direct_feeds_according_to_reality
Consolidate duplicate function calls, cache result in local variable.
2022-05-06 14:02:35 +02:00
Robin Gareus
44bb8caa65
Use new Route fed-by API (2/2) 2022-05-06 14:02:35 +02:00
Robin Gareus
9ad154f265
Untangle Graph from Route
The process-graph should only be concerned with GraphNodes,
which may or may not be Routes.

This also removes intrinsic connection information from
the graph-node. Connection information is to be kept separate
from the nodes.

When the graph is re-calculated in the background, old information
has to be retained until the new graph becomes active.

Previously *new* information was already stored in the nodes
while the graph is sorted, even though the new graph was not
active.
2022-05-06 14:02:34 +02:00
Robin Gareus
3862d13e21
Prepare for GraphNode::feeds () and fed-by API update (2/2) 2022-05-06 14:02:34 +02:00
Robin Gareus
078e652859
Implement rt-safe deletion - delegate to butler 2022-05-06 14:02:32 +02:00
Robin Gareus
226dadbd19
Further reduce DSP load of debug builds
In all years of using these assert()s never triggered. Besides
there are valid_port() tests in other strategic locations that
are not periodically hit in realtime context.
2022-05-06 02:04:55 +02:00
Robin Gareus
ed21ea8fc6
Speed up valid-port changes O(n) -> O(log(n))
This significantly reduces DSP load of sessions with many ports
when using debug builds.
2022-05-06 02:04:49 +02:00
Robin Gareus
37c0fceeac
Prefer comparison operators as part of the class 2022-05-06 02:04:43 +02:00
Robin Gareus
ce95c9fb09
Fix std::set< BackendPortPtr> lookup by key
The set uses a custom sort-by-name comparator.
Previously it was possible to have an inconsistent set iterator.
std::set::find() did not find a given port while std::find() did.

This fixes using std::set::find() on the PortIndex set.
2022-05-06 02:04:33 +02:00
Robin Gareus
668cb1ca3b
Set names of RT tasks threads 2022-05-05 00:54:47 +02:00
Robin Gareus
6c2c3a49c4
Update comment about required buffers 2022-05-05 00:54:47 +02:00
John Emmas
2554302281 Export a variable which can't be accessed via a 'get()' function
Temporal::most_recent_engine_sample_rate is used in performance-critical code so shouldn't be accessed via a 'get()' function. But (via the TEMPORAL_SAMPLE_RATE #define) it does get accessed outside of libtemporal and therefore needs to get exported.
2022-05-04 16:09:34 +01:00
Robin Gareus
28231d6365
NO-OP: cleanup public API, re-indent source 2022-05-04 05:58:06 +02:00
Robin Gareus
96c138c985
ALSA: prevent excessive slave-device latency updates on underrun 2022-05-04 05:57:52 +02:00
John Emmas
2245e362b9 TempoMap::twist_tempi() gets used outside of libtemporal so needs to get exported 2022-05-03 11:31:43 +01:00
Caleb Potter
b689d2881e M: US2400: allows user to bank over sends while in TrackView.
Sends only appear on the last 8 vpots, which means sends to matrices 9-12
are unreachable without banking.
2022-05-02 22:41:40 -06:00
Caleb Potter
20fff72370 US2400: Use Bank- and Bank+ to page over sends on pots 2022-05-02 22:41:40 -06:00
Caleb Potter
0d05cd231b US2400: maps track parameters and sends to vpots
Pots 0-4 now display the 5 parameters from the Mackie track subview when a
track is selected and pots 8-23 will display up to the first 16 sends.
2022-05-02 22:41:40 -06:00
Paul Davis
b5487415ec editing: a partiaally implemented version of TempoTwistDrag, to be completed. 2022-05-02 16:47:23 -06:00
Paul Davis
86e7a1b259 temporal: no reason for Point::set() to be virtual 2022-05-02 16:45:33 -06:00
Paul Davis
55755d5453 temporal: fix TempoMap::reset_starting_at()
We were using a given tempo or meter point as part of the metric used when
recomputing its position. In fact, the metric should be only use the
tempo/meter immediately preceding the given point.
2022-05-02 16:44:15 -06:00
Paul Davis
00b9e3f86a temporal: change return type of TempoMap::next_tempo()
It is more useful to get the actual TempoPoint than just the Tempo
that we discover.

Aside: it would be awesome to understand how to use boost::intrusive to get the
next tempo point directly from the tempo hook.
2022-05-02 11:40:23 -06:00
Paul Davis
2b8b9a3a2f const for const-sake 2022-05-01 18:01:35 -06:00
Paul Davis
d218dcb21b evoral: when adding points to a ControlList, coerce the time domain of the new point to the list time domain
This may not be the ideal solution, but for now it appears to be the best approach to preventing
points with different time domains with the same list
2022-05-01 17:50:51 -06:00