Commit Graph

846 Commits

Author SHA1 Message Date
Ben Loftis c44d692390 Create a trap for overlapping or nested undo commands 2022-05-10 13:14:08 -05:00
Robin Gareus c45a6b80c7
Session support to add/remove save/load IOPlugs 2022-05-09 17:39:05 +02:00
Paul Davis 9c4024ff0c fix creation of TempoCommands for undo/redo history 2022-04-08 11:58:04 -06:00
Paul Davis 7c3268d12f temporal: TempoMap::use() returns a const ptr to enforce semantics (library version)
This commit leaves two issues outstanding:

1. unclear/ugly semantics for drag operations that reset the GUI thread's tempo map to the writable copy
2. undo/redo for the tempo map

These will be addressed in future commits
2022-04-08 11:58:04 -06:00
Paul Davis f8dc6d93ec constification: clean up final warning
This explains why we use const_cast<>. We also fix a logic error that
crept in here, in which a source might have its state saved twice
2022-04-07 15:13:30 -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 bc38f8d424 MidiSource: change thread mutual exclusion object from Mutex to a RWLock
This allows two reader threads to proceed without blocking each other, as can
happen when the butler renders a MIDI track into an RT-safe buffer while the
GUI reads the same MidiModel/Source for visual display.
2022-04-05 20:52:09 -06:00
Robin Gareus d9ec733c47
Dump XML node if loading a source fails
This helps to debug issues, in case this comes up in a session
with many sources.
2022-02-03 21:57:13 +01:00
Paul Davis 4c9460b697 fix incorrect code that passed a null boost::shared_ptr<AudioRegion> into a ::get_state() call 2022-01-20 12:07:59 -07:00
Paul Davis a187b5e1fb triggerbox: reimplement timeline cues without session events 2022-01-06 00:23:27 -07:00
Robin Gareus 60be0c27a1
Use updated temporal API 1/2 2021-12-11 14:42:36 +01:00
Paul Davis 016206e18a Remove all IO code that handled deferred connections
When loading a session, we now just set up port state, which will
populate the Port::_connections member, and then once all ports have
been created, use PortManager::reconnect_ports() to get everything connected.
2021-11-03 15:06:16 -06:00
Paul Davis 4806e10aa1 session: wrap undo history loading in catch/try to avoid throwing errors to glibmm 2021-09-10 12:15:24 -06:00
Paul Davis b6de89d35c post-rebase manual fixups (libs) 2021-08-13 12:51:37 -06:00
Paul Davis af9bc21a07 nutempo warning removal 2021-08-13 12:51:33 -06:00
Paul Davis d1c695a1a6 fix logic for setting state of tempo map from XML
We are using RCU for the tempo map so ... we need to use it
2021-08-13 12:51:32 -06:00
Paul Davis 82e84e6b92 change all Region::nt_*() methods to names without the nt_ prefix (library version) 2021-08-13 12:51:30 -06:00
Paul Davis 8dbbc1df54 library changes to get libtemporal setup at application startup 2021-08-13 12:51:30 -06:00
Paul Davis 79763893b3 remove/hide Session::tempo_map() and use TempoMap::use() instead (thread local shared ptr) 2021-08-13 12:51:30 -06:00
Paul Davis 60d1c5f722 remove tempo map from Session 2021-08-13 12:51:30 -06:00
Paul Davis c434289973 remove lock, _dirty and _generation nonsense from TempoMap (pre-RCU management) 2021-08-13 12:51:30 -06:00
Paul Davis f67029bd02 random commit to facilitate trivial move of work from laptop back to main system 2021-08-13 12:51:29 -06:00
Paul Davis eae9d276fe libardour: conversion to use timeline types (mega-commit) 2021-08-13 12:51:29 -06:00
Paul Davis 43c713d0ef we removed Splice mode from the GUI 7 years ago; now remove all code related to Splice mode 2021-08-13 12:51:27 -06:00
Robin Gareus a5220568af
Ensure each source has a corresponding whole-file region
This fixes loading old sessions that had an empty source-list
(previously the source-list showed sources, not whole-file regions).
2021-07-20 15:35:16 +02:00
Robin Gareus c57c230dfc
Fix loading old session w/missing playlist #8727 2021-05-30 18:54:45 +02:00
Robin Gareus 5957e14259
Remove unused #include<> (2/2)
PBD::stacktrace() is not used nor needed by default.
It should be used sparingly.
2021-05-05 17:57:16 +02: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 4bb3a896b4
Potential fix for lost/empty MIDI files when using snapshots #8552
* Copy flags of referenced file
* Do not share model with copied source!
2021-03-19 20:05:42 +01:00
Robin Gareus 48556cbd3c
Fix session-archive on macOS
By default Apple uses a private TMP folder. While mktemp
returns "/tmp/xxx" the canonical path is "/private/tmp/xxx".
This lead to issues when tmp-prefix is removed when building
the session-archive.

See also e52bdc55ad
2021-03-17 18:05:48 +01:00
Robin Gareus 9fb21a0905
Add API to determine undo status
This is is useful to determine if an undoable action was
performed before adding additional information (e.g. selection
changes) to the undo transaction.
2021-03-10 13:51:35 +01:00
Robin Gareus a9192266d0
Only save engine-hints when ardour started the engine 2021-02-25 17:53:45 +01:00
Robin Gareus 0b00eabb19
Store recently used backend with session
This is in preparation to warn a user in case the session
is loaded with a different device and connections may be lost.
2021-02-23 19:22:22 +01:00
Robin Gareus b7f367ae26
Allow multi-threaded AudioSource reading
This is needed for threaded peak-file creation. The same
nested source may be accessed multiple times concurrently
(in addition to the butler thread reading it).

This fixes Bitrunner's "filum2020" session randomly showing garbage
waveforms.
2020-12-21 21:55:55 +01:00
Robin Gareus c5014d9d9e
Remove unused LV2 ifdef 1/3
LV2 has been mandatory since 6.0 (04ccd328dc)
2020-09-15 17:01:32 +02:00
Robin Gareus ac97e5710a
Fix edge-cases when loading old (v2, v3) sessions
Previously when loading old session Route::init() of the master-bus
was called without the "MasterOut" or "MonitorOut" flag being set.

Various conditions that relied on is_master() or is_monitor()
during initialization failed when loading those sessions, leading
to subtle breakage.
2020-08-10 19:12:32 +02:00
Robin Gareus e9ff843bb1
Implement master/loudness volume processor
This provides for a better user-experience than using a-amp.
Particularly since a-amp only has a 20dB range and can be automated.
2020-07-27 21:56:41 +02:00
Robin Gareus 4dffe6e26e
Make master-output-volume optional 2020-07-21 05:50:30 +02:00
Robin Gareus c778ded411
Auto-connect MIDI track/bus when output ports change
previously this subscription was handle done in
Route::add_routes() -> add_routes_inner() for MIDI tracks only.

Since f6c0b02d9f this was only done when adding
tracks, after any instruments were loaded (and fanned out).
2020-07-19 01:07:57 +02:00
Robin Gareus 9242bc55a5
Do not emit StateSaved signal for backup saves
StateSaved() is mainly used for updating window title and
the snapshot list, unrelated to .pending or backup saves.
2020-07-17 16:55:16 +02:00
Robin Gareus 0b89d69de1
Copy state files for backup, instead of serializing
This should speed up backup saves of large session files.
2020-07-17 15:22:40 +02:00
Robin Gareus 9d390f38bf
Cache MIDI generator port latency
This reduces excessive, expensive calls to get_connected_latency_range()
2020-07-12 01:50:01 +02:00
Robin Gareus ef94663d1c
Overhaul MIDI Clock generator
* Fix absolute time alignment, sync clock ticks on exact beats
* Fix start/cont sync to MIDI Clock **Beats** (MIDI Clock / 6)
* Send timecode from engine (not session) - vari-speed independent
* Special case MClk port, don't /resample/
* Support pre-roll, sync start.
2020-05-31 23:46:28 +02:00
Robin Gareus d3ffc4d90a
Update more messages to prefer "Track/Bus" instead of "Route" 2020-05-24 19:38:04 +02:00
Robin Gareus 8592e96d5c
There is no need to save after region cleanup 2020-05-19 18:09:09 +02:00
Robin Gareus 3a9bf57af9
Don't save the session when creating busses
Most calls to new_audio_route() used save = false, only directly
creating busses saved the session. Probably for historical reasons.
2020-05-19 18:02:23 +02:00
Robin Gareus 749291245c
NO-OP: replace `save_state("")` with `save_state()` 2020-05-19 17:14:47 +02:00
Robin Gareus 7b28aabb43
Change LTC Generator from IO to Port
This is done in order to set the TransportGenerator flag
2020-05-07 20:43:04 +02:00
Robin Gareus a2f07f66a5
Consistent Lua script error and print() output 1/2 2020-04-18 18:16:12 +02:00
Robin Gareus cc74c7b7ad
Fix two more typos 2020-04-17 00:02:38 +02:00