Commit Graph

907 Commits

Author SHA1 Message Date
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
Johannes Mueller 687b3078c3 Don't issue VersionMismatch when creating a new session
When we create a new session and are using a template from an old version of
Ardour, we should not issue the VersionMismatch dialog and not make a copy of
the session file for the old version.

We need to extend the signature of Session::load_state() to tell it if we are
creating a session from a template. Session::_is_new cannot be used for it
because it has a the semantics if to auto connect the the master bus.
2020-04-02 14:33:21 +02:00
Paul Davis 1157c7d457 if user chooses not to delete a scratch session, removed the file that identifies it as unnamed
This way they will not be asked again if they reload and then quit the session
2020-03-25 10:24:47 -06:00
Paul Davis 5f1d802307 when saving an unnamed session, rename it
Note that this is done at the GUI level, might need to double check if there are
other paths into a "save" that should be covered. Control surfaces use the action, but
Lua comes to mind
2020-03-24 14:10:39 -06:00
Paul Davis e9be6c23a8 a better approach to the name of the "unnamed" indicator file; remove file after successful save 2020-03-24 14:10:39 -06:00
Paul Davis 5766989319 introduce the idea of an "unnamed" session 2020-03-24 14:10:39 -06:00
Robin Gareus bf894d80fb
NO-OP: remove unused #includes 2020-03-21 19:46:38 +01:00
Paul Davis a4d7b45fe0 remove destructive/tape mode tracks 2020-03-17 16:31:49 -06:00
Robin Gareus dbd4b9d07d
Fix cleanup report #7891
Direct call to Session::cleanup_sources() from ARDOUR_UI::cleanup()
didn't zero initialize size. This centralizes initialization,
so cleanup_trash_sources() does not need to explicitly clear it.
2020-03-15 20:31:57 +01:00
Robin Gareus f941b3fadd
Add/use default argument for track creation 2020-03-15 14:03:24 +01:00
Robin Gareus 7f862298cf
Fix loading playlists of old sessions
Previously when loading Ardour v2, v3-5 sessions, tracks were
created with a dummy name "toBeResetFroXML".

In v6, Track::init() creates a playlist when the track name is
not empty. Later Track::set_state() calls set_name(). When a
playlist exists, the playlist's name is set to match the track's name.

When loading v6 sessions none of this happens. A previously loaded
playlist will be assigned by ID.

Older versions identified Playlists by name and by the time the
playlist is assigned, there may be ambiguities. With the default
(track-name = playlist-name) two playlists with the same name exist:

 (1) the playlist loaded from the session file
 (2) the playlist created by Track::init()

Playlists are stored in an ordered std::set<shared_ptr<Playlist>>,
and name-lookup iterates over the set.

When loading an old session after starting Ardour, it is very
likely to always lookup the playlist (1), because new, later
allocations from (2) are on top of the heap and ordered last.

The session seemingly loads correctly, except for lingering,
unused empty playlists "toBeResetFroXML" renamed to "Track name"
that were never deleted.

However when loading an old session from a running instance,
ordering is mostly random, and many tracks end up with using
the empty playlist (2) instead of the correct playlist (1).
2020-03-15 13:34:13 +01:00
Robin Gareus a485195453
Ensure that regions have sources when saving
Otherwise this will lead to a corrupt state:
  ERROR: Session: XMLNode describing a AudioRegion references an unknown source id
  ERROR: Session: cannot create Region from XML description. Can not load state for region
  ERROR: Playlist: cannot create region from XML
and a track without playlist is created, resulting in a later crash.

Eventually SessionPlaylists::load() needs to handle this gracefully,
but this should help catch cases causing the actual issue.
2020-02-28 06:35:33 +01:00
Robin Gareus bc2cbfc7ec
Prevent concurrent loop and punch recording (backend)
This also prevents switching between punch-in/out record
and looping without transport-stop.
2020-02-27 02:36:16 +01:00
Robin Gareus 53a6b3e28d
Fix cleanup, lock source-list, emit SourceRemoved
This fixes various cases where SessionHandleRef shared_ptr<>
were kept when sources were removed.
2020-02-25 16:17:00 +01:00
Robin Gareus 28c141d450
Remove history file when it's empty
Various operations clear the history (e.g. cleanup). In that
case the GUI correctly had an empty Undo/Redo history, but the
file on disk was left in place.

Next session load restored the old, incorrect Undo/Redo history.
2020-02-25 16:17:00 +01:00
Robin Gareus 8e1a2d7caa
Prefer const iterators 2020-02-25 16:16:59 +01:00
Robin Gareus 021ff2044a
Zero x-run count after session-load and engine restart 2020-02-24 22:21:18 +01:00
Robin Gareus f16d97a013
Consolidate startup `state = Clean;` calls
This also emits DirtyChanged() only if needed.
2020-02-24 22:16:56 +01:00
Robin Gareus 1341e18cac
Fix potential deadlock (session-template with latent procs) 2020-02-14 18:42:45 +01:00
Robin Gareus d887f5965a
Fix assert() when removing track(s)
ARDOUR::Session::remove_routes() explicitly calls
save_state (_current_snapshot_name)

Update assert() to treat an empty name
equivalently as explicitly specified _current_snapshot_name
2020-01-30 21:08:02 +01:00
Robin Gareus 6069c870f8
Fix recursive locks during undo/redo due to state save
undo may restore locations, which may trigger a state-save.
This can result in a deadlock:

Location::set_state () -> Locations::get_state()
both acquire a the same lock:

#2  0x000055a8421836d0 in Glib::Threads::Mutex::Lock::Lock(Glib::Threads::Mutex&) (this=0x7ffe38dcad40, mutex=...) at /usr/include/glibmm-2.4/glibmm/threads.h:687
#3  0x00007fc637731e9c in ARDOUR::Locations::get_state() (this=0x55a8466d4740) at ../libs/ardour/location.cc:1075
#4  0x00007fc637bf14b7 in ARDOUR::Session::state(bool, ARDOUR::Session::snapshot_t, bool)
   (this=0x55a846d0f050, save_template=false, snapshot_type=ARDOUR::Session::NormalSave, only_used_assets=false) at ../libs/ardour/session_state.cc:1406
#5  0x00007fc637bed2c8 in ARDOUR::Session::save_state(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, bool, bool, bool, bool, bool)
   (this=0x55a846d0f050, snapshot_name="", pending=true, switch_to_snapshot=false, template_only=false, for_archive=false, only_used_assets=false) at ../libs/ardour/session_state.cc:815
#6  0x00007fc637b4d967 in ARDOUR::Session::auto_punch_start_changed(ARDOUR::Location*) (this=0x55a846d0f050, location=0x55a848fe11d0) at ../libs/ardour/session.cc:1395
#7  0x00007fc637b4da21 in ARDOUR::Session::auto_punch_end_changed(ARDOUR::Location*)
   (this=0x7fc637b4da21 <ARDOUR::Session::auto_punch_end_changed(ARDOUR::Location*)+67>, location=0x7ffe38dcbf10) at ../libs/ardour/session.cc:1403
[..]
#14 0x00007fc637730a2a in ARDOUR::Location::set_state(XMLNode const&, int) (this=0x55a848fe11d0, node=..., version=6000) at ../libs/ardour/location.cc:715
#15 0x00007fc637732428 in ARDOUR::Locations::set_state(XMLNode const&, int) (this=0x55a8466d4740, node=..., version=6000) at ../libs/ardour/location.cc:1130
#16 0x000055a842388dd7 in MementoCommand<ARDOUR::Locations>::undo() (this=0x55a84d1e5f10) at ../libs/pbd/pbd/memento_command.h:141
#17 0x00007fc635b50707 in UndoTransaction::undo() (this=0x55a84d513b80) at ../libs/pbd/undo.cc:128
#18 0x00007fc635b50e1c in UndoHistory::undo(unsigned int) (this=0x55a846d11338, n=0) at ../libs/pbd/undo.cc:267
#19 0x00007fc637c0dfff in ARDOUR::Session::undo(unsigned int) (this=0x55a846d0f050, n=1) at ../libs/ardour/session_state.cc:5577
2020-01-30 04:16:19 +01:00
Robin Gareus 0d127813fb
Allow StateProtector to save pending files
This is in preparation for saving state while the session is
record-arm'ed. Most notably config changes and undo/redo.

In case both normal and pending save happens, pending must be
last and is required to recover from crashes during recording.
2020-01-30 04:12:19 +01:00
Robin Gareus 998fadda57
Add some sanity checks for Session::save parameters 2020-01-30 04:09:48 +01:00
Paul Davis ad82b443f4 fix API and use of Session::force_locate()
Because of the addition of LocateTransportDisposition, this call was unconditionally forcing a roll during startup
2020-01-20 11:07:27 -07:00
Robin Gareus 00150e105c
Fix AFL position
* update AFL position when preference changes
* "after post-fader processors (before pan)" is before
  the main-out (not at the end).
* Fix "immediately post-fader":
  The amp, when added was the last element. ++after_end then
  made the iterator point to .end()

This likely worked in the past when the monitor send was added
immediately after adding the fader/amp before any other processors.
2020-01-11 17:48:42 +01:00
Paul Davis d17a89c9a7 move MidiPatchManager initialization into ARDOUR "global" scope, rather than per session 2020-01-05 18:34:40 -07:00
Paul Davis 63ba8da3e1 basics of threaded MIDNAM loading 2019-12-23 10:27:00 -07:00
Robin Gareus c49c17ffff
Cont'd work on Playlists import from old 2.x sessions
v2.0.0 sessions don't save empty playlists. So missing playlists
for a give diskstream are fine. Just use a default empty one.
2019-12-17 22:56:12 +01:00
Robin Gareus 848831d844
Convert Disksteam & Playlists from old 2.x sessions 2019-12-17 00:42:28 +01:00
Paul Davis cd78a168b2 reinstate missing latency initialization code
Removed (mistakenly) during work on transportFSM
2019-12-16 16:13:39 -07:00
Robin Gareus 415d3191de
Parse v2 session-information 2019-12-16 23:37:57 +01:00
Paul Davis f561cc6dc2 remove debug output 2019-11-23 15:54:21 -07:00
Paul Davis d04c9b3244 more tweaks to correctly (or more correctly) reload disk reader buffers when loop fade choice changes 2019-11-23 00:09:46 -07:00
Robin Gareus d4ecfc7d85
Use new boost::optional API
get_value_or() has been deprecated since boost 1.56
2019-11-21 17:48:56 +01:00
Paul Davis 098bce1ece improve initial coordinate with JACK transport state 2019-11-15 16:06:04 -07:00
Paul Davis a855119bdd rename all Evoral source from .(hpp|cpp)$ to .(h|cc) 2019-11-02 16:32:18 -06:00
Paul Davis 594f344cca fix thinko 2019-10-28 17:34:23 -06:00
Paul Davis 7d3c2a4fee provide a mechanism to decide if Session::update_latency_compensation() is being called as part of a callback from the backend.
If it is, do not call AudioEngine::update_latencies() to avoid JACK1-style deadlock
2019-10-28 17:23:54 -06:00
Robin Gareus c398576e4a
Fix latency compensation race-condition
Remove need for explicit `initialize_latencies` call that used
to be called from GUI-thread post_engine_init(), as well as
Session::engine_running().

Further reduce calls, `graph_reordered` implies a latency-update
and fix ordering issue. update_latency_compensation() must be called
*after* resort_routes().
2019-10-26 01:06:04 +02:00
Paul Davis af82a06517 make BusProfile argument to new Session constructor be const (and in associated call tree) 2019-10-10 16:52:00 -06:00
Paul Davis 468731c14b goodbye Profile->...trx 2019-09-25 13:02:31 -06:00
Paul Davis 401ace0c67 don't bother following playhead priority during session loading 2019-09-18 10:08:42 -06:00
Robin Gareus e0d5c1426c
NO-OP: fix some Wimplicit-fallthrough
gcc can recognize various regexps in comments. Since C++17 provides
[[fallthrough]], using /* fallthrough */ consistently seems
appropriate until we switch to C++17.

see also https://gcc.gnu.org/onlinedocs/gcc/Warning-Options.html
2019-09-18 17:37:54 +02:00
Paul Davis bd229936ec add finite state machine to control/manage transport state 2019-09-17 18:26:03 -06:00
Robin Gareus 65ec8fe65a
Clarify splash-screen boot messages
Parsing MIDNAM is what takes the most time.

"Reset Remote Controls" message is misleading (it means MMC), not
control-surfaces, which a user may have none.
2019-09-16 23:08:01 +02:00
Robin Gareus 51b2e305c4
Skip duplicate early session-save for new sessions
Identical code is called unconditionally at the end of
the Session c'tor via Session::session_loaded()
2019-09-05 17:00:14 +02:00
Robin Gareus ae2b6e6b09
Further tweaks to .pending file removal
* only delete it after successful save
* show unlink notification in debug-builds
2019-08-16 05:31:50 +02:00
Robin Gareus 6dc8f5ed1d
Fix periodic backup saves
Retain ".pending" files until explicit save or session destruction.
Previously every transport-stop deleted them :(
2019-08-16 01:54:21 +02: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
Paul Davis 6f506962a7 Revert "fix use of session-creation via template, when just template name is given"
This reverts commit ce7add1481.
2019-07-18 13:38:43 -06:00
Paul Davis ce7add1481 fix use of session-creation via template, when just template name is given 2019-07-18 12:27:16 -06:00
Robin Gareus 6cfb164d7c
Backport backup folder creation
Other parts for auto-backup is already in ardour-git.
2019-04-12 18:32:34 +02:00
Robin Gareus ff8bd935cf
Remove chicken/egg d'tor
Session::Controllables is a shared_ptr<> list. As long
as the session exists the Controllables will be around. Destroyed(*)
can only be called after the session is destroyed and releases the
shared_ptr<>

NB. this code had a nice hack to construct a "shared_from_this"
workaround. For future reference:

struct null_deleter { void operator()(void const *) const {} };
boost::shared_ptr<Controllable>(c, null_deleter())
2019-03-23 14:31:00 +01:00
Paul Davis fd3b8f79af do not create a (throwaway) playlist during track creation 2019-03-19 15:43:06 -07:00
Robin Gareus 50604d83de
Fix incorrectly saved un-used playlists
This addresses issues with session-cleanup and region-cleanup in
some sessions.

The root-cause why some unused playlists were saved in the session XML
under <Playlists> and not <UnusedPlaylists> is not known.

Early 6.0-pre did incorrect reference counting, but also older sessions
had this issue. Perhaps due to ambiguities of matching playlists
by name in 5.x or session-format changes 3.x .. 5.x.
2019-03-19 22:05:06 +01:00
Robin Gareus cf11e11fc5
Remove global Session::playlists variable, use getter method (1/2)
Global variables that can written by anyone are to be avoided.
This also simplifies exposing SessionPlaylists as Lua bindings.
2019-03-19 05:14:00 +01:00
Robin Gareus 4706201425
NO-OP: Use API to set/test state-of-the-state 2019-03-18 15:36:58 +01:00
Robin Gareus b890cf73ad
Prepare to configure procs only once - fix missing panners
During session load, all earlier configure_processors() calls
were useless and not taking I/O into account! The Delivery ::pan_out()
needs _output I/O ports in order to correctly report the correct
port-count!

This worked in earlier versions because Config->map_parameters()
triggered [two] processor re-configs via ::listen_position_changed().
That behavior was changed in 1af123465c
2019-03-17 17:19:02 +01:00
Robin Gareus 1854a72b80
Revert Monitor-Section to be per session
This partially reverts 639dff3a7c. When loading a session,
the monitor-bus that was saved with the session is used.

This changes semantics of the monitor-section/config.

Config::set_use_monitor_bus(bool) is used to initiate a change!
Notification about the change is sent asynchronously by
Session::MonitorBusAddedOrRemoved

It is no longer possible to directly call add/remove_monitor_section()
and leave the session + config in an inconsistent state.
2019-03-01 16:45:42 +01:00
Robin Gareus e48fe0fd42
Remove more cruft (unused rf-scale) 2019-02-21 00:24:56 +01:00
Ben Loftis 688bd28458 Session-range behavior (libardour part) 2019-02-12 11:35:48 -06:00
Paul Davis 1be3301342 new approach to handling Transport Masters when engine is restarted
Trust that ::reset() works for all transport masters, and call it when engine is stopped. This way
the transport masters are ready to be called again as soon as the engine restarts.
2019-01-25 09:23:08 -07:00
Paul Davis 639dff3a7c make session/Config now responsible for adding/removing a monitor section 2018-12-11 12:22:28 -05:00
Robin Gareus c2652437da
Skip silent sources on session-archive -- fixes #7699 2018-12-05 16:54:13 +01:00
Robin Gareus f443626daa
Fix a tiny memory leak, add_instant_xml() copies the node 2018-11-29 14:25:52 +01:00
Paul Davis 4c7e5dbc74 move away from "sync source" concepts 2018-10-05 14:15:02 -04:00
Robin Gareus b6b353d452 Handle generic-midi bindings per session.
This allows to special-cases session-specific control-surface state.
e.g. midi-learn.

Only restore midi-learned, session-specific, bindings when loading a
session with generic-midi enabled.

Also dis/re-enable generic-midi resets midi-learned, but no other
session-independent settings.

This also handles the edge case:
 1) load global config, generic-midi = ON, w/ bindings.
    state is remembered as cpi->state
 2) load session-condig, generic-midi = OFF, cpi->state is retained
 3) user enables the surface, cpi->state from (1) is applied.
 -> invalid bindings applied -> fail
2018-10-04 02:30:21 +02:00
Paul Davis e6915e01de new transport slave/master implementation, libs/ edition 2018-09-18 19:06:04 -04:00
Robin Gareus e951a55d02 Ignore state-changes during deletion
Closing a session removes tracks, which triggers set_dirty().
There is no need to inform the UI or change the session's state.
2018-07-30 17:47:29 +02:00
Ben Loftis ffc5d1474a auto-backup: libardour part. (from mixbus) 2018-07-14 12:46:49 -05:00
Robin Gareus bee09ac9e1 Remove unused CubicInterpolation from session 2018-07-09 17:30:38 +02:00
Paul Davis 8a18929d57 remove Session::controllable_by_descriptor() and move code into GenericMIDI code (the only user).
This also removes enums introduced to describe well-known parameters for Mixbus. Lookup now involves string
parsing every time, but this is not likely to be a notable cost.
2018-06-21 13:05:58 -04:00
Paul Davis a5e8a69dec add well known controls to list accessible via a MIDI binding map (or OSC?) 2018-05-04 09:40:28 -04:00
Paul Davis 2e41652e61 internally, ControllableDescriptors (used by MIDI binding maps) should use enums for automation types, rather than something custom 2018-05-04 08:25:04 -04:00
Robin Gareus d3a74d3c70 Fix some small memory leak (libardour) 2018-01-27 15:45:12 +01:00
Robin Gareus 2fec64f0bd Fix another duplicate if from session/system config consolidation
Found by PVS-Studio - https://www.viva64.com/en/b/0540/
2017-11-23 09:53:50 +01:00
Robin Gareus 9c3983a7a5 Fix various edge-cases with session-archives
* prevent duplicate names when pulling-in external sources
* drop "origin" after including external sources
* don't include unused playlists
  (they may reference sources that are not included)
* likewise exclude unused regions
2017-10-04 05:06:47 +02:00
Robin Gareus e31f5d9998 Clean up State API:
* Processor implement get_state(), classes derived from Processor
  implement protected ::state() -- as documented in processor.h
* likewise for Route, Track: make ::state() a protected interface
* removal of "full_state", use explicit "template_save"
* use RAII/Unwind to skip saving automation-state
2017-10-04 00:54:55 +02:00
Robin Gareus 0802a0872f API change: expose session-archive compression-level 2017-10-03 02:24:16 +02:00
Robin Gareus 7613c9cb34 Fix session-archive edge-cases, prepare uncompressed archives
* don't fork/clone midi regions (default snapshot)
* properly handle encoding embedded/external multi-channel files
* use dedicated file-extension (prepare for uncompressed archive)
2017-10-03 02:24:10 +02:00
Paul Davis 3f48d00081 use new CubicInterpolation API 2017-10-02 12:46:12 -04:00
Robin Gareus 45336723f9 Re-initialize MMC devices when the preference is enabled 2017-09-30 16:48:30 +02:00
Robin Gareus 72fb8a5342 Align punch in/out recording with latency-compensation 2017-09-30 02:45:13 +02:00
Paul Davis 7db12f6b12 convert codebase to use Temporal for various time types 2017-09-24 12:03:54 -04: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
Paul Davis 6f553ce988 changes required to operate with the Evoral::Beats ticktime commit 2017-09-18 11:40:53 -04:00
Paul Davis ac8dc40035 fix for loading older sessions, where the rest for "is-track" was "has-diskstream", rather than "has-playlist" 2017-09-18 11:40:53 -04:00
Paul Davis 1f53c861b8 remove Track::hidden(); replace with Stripable::is_private_route() 2017-09-18 11:40:53 -04:00
Paul Davis 5a52925695 NO-OP explanatory comment 2017-09-18 11:40:53 -04:00
Paul Davis fe8c70e6fc remove debug output 2017-09-18 11:40:53 -04:00
Paul Davis e2f33cdc8b correctly create Tracks, not Busses 2017-09-18 11:40:53 -04:00
Paul Davis 361cab503b random changes required to get an audio track created and transport functional 2017-09-18 11:40:53 -04:00
Paul Davis 35c7274cc9 remove Diskstream from Track and derivatives; get ardour to actually startup 2017-09-18 11:40:53 -04:00
Paul Davis a4a87f56e9 mega-commit to save state of first "it compilesand links" state for separated disk i/o changes.
THIS WILL NOT RUN. THIS REQUIRES MANY CHANGES
2017-09-18 11:40:52 -04:00
Robin Gareus f15fc38bd8 Fix a tiny memory leak 2017-08-20 22:23:10 +02:00
Johannes Mueller bd4db1e151 Remove the template description XMLNode before saving the template
... to avoid that the new template description is concatenated to the old one.
2017-08-20 21:09:30 +02:00
Johannes Mueller ae51d5fd4e Let the user add a template description on saving session templates 2017-08-20 21:09:30 +02:00
Robin Gareus fb745cc5a8 Lua may call C++ functions with throw. Catch them 2017-08-19 01:06:44 +02:00
Robin Gareus 5f0279ab06 Catch some exceptions during session loading. 2017-08-17 19:28:14 +02:00
Robin Gareus 22055a07c0 Check major session file format version.
Don't allow to load sessions created with a newer version of Ardour
with an old one (no forward compatibility).
2017-08-17 18:32:49 +02:00
Robin Gareus 6ec133ebde Separate "add master bus" (and add Lua bindings)
This is in preparation for "advanced session setup" allow a SessionSetup
Lua script to create the master-bus.
2017-08-16 00:51:20 +02:00
Robin Gareus 1d8c7ef37a Clean up BusProfile:
* requested_physical_in/out was unused
 * input/output Autoconnect just overrides Preference/Config
   (can be done by a template script)
 * master_out_channels is kept for compatibility (allow to create
   new empty session)
2017-08-16 00:51:20 +02:00
Robin Gareus 1f5013b4a8 Distinguish error-messages.
The vast majority of errors reported by users as
  "Cannot configure audio/midi engine with session parameters"
have nothing to do with engine-parameters.
2017-06-27 20:28:45 +02:00
Robin Gareus de99d7c528 Allow saving state w/o backend
Connections are remembered by ARDOUR::Port to re-establish at load.
2017-06-25 22:03:42 +02:00
Robin Gareus cc7ff53e1f Create a deep-copy of MIDI sources when saving snapshots 2017-06-25 01:57:19 +02:00
Tim Mayberry 6d35b3c4e4 Remove locale_guard.h from ardour/ardour.h header
Add to source files that use LocaleGuard

Results in far less recompiling when pbd/locale_guard.h changes
2017-06-22 10:48:38 +10:00
Tim Mayberry 5c5cfac4a3 Remove LocaleGuard from Session::load_options
PBD::ConfigVariable uses PBD::to_string/string_to methods so this LocaleGuard
is no longer necessary.
2017-06-22 10:48:38 +10:00
Tim Mayberry def9e110b7 Update Session::writable() during Session::save_as() when switching to copy
Loading a read only Session then making a copy with Save As and switch was
not allowing new Session to be saved as writable state was not updated.

Resolves: #7352
2017-05-13 09:02:02 +10:00
Paul Davis 0c035778e1 libardour now has CoreSelection object to manage selection status of Stripables and AutomationControls 2017-05-05 18:56:25 +01:00
Robin Gareus 0d7e9987b3 fix/amend previous commit. 2017-05-04 23:06:52 +02:00
Robin Gareus 3af9fdad0a Don't save "end-is-free" with templates 2017-05-04 23:00:21 +02:00
Tim Mayberry 4b4d64dd7f Use a const iterator for sorted RouteList in Session::state 2017-04-26 17:36:58 +10:00
Tim Mayberry 3589740d69 Sort Route xml node order by PBD::ID instead of by PresentationInfo
This prevents the node order from changing when the display order of the Routes
changes, which helps to reduce the amount of Session file change.

This is useful for testing and if keeping sessions under version control.

Resolves: #7327
2017-04-26 17:36:58 +10:00
Tim Mayberry 384478a745 Use XMLNode::get_property in Session::restore_history
Avoid using std::stringstream due to potential future issues with C++ locale.

Also avoids potential NULL pointer dereferences.
2017-04-21 12:46:04 +10:00
Robin Gareus f913d5b9f6 NO-OP: whitespace 2017-04-20 23:47:39 +02:00
Tim Mayberry 23d8c41f01 Use XMLNode::get/set_property API in ARDOUR::Session 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
Robin Gareus 5ebe6fcde8 Add option for record-only metronome. 2017-04-01 23:52:43 +02:00
Robin Gareus f2c0b0ee3f Add an API to query if the audible frame is latent pending a locate
eg. at the end of a loop, the session may already be playing the
beginning of the loop. The TransportLooped signal was emitted.
Yet due to playback latency, the audible frame is still at the end of
the loop.

To interpolate the playhead position the UI needs to be able to know:
Relying on the TransportLooped signal is not sufficient because it
does not take playback latency into account.
2017-03-31 14:01:50 +02:00
Robin Gareus 37bcbcad41 Optimize Session::set_dirty() 2017-03-12 02:36:33 +01:00
Robin Gareus cdc8807728 Prepare re-locating missing external files. 2017-02-22 10:51:08 +01:00
Robin Gareus 6616330531 NO-OP; whitespace 2017-02-22 10:47:59 +01:00
Paul Davis b572f1a617 fix save_as()' inadvertent marking a session as dirty during the process of saving state to disk 2017-02-09 12:40:59 +01:00
Paul Davis 3dbea92519 NO-OP: whitespace removal 2017-02-09 12:40:59 +01:00
Paul Davis 2f0dc08844 when adding a default start/end range to a Location while saving a template, do not mark the current session dirty 2017-02-09 12:40:59 +01:00
nick_m 7b9784fff4 mark session dirty when dragging tempo markers. 2017-01-27 03:05:32 +11:00
Robin Gareus 2dc392b517 update bbe62da55a - use last-modified-with, strip git-rev 2017-01-21 01:19:19 +01:00
Robin Gareus bbe62da55a Extract program version that a session was created with 2017-01-20 18:15:44 +01:00
Robin Gareus 4ee8a0e9fc Plug a memory leak (recent session list, session info) 2017-01-20 01:49:23 +01:00
Robin Gareus 88d797bd64 Prepare session-wide implicit monitoring overrides 2017-01-16 19:54:42 +01:00
Robin Gareus d0596d815f prototype track/bus sharing: state-export 2017-01-08 01:23:01 +01:00
Dobroslav Slavenskoj 5f0857620e Fixing LV2_SUPPORT #ifdefs 2017-01-05 09:24:40 +00:00
Robin Gareus 3afe3f32df Remove cruft (old MIDI feedback API) 2016-12-30 17:29:08 +01:00
nick_m d0580ecfbc allow all types of range location (loop, start, end etc.) to be glued to bars and beats. 2016-12-29 01:39:31 +11:00
Robin Gareus fe01666475 Normalize audio when archiving to fixed-point format. 2016-12-27 18:33:41 +01:00
Robin Gareus e1ca4b2887 Speed up recent session display (for many large sessions)
- don't parse XML into XMLTree
- only read the file, extract relevant elements
- don't read session-template contents, only test file
2016-12-08 10:36:12 +01:00
Robin Gareus 7f9befae2d Add Lua bindings to manage Groups 2016-12-05 23:49:19 +01:00
Robin Gareus a994fd30bd extend Mixbus' "Safe Mode" 2016-10-30 22:25:18 +01:00
Paul Davis 235c1f9adb infrastructure for save/restore of MIDI port user-provided information 2016-10-20 16:34:52 -04:00