Commit graph

20962 commits

Author SHA1 Message Date
Paul Davis
d761ccb59b temporal: the second variant of shift() (untested) 2023-06-07 11:25:44 -06:00
Paul Davis
e6b6340f3e temporal: more nuances for shift() 2023-06-07 11:25:44 -06:00
Paul Davis
ad45778edc temporal: shift() with BBT must allow negative motion 2023-06-07 11:25:44 -06:00
Paul Davis
a456a10cdf temporal: first guess at a TempoMap::shift() implementation 2023-06-07 11:25:44 -06:00
Robin Gareus
5e9d98dbf9
Debug Port reconnect 2023-06-07 18:13:27 +02:00
Robin Gareus
d2365daafe
Remove unused API, prefer Session::possible_states 2023-06-07 17:39:29 +02:00
Paul Davis
9d3ae4fc8d temporal: fix position of end guard points during map paste 2023-06-06 09:52:29 -06:00
Paul Davis
9e4b1d59a7 temporal: do something when pasting the cut buffer guard points
Don't think this is quite right yet - we get guard points even when
they are not really necessary
2023-06-06 09:04:34 -06:00
Robin Gareus
6865615af8
Fix recursive lock introduced in fbfeff4168 (#9359) 2023-06-06 15:39:54 +02:00
Robin Gareus
4529a17617
Implement Section Delete/Insert 2023-06-06 02:42:43 +02:00
Paul Davis
f5f87f86d4 temporal: adjust cut buffer API to better deal with start/end "guard points" 2023-06-05 17:27:12 -06:00
Paul Davis
7789df5b1c temporal: get cut/copy/paste test code slightly more useful 2023-06-05 16:35:17 -06:00
Robin Gareus
522c8f9426
Improve port-engine debug messages
try to get to the bottom of "unregister_port: Failed to find port"
errors.
2023-06-05 19:10:10 +02:00
Robin Gareus
e938d4936f
Further speed up Windows freewheel export 2023-06-05 01:42:24 +02:00
Robin Gareus
c24b456211
Windows: unconditionally request high timer resolution
Previously timeBeginPeriod() was only called when MIDI
system was set to WinMME. It was also possible that
it was never unset in case starting the engine failed.

This significantly speeds up freewheel export which uses
Glib::usleep(100) when MIDI is disabled.

see also: https://randomascii.wordpress.com/2020/10/04/windows-timer-resolution-the-great-rule-change/
2023-06-05 00:02:54 +02:00
Robin Gareus
fbfeff4168
Work around finish_capture() race
In rare cases DiskWriter::run() may call finish_capture()
concurrently with the butler thread from transport_stopped_wallclock,
this can lead to memory corruption (CaptureInfo).

Using a Mutex here is not great, but it is not usually contended
and better than crashing at rec-stop.

We should probably change DiskWrWiter::_was_recording into an
atomic bool, and use CAS to prevent concurrent calls.
2023-06-04 22:19:53 +02:00
Robin Gareus
ad5d355fb5
Fix remove_source assert()
With empty MIDI regions it can happen that the GUI
still retains a reference (rec_regions)
2023-06-04 21:26:41 +02:00
Robin Gareus
7e567468b2
Fix crash when resetting MIDI tracer
The GUI was able to free memory (MidiTracer::disconnect),
while the tracer is concurrently still in use in rt-context.
This lead to memory corruption in MIDI::Parser::scanner.
2023-06-04 01:15:11 +02:00
Robin Gareus
dad725688d
Fix various MMC commands, set request-source 2023-06-04 01:15:02 +02:00
Robin Gareus
8bf8e67545
midiUI thread needs tempo-map (#9358)
This fixes handling MMC commands (locate, record) or
any async MIDI message that uses timepos_t/timecnt_t.
2023-06-03 19:10:36 +02:00
Robin Gareus
0006f4d8cd
Dummy: add MMC test sequence 2023-06-03 19:10:32 +02:00
Robin Gareus
c56313cea0
Fix setting pretty-names when engine is restarted
port-meta-data depends on the audioengine backend/device
settings. Those are only available after the engine is started,
not from within the backend's _start() method.

This is is only relevant for callback based backends.

Backends with a blocking process thread explicitly emit
port-manager callbacks there before entering the main loop.
2023-06-02 00:29:03 +02:00
Ben Loftis
6640a4afb3 fix Faderport2 port name = FP2 2023-06-01 16:20:48 -05:00
Robin Gareus
c084f74fda
Remove debug message 2023-05-31 18:17:28 +02:00
Robin Gareus
193b35e885
Ignore Apple/HFS+ ._ meta-data files with statefile suffix.
Those files may otherwise show up in the Recent Session
dialog as possible states to load.
2023-05-31 16:02:39 +02:00
Robin Gareus
f3ee7fdf88
Fix crash when trying to undo region operations across source deletion
Record, move recorded region(s), delete the recorded source, undo.

Undo would undo the region-move, of a region that no longer
exists and has no source.
2023-05-31 15:46:59 +02:00
Robin Gareus
f58f5bef55
Remove region from playlist when the source is destroyed
This fixes the following issue:
1. Import a file to a new track
2. Delete the track
3. Editor Source list: select imported file,
   -> Remove the selected source
   -> Yes, remove the Regions and Sources

The Track and Region no longer exist in the Editor,
only the playlist still exists!

The sources to be deleted are found when iterating over whole-file
regions in `EditorSources::remove_selected_sources`. Also
RegionFactory::get_regions_using_source correctly returns
regions, _editor->remove_regions does nothing since there
is no RegionView for the given region(s). This then cashes in

```
libs/ardour/playlist.cc:2400: virtual XMLNode& ARDOUR::Playlist::state(bool) const: Assertion `r->sources ().size () > 0 && r->master_sources ().size () > 0' failed.
```
2023-05-31 15:39:00 +02:00
Robin Gareus
5a0531df01
Sync all_regions after region removal
The eventual goal is to keep the set of used regions
in sync, and allow to remove explicit calls to
`sync_all_regions_with_regions`.

This prevents `all_regions` to retain a reference to
a region that has been destroyed.
2023-05-31 01:20:29 +02:00
Robin Gareus
bfed3f5d42
NO-OP: white-space 2023-05-31 01:16:15 +02:00
Robin Gareus
f07361b34e
Session::add_source cannot fail 2023-05-31 01:15:28 +02:00
Robin Gareus
d7f631757a
Tweak Source removal
* Do not emit signal with source-lock mutex held
* explicitly drop references when called directly; notably from
  EditorSources::remove_selected_sources
2023-05-31 01:14:53 +02:00
Robin Gareus
331efe835f
Debug region/source removal 2023-05-30 18:19:48 +02:00
Robin Gareus
39ac0c5e19
Remove unused Region::remove_dependents API 2023-05-28 01:52:42 +02:00
Robin Gareus
58b98e8c5c
Prompter: add a reset to default option 2023-05-27 15:15:42 +02:00
Robin Gareus
10b2380b14
Fix deadlock/race introduced in aaf301321
Port::_connections_lock must not be locked when calling
port_engine.connect().
2023-05-27 14:18:31 +02:00
Robin Gareus
abd27b765e
Remove some unused variables 2023-05-27 14:14:01 +02:00
Robin Gareus
b6428b421f
Fix Region Export alignment
Session::start_audio_export correctly sets preroll offset
depending on export-mode. A later locate must not change it.
2023-05-27 02:21:40 +02:00
Robin Gareus
d5cc5b0586
Auto-connect master/monitor when switching backends 2023-05-27 00:08:48 +02:00
Robin Gareus
aaf3013211
Save I/O connections per device (#9344) 2023-05-27 00:08:25 +02:00
Robin Gareus
c11f8532ca
Add API to query backend/driver/device ID 2023-05-26 23:02:06 +02:00
Robin Gareus
42caef16bc
Delay MIDI-bypass for latent plugins 2023-05-26 19:17:56 +02:00
Robin Gareus
4c4138ff37
Optimize delaylines and implement multiple-MIDI buffers 2023-05-26 19:17:53 +02:00
Robin Gareus
28785e4fc0
Fix delayline x-fade with buffers <= 64fpp
Previously increasing the delay-time by more than FADE_LEN
while buffersize was < FADE_LEN/2 could result in garbage being
added to the buffer.
2023-05-26 19:17:46 +02:00
Robin Gareus
84e38b4c65
Fix PF16 auto-connect 2023-05-24 23:01:34 +02:00
Robin Gareus
11157d9bd9
Fix some Wunused-variable 2023-05-22 21:26:26 +02:00
Robin Gareus
d85277f532
NO-OP: clang-format, whitespace 2023-05-22 21:07:36 +02:00
Ben Loftis
c452a4816c tempo mapping: Re-implement tempo-twist with constant and ramped varieties (lib part) 2023-05-22 13:32:53 -05:00
Robin Gareus
f1f352a6e9
Fix shaped dither (#9342) 2023-05-22 04:50:19 +02:00
Robin Gareus
e9dc1335f9
NO-OP: clang-format 2023-05-22 04:50:13 +02:00
Robin Gareus
dd9f9ef19d
When synced to engine vari-speed is not possible 2023-05-19 23:28:32 +02:00