13
0
Commit Graph

17078 Commits

Author SHA1 Message Date
d1ee033dd2 change XML node names for cue markers to be capitalized 2021-05-14 18:37:50 -06:00
7cf9e3d89d remove Region::add_cue_marker() (force use of Source API instead) 2021-05-14 18:37:50 -06:00
6dd516bc45 add non-const SourceList accessor to Region 2021-05-14 18:37:50 -06:00
e3b1566534 add serialization for source cue markers 2021-05-14 18:37:50 -06:00
2791be7f2a add Region::add_cue_marker() 2021-05-14 18:37:50 -06:00
0f406f40f7 region markers: change container type that holds Source::_cue_markers from vector to set, to avoid duplicates 2021-05-14 18:37:50 -06:00
bfd00f7a52 add Source::clear_cue_markers() 2021-05-14 18:37:50 -06:00
689306e2bf add Source::CueMarkersChanged signal, and ::remove_cue_marker() 2021-05-14 18:37:50 -06:00
7c9f8fcbf2 remove unused Source::SourcePropertyChanged signal 2021-05-14 18:37:50 -06:00
8fc8cbf4af tentative code to check that we can read cue markers vis libsndfile 2021-05-14 18:37:50 -06:00
7e7fbf6073 give Regions an access method for Cue Markers 2021-05-14 18:37:50 -06:00
39b020a3f4 expand CueMarker object to allow sorting etc. 2021-05-14 18:37:50 -06:00
b3d9c9d655 give Sources a container of CueMarkers (empty by default) 2021-05-14 18:37:50 -06:00
6f91e1e641 add CueMarker type
Might split this into a separate header if things become more complex than currently imagined
2021-05-14 18:37:50 -06:00
13c819e02b Plugin Tags: Add a Lua-accessible function to write untagged plugins to a file so we can bulk-tag them.
print(ARDOUR.LuaAPI.dump_untagged_plugins())
 ...will write untagged plugins to a file, and report the resulting file path to the user
2021-05-14 15:08:44 -05:00
28619fe71b
Fix window process thread priorities
While POSIX defines a single contiguous range of numbers that
determine a thread's priority. Win32 defines priority classes
and priority levels relative to these classes.

pthread maps those to -15 .. +15 with the top six ones
corresponding to REALTIME_PRIORITY_CLASS and max being
THREAD_PRIORITY_TIME_CRITICAL

Note that the PA backend can USE_MMCSS_THREAD_PRIORITIES
and PBD::MMCSS::set_thread_characteristics() directly for
the I/O threads.
2021-05-14 01:59:20 +02:00
4d269729b1
Fix missing entries in region-list #8701
RegionFactory::CheckNewRegion signal is emitted directly
after region-creation from RegionFactory::create().
At this point in time the region is not on any playlist.

This if fine for EditorSources, but the new RegionList design
only shows regions that are on the timeline.

CheckNewRegion() -> EditorRegions::add_region()
-> EditorRegions::regions_changed() ignores regions w/o playlist.

Later Playlist::add_region_internal() sets the playlist but
calls Region::clear_changes() to not send all individual changes.
So Region::RegionsPropertyChanged is not emitted either.

We need to notify the EditorRegions *after* setting the playlist.
The downside of this is that more signals than necessary are
emitted.
2021-05-14 00:27:13 +02:00
f11fadcc94
NO-OP: fix some comments that used <tab>
See also 19a2d384fc ASCII art must not mix tab and space.
2021-05-13 23:33:30 +02:00
b745483e1b
Fix double region freeze, stuck changes #8701
Thawlist::add() calls suspend_property_changes () already.
This has lead to the region remaining on frozen state.
2021-05-13 23:23:47 +02:00
3a3fcd0d2d Don't crash if master fader is not avaliable.
If the wrong device profile is selected (ex Xtouch One) but another device
is connected (Xtouch), it is possible to have a master fader on the
device, but not in the code. This would then cause a crash when the
master fader was touched.

This just protects from a wrong configuration.
2021-05-13 12:08:09 -05:00
Edgar Aichinger
ffcf90eacb update german translation 2021-05-13 11:02:23 -06:00
a01377f168
Add a Lua binding to determine Ardour version 2021-05-13 02:51:17 +02:00
8642f5476d
Ensure that immediate events are not accidentally replaced
All Immediate events have the same action samples, while other
parameters differ. Those events must not be removed by a
call to _remove_event(), particularly not SessionEvent::Overwrite
2021-05-12 19:24:04 +02:00
dcc0f1cb17
Fix playlist edit after edit race
After an edit option the playlist is thawed and triggers
the butler thread (SessionEvent::Overwrite) to re-read the
playlist.

If another edit operation is started the butler may reads a
region using the region's new position, but the playlist's
old range.

See also 4db1c02bd1
2021-05-12 19:24:00 +02:00
bdaca1d783
Skip redundant disk buffer changes
This speeds up initial session loading or sessions with many regions.
2021-05-12 19:10:10 +02:00
0fc50b9bf2 Mackie Control: set select state correctly during initial setup 2021-05-11 15:55:04 -06:00
58830d857c
Lua API for sends, sidechains and monitoring 2021-05-11 20:30:53 +02:00
19c9622a30 NOOP: comment fix, there is no deadlock! 2021-05-11 08:35:14 -06:00
99022a6157 waveview: add some extensive notes about threading design 2021-05-11 07:57:31 -06:00
1a9df476c2 waveview: now that _quit is protected by a mutex, it doesn't need to be atomic
No reason to have two memory fences when we only need one
2021-05-11 07:57:31 -06:00
John Emmas
952416c596 Accommodate some changes to 'ssize_t' in VS2019
In more recent versions of MSVC, ssize_t equates to 'long' (for a 32-bit build) or '__int64' (for 64-bit)
2021-05-11 14:06:25 +01:00
166ac63924 waveview: redesign thread exit strategy
The previous design had a race condition. When WaveViewThreads::stop_threads() was called, it would
first acquire the mutex, then set _quit, then call condition.broadcast(). But worker threads would
check _quit without holding the mutex. It was therefore for a thread to be delayed in its
own lock acquisition by the ::stop_threads() caller, then end up back in cond.wait() AFTER
the cond.broadcast() was done. Such a thread would sleep forever and never wake up.

This new design removes WaveViewDrawRequestQueue, which was a clean encapsulation of the
queueing aspects of WaveViewThreads, but unfortunately made correct mutex acquisition
and condition signalling/waiting needlessly complex. THe mutex, condition variable
and actual queue were moved into WaveViewThreads, and all worker threads execute a method
of the class which gives the appropriate code easy access to the mutex and condition var,
which must always be used together.
2021-05-10 21:41:26 -06:00
5343d00382 when adding locations with empty names, generate one (related to 1c753a7f38) 2021-05-09 17:52:29 -06:00
c45be2266e support SMF markers without labels 2021-05-09 17:52:29 -06:00
292547b264
Use RWLock for Locations
This replaces a Mutex and adds additional read-locks.

This is needed to address some threading issues with rt-threads
calling auto_loop_location() while the GUI changes locations.

Since locations are C-pointers this is still not entirely safe!
Locations::remove() may delete a location while a pointer
to it is being used in another thread.
2021-05-09 03:20:14 +02:00
8b1df3e083 fix bad transition problem in transportFSM when slowing to a stop that is then reversed 2021-05-08 17:58:46 -06:00
66bc15f8c5 add stderr output for TransportFSM bad transitions, and remove stacktrace 2021-05-08 17:58:46 -06:00
ad14077587 rearrange transportFSM code to be more explicit about a speed-reset-after-stop 2021-05-08 17:58:46 -06:00
e588fe2057 avoid crash when stopping with "abort" set to true, but after _last_roll_location was reset to -1 2021-05-08 17:58:46 -06:00
8803b55f45
Remove invalid assertion
There are some valid cases to call no-roll with non-zero
transport speed. e.g. export pre_roll/fail_roll when
exporting multiple timespans.
2021-05-08 23:46:10 +02:00
79bf025862
Fix export race condition (and crash)
Previously the freewheel export thread directly called
Session::butler_transport_work(). The butler thread
may concurrently call the same function. This can lead
double free or memory corruption (see below)

Now export thread summons the butler and does nothing
until it completed its work.

```
Export Thread:
3   XMLNode::~XMLNode
4   ARDOUR::AutomationList::snapshot_history
5   ARDOUR::AutomationList::start_write_pass
6   ARDOUR::Automatable::non_realtime_locate
7   ARDOUR::Route::non_realtime_locate
8   ARDOUR::Session::non_realtime_locate
9   ARDOUR::Session::butler_transport_work
10  ARDOUR::Session::process_export_fw

Butler thread:
7   XMLNode::~XMLNode
8   ARDOUR::AutomationList::snapshot_history
9   ARDOUR::AutomationList::start_write_pass
10  ARDOUR::Automatable::non_realtime_locate
11  ARDOUR::Route::non_realtime_locate
12  ARDOUR::Session::non_realtime_locate
13  ARDOUR::Session::butler_transport_work
14  ARDOUR::Butler::thread_work
15  ARDOUR::Butler::_thread_work
```
2021-05-08 23:29:49 +02:00
57b3df8b22 copy over (boo!) transport control changes to BasicUI (control surfaces) 2021-05-08 09:20:21 -06:00
d88e0c6673
Fix windows builds (declare class binding)
see also 2ff8f5a5de
2021-05-08 14:38:43 +02:00
08092d22b4
Prevent invalid frame/child size allocation 2021-05-08 14:36:43 +02:00
4d815554dd Various Control Surfaces: Fix one off in calculation of fader position
MIDI pitch bend holds 14 bits (16384) which gives values of 0 to 16383.
2021-05-07 18:02:44 -05:00
f6c011cb65
Remove old RegionPropertyChanged signal (3/3) 2021-05-07 23:29:25 +02:00
2ff8f5a5de
Consolidate RegionsPropertyChanged signal emission (1/3)
This prepares to combine multiple RegionPropertyChanged signals
(potentially thousands) into a single signal.
2021-05-07 23:29:25 +02:00
f689e9ecab Evoral: add methods to SMF to load and access markers/cues in SMF files 2021-05-07 14:58:16 -06:00
49e1380417
Add missing Lua binding (see also 48e5607f7c) 2021-05-07 21:56:09 +02:00
d2ba90b2c1 Fallback to the default export path when the saved export path is not found.
Previously we would end up with an export path of top level session
directory.
2021-05-07 12:25:42 -05:00