Commit Graph

63 Commits

Author SHA1 Message Date
Paul Davis afe5331a0b pbd: fairly unconscionable that Command in libpbd is not namespaced, so now it is 2023-08-07 16:33:16 -06:00
Paul Davis b35518e212 switch from boost::{shared,weak}_ptr to std::{shared,weak}_ptr
This is mostly a simple lexical search+replace but the absence of operator< for
std::weak_ptr<T> leads to some complications, particularly with Evoral::Sequence
and ExportPortChannel.
2023-03-24 14:19:15 -06: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 fea76a4adf fix thinko in cleaning up of XML nodes in Session::memento_command_factory()
"child" is not an independent object, but points to either before or after, both of which have
already been deleted
2022-01-23 07:46:45 -07:00
Paul Davis ee5d3da929 fix inconsequential (unlikely) memory leak from clang 2022-01-20 13:40:49 -07: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 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 a855119bdd rename all Evoral source from .(hpp|cpp)$ to .(h|cc) 2019-11-02 16:32:18 -06:00
Robin Gareus a22f918d9d
Update libardour GPL boilerplate and (C) from git log 2019-08-03 15:53:16 +02: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 46eed03282 Downgrade some undo-related error messages
Missing undo isn't a error. There are valid cases for this to happen.
e.g. switching snapshots or deleting tracks or session-format changes

It's useful to know, but should not distract users showing up as "Errors"
2017-12-16 15:38:02 +01:00
Tim Mayberry b7a9f3c6b5 Use XMLNode::get_property in Session::memento_command_factory
Avoids potential issues with dereferencing a NULL XMLProperty pointer and
improves readability by using better locally scoped variable names.
2017-04-21 12:46:04 +10:00
Paul Davis cf52d6e4b4 enough with umpteen "i18n.h" files. Consolidate on pbd/i18n.h 2016-07-14 14:45:23 -04:00
Robin Gareus 524fb8df49 downgrade failed history/undo stack to info message 2016-05-17 18:18:34 +02:00
Paul Davis f402a63a0e fix bad fix to error string
git-svn-id: svn://localhost/ardour2/branches/3.0@13815 d708f5d6-7413-0410-9779-e7cbd77b26cf
2013-01-09 15:09:13 +00:00
Paul Davis e51cc06133 minor translation fixes/typos from edogawa
git-svn-id: svn://localhost/ardour2/branches/3.0@13812 d708f5d6-7413-0410-9779-e7cbd77b26cf
2013-01-09 14:33:10 +00:00
David Robillard 6fa6514cfd Remove over 500 unnecessary includes (including 54 of session.h).
It's slightly possible that this causes trivial build failures on different
configurations, but otherwise shouldn't cause any problems (i.e. no actual
changes other than include/naming/namespace stuff).  I deliberately avoided
removing libardour-config.h since this can mysteriously break things, though a
few of those do seem to be unnecessary.

This commit only targets includes of ardour/*.h.  There is also a very large
number of unnecessary includes of stuff in gtk2_ardour; tackling that should
also give a big improvement in build time when things are modified.


git-svn-id: svn://localhost/ardour2/branches/3.0@12420 d708f5d6-7413-0410-9779-e7cbd77b26cf
2012-05-24 06:09:29 +00:00
Carl Hetherington a2897ecef6 Fairly major change to the way in which crossfades are handled;
they are now done with region fades, rather than separate objects.
After this commit, Ardour will try to convert your session files
to the new crossfade format, but will make a backup in your
session folder first.

If you have works in progress using Ardour 3 it is
***STRONGLY RECOMMENDED*** that you back up session files before
updating to this commit.


git-svn-id: svn://localhost/ardour2/branches/3.0@11986 d708f5d6-7413-0410-9779-e7cbd77b26cf
2012-04-16 16:32:22 +00:00
Carl Hetherington 185b58f259 Use a MementoCommandBinder for Crossfades so that the undo record can contain details for crossfades that are subsequently deleted (#4325).
git-svn-id: svn://localhost/ardour2/branches/3.0@10104 d708f5d6-7413-0410-9779-e7cbd77b26cf
2011-09-21 15:54:19 +00:00
Paul Davis 071cc3ef01 fix serious breakage with setup of plugin automatable controls/parameters, in which the relative ordering of things during ::set_state() was totally wrong. still see multiple instances of automation tracks for processors in GUI
git-svn-id: svn://localhost/ardour2/branches/3.0@9698 d708f5d6-7413-0410-9779-e7cbd77b26cf
2011-06-09 20:21:46 +00:00
David Robillard a473d630eb Fix broken whitespace. I'd apologize for the compile times if it was my fault :D
git-svn-id: svn://localhost/ardour2/branches/3.0@9654 d708f5d6-7413-0410-9779-e7cbd77b26cf
2011-06-01 16:50:12 +00:00
Carl Hetherington 875f0befd5 Fix restoration of MementoCommand<Crossfade>. Fixes #3418.
git-svn-id: svn://localhost/ardour2/branches/3.0@7771 d708f5d6-7413-0410-9779-e7cbd77b26cf
2010-09-14 00:41:53 +00:00
Carl Hetherington 5b520324ce Allow markers to be glued to bar/beat time. Fixes #1815.
git-svn-id: svn://localhost/ardour2/branches/3.0@7573 d708f5d6-7413-0410-9779-e7cbd77b26cf
2010-08-09 16:40:31 +00:00
Carl Hetherington 66062a85b6 Fix binding of automation list undo records to MIDI sources. Should fix the remainder of #3203.
git-svn-id: svn://localhost/ardour2/branches/3.0@7411 d708f5d6-7413-0410-9779-e7cbd77b26cf
2010-07-14 12:27:37 +00:00
Paul Davis 3a85e71031 (1) stop using mangled names in history state, use demangled ones instead (2) fix region split so that the generated regions have the right start points in the source(s)
git-svn-id: svn://localhost/ardour2/branches/3.0@6721 d708f5d6-7413-0410-9779-e7cbd77b26cf
2010-03-02 19:12:01 +00:00
Paul Davis db8b575c30 the mega-properties/SequenceProperty patch. split is broken at present (right hand starts has start-in-source of zero)
git-svn-id: svn://localhost/ardour2/branches/3.0@6718 d708f5d6-7413-0410-9779-e7cbd77b26cf
2010-03-02 00:00:00 +00:00
Paul Davis a1e0dc13df tweak Stateful/StatefulDiffCommand changes so that SessionObject's actually get a name; make StatefulDiffCommand use a weak_ptr, not a raw ptr; use .val() rather than .get() to avoid confusion with boost:: smart ptr method of the same name
git-svn-id: svn://localhost/ardour2/branches/3.0@6678 d708f5d6-7413-0410-9779-e7cbd77b26cf
2010-02-11 23:10:29 +00:00
Carl Hetherington c9d433d9b3 Make the MementoCommand and StatefulDiffCommand factories look up region IDs in the RegionFactory's map, so that they find the ones they are looking for.
git-svn-id: svn://localhost/ardour2/branches/3.0@6670 d708f5d6-7413-0410-9779-e7cbd77b26cf
2010-02-09 22:45:13 +00:00
Carl Hetherington 12b9571b80 Save and not-yet-working restore of StatefulDiffCommands.
git-svn-id: svn://localhost/ardour2/branches/3.0@6669 d708f5d6-7413-0410-9779-e7cbd77b26cf
2010-02-09 22:28:46 +00:00
Paul Davis e2baff4f7d new RegionCommand object; remove unused string argument from Region::thaw(); add map<ID,Region> in RegionFactory so that we can look up regions by ID
git-svn-id: svn://localhost/ardour2/branches/3.0@6652 d708f5d6-7413-0410-9779-e7cbd77b26cf
2010-02-08 19:39:17 +00:00
Paul Davis f6fdd8dcbf switch to using boost::signals2 instead of sigc++, at least for libardour. not finished yet, but compiles, loads sessions, records and can close a session without a crash
git-svn-id: svn://localhost/ardour2/branches/3.0@6372 d708f5d6-7413-0410-9779-e7cbd77b26cf
2009-12-17 18:24:23 +00:00
Paul Davis 90d6916ca3 restore rec-enable, solo & mute functionality; remove all Global*Command cruft; reimplement momentary solo&mute; refactor session RT event stuff to be even cleaner and finally compatible with everything-is-a-UI idea ; make all UIs derive from a primitive type that pprovides only void call_slot (sigc::slot<void>) as a way to execute arbitrary code in the UI thread
git-svn-id: svn://localhost/ardour2/branches/3.0@6338 d708f5d6-7413-0410-9779-e7cbd77b26cf
2009-12-10 17:45:18 +00:00
Carl Hetherington 478fd92039 Use a shared_ptr for SessionPlaylists so that it can be explicitly destroyed in ~Session to ease debugging.
git-svn-id: svn://localhost/ardour2/branches/3.0@6282 d708f5d6-7413-0410-9779-e7cbd77b26cf
2009-12-04 19:09:08 +00:00
Carl Hetherington ee9455af40 Move some (most) playlist-related code and data into a separate object
(SessionPlaylists).  Main point being to ensure that, when a Session
is destroyed (especially as a result of its constructor throwing an
exception) SessionPlaylists::track is disconnected from its signal
at the same time as the list of playlists is destroyed.  Otherwise
problems abound.


git-svn-id: svn://localhost/ardour2/branches/3.0@6270 d708f5d6-7413-0410-9779-e7cbd77b26cf
2009-12-03 21:52:10 +00:00
David Robillard bc56eb8bd7 Fix unused parameter warnings since GCC apparently doesn't feel like listening to -Wno-unused-parameter
git-svn-id: svn://localhost/ardour2/branches/3.0@5835 d708f5d6-7413-0410-9779-e7cbd77b26cf
2009-10-21 00:15:42 +00:00
Paul Davis 8713667ec1 rework Stateful::set_state() patch to avoid default version argument
git-svn-id: svn://localhost/ardour2/branches/3.0@5787 d708f5d6-7413-0410-9779-e7cbd77b26cf
2009-10-15 18:56:11 +00:00
Carl Hetherington 79f91c7a20 Part 1 of loading 2.X sessions; some things work, some things don't, hacks a-plenty.
LOADING 2.X SESSIONS WITH THIS COMMIT IN PLACE WILL (PROBABLY) CORRUPT THE .ardour FILE,
MAKING THE SESSION UNLOADABLE ON 2.X AND LOSING INFORMATION.

So don't do that unless you make a backup of the session file first.



git-svn-id: svn://localhost/ardour2/branches/3.0@5786 d708f5d6-7413-0410-9779-e7cbd77b26cf
2009-10-15 00:57:55 +00:00
David Robillard bb9cc45cd2 Strip trailing whitespace and fix other whitespace errors (e.g. space/tab mixing). Whitespace changes only.
Vimmers, try let c_space_errors = 1 in your .vimrc to highlight this kind of stuff in red.  I don't know the emacs equivalent...


git-svn-id: svn://localhost/ardour2/branches/3.0@5773 d708f5d6-7413-0410-9779-e7cbd77b26cf
2009-10-14 16:10:01 +00:00
Paul Davis ff26317d4f fix mute & solo behaviour mostly ; remove some verbose debugging output
git-svn-id: svn://localhost/ardour2/branches/3.0@5153 d708f5d6-7413-0410-9779-e7cbd77b26cf
2009-06-10 13:59:06 +00:00
David Robillard 318fb3a069 Fix crash when loading broken sessions with invalid route IDs.
git-svn-id: svn://localhost/ardour2/branches/3.0@5139 d708f5d6-7413-0410-9779-e7cbd77b26cf
2009-06-09 21:17:12 +00:00
David Robillard e0aaed6d65 *** NEW CODING POLICY ***
All #include statements that include a header that is a part of a library
bundled with ardour MUST use quotes, not angle brackets.

Do this:

#include "ardour/types.h"

NOT this:

#include <ardour/types.h>

Rationale:

This is best practice in general, to ensure we include the local version
and not the system version.  That quotes mean "local" (in some sense)
and angle brackets mean "system" (in some sense) is a ubiquitous
convention and IIRC right in the C spec somewhere.

More pragmatically, this is required by (my) waf (stuff) for dependencies
to work correctly.  That is:

!!! FAILURE TO DO THIS CAN RESULT IN BROKEN BUILDS !!!

Failure to comply is punishable by death by torture. :)

P.S. It's not that dramatic in all cases, but this (in combination with some
GCC flags specific to the include type) is the best way I have found to be
absolutely 100% positive the local ones are being used (and we definitely
want to be absolutely 100% positive on that one).


git-svn-id: svn://localhost/ardour2/branches/3.0@4655 d708f5d6-7413-0410-9779-e7cbd77b26cf
2009-02-25 18:26:51 +00:00
David Robillard 75c15679bf Only create a Curve for an AutomationList if we need it.
Fix crash on crossfade editor show (ticket 2442).


git-svn-id: svn://localhost/ardour2/branches/3.0@4641 d708f5d6-7413-0410-9779-e7cbd77b26cf
2009-02-19 19:42:25 +00:00
David Robillard 067faeca62 Remove unused Session::curves.
git-svn-id: svn://localhost/ardour2/branches/3.0@4633 d708f5d6-7413-0410-9779-e7cbd77b26cf
2009-02-19 01:24:34 +00:00
David Robillard 6b0d22268b Normalize XML property name style, preserving old session loading (on load _ will be converted to -).
Still to go:  Non-consistent PBD tag names, colours.


git-svn-id: svn://localhost/ardour2/branches/3.0@3872 d708f5d6-7413-0410-9779-e7cbd77b26cf
2008-10-05 23:14:48 +00:00
David Robillard d8ade6d305 Tidy.
git-svn-id: svn://localhost/ardour2/branches/3.0@3755 d708f5d6-7413-0410-9779-e7cbd77b26cf
2008-09-19 01:16:44 +00:00
Paul Davis 68e943265e merge from 2.0-ongoing @ 3581
git-svn-id: svn://localhost/ardour2/branches/3.0@3711 d708f5d6-7413-0410-9779-e7cbd77b26cf
2008-09-10 15:03:30 +00:00
Paul Davis 449aab3c46 rollback to 3428, before the mysterious removal of libs/* at 3431/3432
git-svn-id: svn://localhost/ardour2/branches/3.0@3435 d708f5d6-7413-0410-9779-e7cbd77b26cf
2008-06-02 21:41:35 +00:00
Doug McLain 9c0d7d72d7 remove empty sigc++2 directory
git-svn-id: svn://localhost/ardour2/branches/3.0@3432 d708f5d6-7413-0410-9779-e7cbd77b26cf
2008-06-02 05:02:28 +00:00
David Robillard 4ca1fe7993 Merge with trunk R2935.
git-svn-id: svn://localhost/ardour2/branches/3.0@2943 d708f5d6-7413-0410-9779-e7cbd77b26cf
2008-01-19 03:49:52 +00:00