summaryrefslogtreecommitdiff
path: root/libs
AgeCommit message (Collapse)Author
2020-04-28Prepare to allow using ALSA backend with nperiods > 3Robin Gareus
This will still need an update for Alsa_pcmi::set_hwpar() capture channel (which is fixed at 2, unless FRAG_NEAR is used).
2020-04-28Add flag to allow ALSA backend to fall back to nearest avail. nperiodsRobin Gareus
2020-04-27show MTC transport master latency when computedPaul Davis
2020-04-27Ignore unconnected ports for latency-compensationRobin Gareus
This fixed a false-positive "ambiguous latency" warning for MIDI busses: MIDI track -midi-> MIDI Bus w/instrument -audio|midi-> master The master-bus only has audio inputs, so the MIDI Bus' MIDI out is left unconnected. Its latency does not matter, it can float freely. Previously it was assumed to be zero. So the MIDI Bus' input playback latency range was [0, master-bus playback-latency].
2020-04-27nominal improvement for MTC master: use port latency to adjust sampletimes ↵Paul Davis
that MTC events "occured at"
2020-04-27Don't call into engine for queued latency updatesRobin Gareus
2020-04-27Prevent excessive latency recomputationsRobin Gareus
Session::update_latency() may be called multiple times with the process-lock being held.
2020-04-27Remove debug messageRobin Gareus
2020-04-27Skip delayline updates if no change is requiredRobin Gareus
2020-04-27Work around jack2's insane thread semanticsRobin Gareus
jack2 can process in parallel with calling a graph-order or latency-callback, so Ardour takes a lock to update those in sync. Yet jack2 can also block while port-registrations happen, and concurrently emit latency-callback from another thread..
2020-04-26Prevent race between adding ports and IO port-lookupRobin Gareus
2020-04-26Remove duplicate i/o latency calculationRobin Gareus
Port and connection changes always imply a latency_callback from the engine. Worst I/O latency is updated directly in Session::update_latency() which is called from AudioEngine::latency_callback. Explicit subscriptions to route->output()->changed() is not needed to update the worst I/O latency. Only set_block_size() needs to to update the I/O latency when the buffer-size changes.
2020-04-26Remove common prefix for latency debuggingRobin Gareus
-DLatency now triggers all four: * LatencyCompensation (entry-points, overall flow) * LatencyIO (Port/IO query, set/get private/public) * LatencyDelayLine (Delaylines for internal sends and alignment) * LatencyRoute (route processor latency)
2020-04-26Fix a deadlock (process_lock vs _update_latency_lock)Robin Gareus
The backend may call update_latency() while at the same time the auto-connect-port calls set_worst_io_latencies(). The latter already holds the process-lock, so update_latency() first needs to acquire it, as well. If one already holds the _update_latency_lock, one must not ask for the process-lock. --- Previously Ardour's connection manager first took the process_lock and then waited to the _update_latency_lock. Meanwhile jack calls latency_callback(), takes the _update_latency_lock and waits for the process_lock. Classic deadlock.
2020-04-26Cont'd work on delayline-config (amend b196cef2)Robin Gareus
2020-04-26Speed up loading sessions with synthsRobin Gareus
LV2 plugins may add a MIDNAM file when they're loaded. This can be happen concurrently with the MidiPatchManager, loading the system-wide patch files. Session load should not be interrupted by the initial background scan of patch files, which can take a very long time. We need to allow update_custom_midnam() to grab the _lock.
2020-04-25NO-OP: reduce scope, return earlyRobin Gareus
2020-04-25Remove unused signalRobin Gareus
2020-04-25Prevent delay-line reconfiguration while processingRobin Gareus
Various backends have different strategies for updating latencies, and different thread semantics for latency update callbacks. With jack2 it is possible that processing happens concurrently while port latencies are being changed. Ardour internal backends emit the latency callback from the main process thread, serializing latency changes with processing. Various user actions can also trigger latency changes. e.g. with a stopped engine it is possible to re-order plugins.
2020-04-25Clean up 135814cf0, prefer PannableChanged signalRobin Gareus
This allows to also catch cases when a panner-ui directly changes set_linked_to_route() of the panner shell.
2020-04-24fix thinko in Session::should_ignore_transport_request() and drop out of ↵Paul Davis
external sync if command is allowed The semantics are that if the user configures things to allow transport commands while using a transport master, issuing such commands first stops using the master
2020-04-24make Session::should_ignore_transport_request() non-constPaul Davis
2020-04-24fix parentheses around expression that prevented port flags from being set ↵Paul Davis
for ltc slave
2020-04-24ensure that when a Session emits Port::PortDrop, transport master ports are ↵Paul Davis
left in place
2020-04-24Fix MacOS builds (API change in 705ac7bfc5cc3)Robin Gareus
2020-04-24Fix builds, missing includeRobin Gareus
2020-04-24Update Russian translationAlexandre Prokoudine
2020-04-24Expose pan-link via Send API, emit signal on changeRobin Gareus
2020-04-23Clean up Audition realtime_overwriteRobin Gareus
Auditioner seek calls are explicitly handled by the butler, and DR:overwrite_existing_buffers() is called explicitly to read MIDI data for audition. Session::non_realtime_overwrite is no longer required. This reverts commit 6fbcf837793ec9a8347fd2d12823b9e56587ffc0 and parts of 2d11667ce3d2ada93c0fb90978bdcc054413c2bb.
2020-04-23Fix MIDI auditioningRobin Gareus
The Auditioner is not part of the session route-list and the auditioner route's I/O latency is never updated. Session::process_audition() does not handle pre-roll either, so it need to be zeroed, otherwise Route::roll skips samples. This has lead to initial samples being skipped, IFF the auditioner's output-port had non-zero latency. Since private port-latencies are usually only set for routes in the route-list, and _remaining_latency_preroll is reset at transport-stop, this *usually* worked... Last but not least, MIDI notes need to be resolved when seeking.
2020-04-23Don't add the Auditioner to the route-listRobin Gareus
This fixes a bug introduce in 2d11667ce3. The Auditoner was accidentally added to the shared_ptr<> referenced RouteList.
2020-04-23Micro optimization: cache output IO latencyRobin Gareus
IO::latency iterates over the port-set retrieving the private_latency_range of each port. Since it can only change when connections and latency changes, we can instead cache the value. This is also in preparation to allow the auditioner to override it.
2020-04-23Fix Auditioner edge-case when synth cannot be loadedRobin Gareus
2020-04-23Remove debug outputRobin Gareus
2020-04-23Fix parsing XML with blanks from memoryRobin Gareus
This is needed when the butler thread loads a plugin with MIDNAM. xmlKeepBlanksDefault() setting is per thread. see also df3a4ed9c61d
2020-04-23Prevent huge stack allocations for MIDNAM filesRobin Gareus
xmlParseMemory() uses a c-pointer char*. Previously MIDNAM data on the heap were wrapped inside a std::string only to be later accessed via c_str().
2020-04-23Consolidate stack-size and priority of rt-threadsRobin Gareus
2020-04-22WebSockets: fix guard header in json.hLuciano Iam
2020-04-22WebSockets: also json-escape strings in state messagesLuciano Iam
2020-04-22WebSockets: also json-escape paths in manifestsLuciano Iam
Extends 3c423d9
2020-04-22WebSockets: add some TO DO commentsLuciano Iam
2020-04-22WebSockets: disable http caching if NDEBUG is setLuciano Iam
This is useful while developing web surface javascript code
2020-04-22WebSockets: fix a comment in server.ccLuciano Iam
2020-04-21fully initialize SMF tempo information to default (4/4, 120bpm)Paul Davis
Leaving CPC and 32nd-per-quarter at -1 causes arithmetic errors later if the SMF file doesn't contain an explicit time signature meta-event
2020-04-22Fix MIDI audition and audition seekingRobin Gareus
DiskReader::seek() no longer fills MIDI buffers. MIDI is now read into memory via DR:overwrite_existing_buffers() There is still some edge-case remaining to be fixed. For some reasons the synth does not receive initial patch/program changes when starting auditioning.
2020-04-22Take lock to add/remove custom MIDNAMsRobin Gareus
update_custom_midnam() is usually called from the GUI or butler thread when a LV2 plugin is instantiated, or the plugin changes its MIDNAM. It must be exclusive with load_midnams_in_thread() and calls from MTAV to ::maybe_use().
2020-04-21WebSockets: let clients know if a strip is a VCALuciano Iam
This allows to hide the panner for example
2020-04-21WebSockets: add checks for VCA stripablesLuciano Iam
Also include VCAs when sending strip descriptions
2020-04-21WebSockets: compatibility fixes for WindowsLuciano Iam
Escape path strings in surfaces.json Default to index.html in mount points
2020-04-21Add Lua Bindings for Internal SendsRobin Gareus