Commit Graph

122 Commits

Author SHA1 Message Date
Robin Gareus
8489810cfb NO-OP: whitespace 2023-06-10 03:33:51 +02:00
Robin Gareus
ad49de022a Too many drop-references handlers (#9363)
This fixes a random crash with stop-and-forget capture.

When aborting capture, the disk-writer can emit
 midi_write_source->drop_references ()
in the butler thread, which leads to a direct call to
Session::remove_source.

This can happen before or after Region::source_deleted
is called which is initiated from the same signal.

Furthermore it was possible that Region::source deleted
was called concurrently from the UI thread via SourceRemoved
for whole file regions, which lead to memory corruption.
2023-06-09 16:17:37 +02:00
Paul Davis
4ba4cd69ff switch from glib atomic to std::atomic (libs edition) 2023-03-24 14:19:15 -06:00
Paul Davis
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
Robin Gareus
580179272d NO-OP: cleanup duplicate X_ escape 2022-11-27 01:59:01 +01:00
David Robillard
bdacfb8724 Fix invalid use of Doxygen "@param" command
This is never for inline references to parameters, only for starting parameter
documentation blocks.  The "@p" command is for this, although unfortunately
Doxygen doesn't actually do anything with it and it's just an alias for code
text.
2022-10-30 20:44:28 -04:00
Paul Davis
6449bf5464 source: provide a little syntactic sugar via ::time_since_capture_start() 2022-10-28 16:38:46 -06:00
Robin Gareus
839400f438 Fix peak-thread race on session-load
Session dirs must exist when loading Sources of a project.
SourceFactory::init() starts the PeakFileBuilder background thread
early on when libardour is initialized.
This thread [re-]creates missing peak files when Sources are
created or loaded. However AudioSource::prepare_for_peakfile_writes
assumes the peak/ folder exists. This may not be true, which lead to
"AudioSource: cannot open _peakpath [..] (No such file or directory)"
errors.

Also drop creation from Source::get_transients_path() as this
may be called concurrently from Analyser background threads.
2022-08-12 01:36:43 +02:00
Colin Fletcher
cef86efe1b libs/ardour: allow creating region source markers while recording
Add a list of marker locations to the session, for the the UI to add the
current location to when "add-region-cue-marker" happens whilst recording.
On record-stop, create source markers at the locations in that list in all
newly-recorded audio regions.
2022-08-09 14:03:03 -06:00
Paul Davis
7bf89ce109 Constification: make Stateful::get_state() const, with all other required const-ness added (libs) 2022-04-06 21:56:59 -06:00
Paul Davis
c6a31250ba alter Source::_length from timecnt_t to timepos_t
THe length of a Source(File) is always measured from its start. In this sense,
the length is like a position on the timeline, which is a duration with an
implicit origin, or a Region start, also a duration with an implicit origin (in
that case the start of the Source). There is no good reason for using
a timecnt_t for this value, because the position component of a timecnt_t
(the origin for the duration) is implicit and always zero. So we make
this property into a timepos_t, and include a number of asserts() to check
for common possible coding errors related to the time domain
2022-01-28 15:52:27 -07:00
Robin Gareus
4ec70bbaec Source::natural_position API uses samplepos_t 2022-01-19 03:01:09 +01:00
Paul Davis
9ccaab5deb working segment descriptor save/restore/set/fetch and use by triggerbox 2022-01-14 12:22:34 -07:00
Paul Davis
c159614902 restore source segment descriptors 2022-01-13 17:41:15 -07:00
Paul Davis
680a27c29d store source segment descriptors 2022-01-13 17:29:33 -07:00
Paul Davis
cf10808640 change Source segment descriptor API (and triggerbox use of it) 2022-01-13 16:00:03 -07:00
Paul Davis
1994935550 source HAS-SOME SegmentDescriptors 2022-01-13 15:07:21 -07:00
Paul Davis
c8dc300fe7 fix missing method return type (post rebase conflict resolution) 2021-08-13 12:51:36 -06:00
Paul Davis
5bb1c01482 fix timeline types (post-rebase conflict resolution) 2021-08-13 12:51:36 -06:00
Paul Davis
0d15797499 small cleanup to Source length API 2021-08-13 12:51:31 -06:00
Paul Davis
65aa619e58 changes required by fixing ambiguities in timepos_t/timecnt_t API (libs edition) 2021-08-13 12:51:31 -06:00
Paul Davis
eae9d276fe libardour: conversion to use timeline types (mega-commit) 2021-08-13 12:51:29 -06:00
Paul Davis
3e56eedf11 libardour: add X_() macros around several Source XMLNode state property names 2021-05-27 17:17:40 -06:00
Paul Davis
d4bc60a388 libardour: infrastructure for cue-marker-only source undo/redo 2021-05-27 17:17:40 -06:00
Paul Davis
ca44f54ed6 libardour: small changes to cue marker API to return bool from Source modification methods 2021-05-27 17:17:40 -06:00
Paul Davis
3a1cfc837e libardour: API infrastructure for renaming cue markers 2021-05-24 20:23:06 -06:00
Paul Davis
c2a012545b API infrastructure for dragging region/cue markers 2021-05-24 12:26:21 -06:00
Paul Davis
17dbdffc45 infrastructure APIs for region/cue marker removal and clear 2021-05-18 20:59:37 -06:00
Paul Davis
d1ee033dd2 change XML node names for cue markers to be capitalized 2021-05-14 18:37:50 -06:00
Paul Davis
e3b1566534 add serialization for source cue markers 2021-05-14 18:37:50 -06:00
Paul Davis
bfd00f7a52 add Source::clear_cue_markers() 2021-05-14 18:37:50 -06:00
Paul Davis
689306e2bf add Source::CueMarkersChanged signal, and ::remove_cue_marker() 2021-05-14 18:37:50 -06:00
Paul Davis
7c9f8fcbf2 remove unused Source::SourcePropertyChanged signal 2021-05-14 18:37:50 -06:00
Robin Gareus
cc7b8b1bc5 gcc-11 compat, volatile atomic variables (1/2)
"While 'atomic' has a volatile qualifier, this is a historical
artifact and the pointer passed to it should not be volatile."

Furthermore "It is very important that all accesses to a
particular integer or pointer be performed using only this API"
(from https://developer.gnome.org/glib/2.68/glib-Atomic-Operations.html)

Hence initialization of atomic variables is changed to also use
this API, instead of directly initializing the value.

This also fixes a few cases where atomic variables were
accessed directly.

see also libs/pbd/pbd/g_atomic_compat.h
2021-03-22 15:30:07 +01:00
Robin Gareus
8486a938ed Keep track of xruns per source when recording 2021-02-14 16:22:29 +01:00
Paul Davis
1783305077 provide mechanism to report on destructive tracks presence in a session 2020-03-17 16:31:50 -06:00
Paul Davis
a30ee6950d restore being able to load a 5.12 session with a destructive track.
Not all is working right yet, however
2020-03-17 16:31:49 -06:00
Paul Davis
a4d7b45fe0 remove destructive/tape mode tracks 2020-03-17 16:31:49 -06:00
Paul Davis
0098072904 NOOP: reindent 2020-01-08 22:21:21 -07:00
Paul Davis
468731c14b goodbye Profile->...trx 2019-09-25 13:02:31 -06:00
Robin Gareus
a22f918d9d Update libardour GPL boilerplate and (C) from git log 2019-08-03 15:53:16 +02:00
Ben Loftis
edde5d64a2 (Source List) Clean up the natural_position implementation (libardour part). 2019-08-01 12:11:31 -05:00
Ben Loftis
ca3c191d7c (Source List) Source property signals (libardour part) 2019-08-01 12:11:31 -05:00
Ben Loftis
949450bbb5 (Source List) Take-ID: new (working) implementation. 2019-08-01 12:11:31 -05:00
Paul Davis
30b087ab3d globally change all use of "frame" to refer to audio into "sample".
Generated by tools/f2s. Some hand-editing will be required in a few places to fix up comments related to timecode
and video in order to keep the legible
2017-09-18 12:39:17 -04:00
Tim Mayberry
12ffebab05 Use XMLNode::get/set_property API in ARDOUR::Source class 2017-04-19 09:36:53 +10:00
Tim Mayberry
334ec95e43 Use ID::to_s() in libardour instead of ID::print() 2017-04-19 07:49:58 +10:00
Paul Davis
cf52d6e4b4 enough with umpteen "i18n.h" files. Consolidate on pbd/i18n.h 2016-07-14 14:45:23 -04:00
Paul Davis
17ace643e4 OMNIBUS COMMIT: prefer const XMLNode::property method (and provide a real one) 2016-05-04 23:09:45 -04:00
Paul Davis
f806f059b3 rename Plugin::ParameterChanged to ParameterChangedExternally to reflect its intent, and clean up the libardour side of result.
The signal exists to notify listeners that something outside of the host's control (e.g. a plugin's own GUI for AU or VST)
has modified a plugin parameter. Previous code had strange feedback loops and ambiguous semantics.
2015-10-20 10:23:49 -04:00