Commit graph

17092 commits

Author SHA1 Message Date
Len Ovens
0130f19e26 Fix positions before start and after end 2021-05-18 14:27:20 -07:00
Robin Gareus
0ee8b1706d
Fix event_inside_widget_window()
This fixes cases where a widget's parent isn't the
top-level window and additional offset has to be taken
into account.

So far this has not been an issue since this method was only
used for floating text entries.
2021-05-18 22:17:36 +02:00
Robin Gareus
8cd8d90483
Reported the jack2 xrun bug, now we stop telling users 2021-05-18 03:17:17 +02:00
Len Ovens
f9557d0d04 Remove unused code 2021-05-17 13:50:18 -07:00
Len Ovens
ab7c6e74e0 OSC, update marks list better. 2021-05-17 13:34:19 -07:00
Tobias Kannenberg
e4a6e981d9 fix OSC "/marker" feedback 2021-05-17 13:31:03 -07:00
Robin Gareus
d2916a1df8
Better version of previous commit 2021-05-17 21:31:53 +02:00
Robin Gareus
9d063943bb
Fix deadlock when changing tempo
since dcc0f1cb17 Playlist::freeze takes a RegionWriteLock,
so freeze() must not be called with a Lock already held.
2021-05-17 21:15:58 +02:00
Robin Gareus
98721b1267
Don't count jack[2] xruns during freewheel export for now
Pending further investigation after the 6.7 release.
2021-05-17 04:44:53 +02:00
Robin Gareus
14961e6bc7
ALSA backend: code cleanup and scoping and indent
This is combination of clang-format and manual edits.
The latter mainly to add braces and reduce scope of variables.
2021-05-16 00:49:06 +02:00
Robin Gareus
6801c2cac2
ALSA: add option to prefer interleaved access 2021-05-15 23:10:14 +02:00
Robin Gareus
e2bac27885
Remove unused API 2021-05-15 23:09:21 +02:00
Robin Gareus
6346b54c13
Tweak Lua API, avoid translated sting as return value 2021-05-15 03:53:40 +02:00
Paul Davis
ac87409122 #ifdef code dependent on libsndfile 1.0.28 2021-05-14 19:03:52 -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
7cf9e3d89d remove Region::add_cue_marker() (force use of Source API instead) 2021-05-14 18:37:50 -06:00
Paul Davis
6dd516bc45 add non-const SourceList accessor to Region 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
2791be7f2a add Region::add_cue_marker() 2021-05-14 18:37:50 -06:00
Paul Davis
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
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
Paul Davis
8fc8cbf4af tentative code to check that we can read cue markers vis libsndfile 2021-05-14 18:37:50 -06:00
Paul Davis
7e7fbf6073 give Regions an access method for Cue Markers 2021-05-14 18:37:50 -06:00
Paul Davis
39b020a3f4 expand CueMarker object to allow sorting etc. 2021-05-14 18:37:50 -06:00
Paul Davis
b3d9c9d655 give Sources a container of CueMarkers (empty by default) 2021-05-14 18:37:50 -06:00
Paul Davis
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
Ben Loftis
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
Robin Gareus
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
Robin Gareus
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
Robin Gareus
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
Robin Gareus
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
Todd Naugle
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
Robin Gareus
a01377f168
Add a Lua binding to determine Ardour version 2021-05-13 02:51:17 +02:00
Robin Gareus
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
Robin Gareus
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
Robin Gareus
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
Paul Davis
0fc50b9bf2 Mackie Control: set select state correctly during initial setup 2021-05-11 15:55:04 -06:00
Robin Gareus
58830d857c
Lua API for sends, sidechains and monitoring 2021-05-11 20:30:53 +02:00
Paul Davis
19c9622a30 NOOP: comment fix, there is no deadlock! 2021-05-11 08:35:14 -06:00
Paul Davis
99022a6157 waveview: add some extensive notes about threading design 2021-05-11 07:57:31 -06:00
Paul Davis
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
Paul Davis
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
Paul Davis
5343d00382 when adding locations with empty names, generate one (related to 1c753a7f38) 2021-05-09 17:52:29 -06:00
Paul Davis
c45be2266e support SMF markers without labels 2021-05-09 17:52:29 -06:00
Robin Gareus
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
Paul Davis
8b1df3e083 fix bad transition problem in transportFSM when slowing to a stop that is then reversed 2021-05-08 17:58:46 -06:00