13
0
Commit Graph

61 Commits

Author SHA1 Message Date
4ba4cd69ff switch from glib atomic to std::atomic (libs edition) 2023-03-24 14:19:15 -06:00
itmuckel
9178ca635a
Remove unused imports and modernize stateful.cc 2022-05-13 23:07:49 +02:00
7bf89ce109 Constification: make Stateful::get_state() const, with all other required const-ness added (libs) 2022-04-06 21:56:59 -06:00
64db1367bb Change name of Stateful::apply_changes (PropertyBase) to the singular form.
Makes it slightly easier to read+parse what is happening. Yes, for a
Sequence property, the call could apply several changes, but overwhelmingly
it is used to apply a single change.
2021-09-25 16:49:51 -06:00
58557e88c9
Do not move automation when inserting regions
RegionInsertDrag or Consolidate Range or any other operation
calling Playlist::add_region() previously triggered RangesMoved()
which resulted in DiskReader::move_processor_automation()

NB. insert + ripple still moves automation correctly.
2021-04-29 23:26:24 +02:00
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
0301c47f6b
Update core library GPL boilerplate and (C) from git log 2019-08-03 15:53:17 +02:00
799077025e Use XMLNode::get/set_property API in PBD::Stateful 2017-04-19 09:36:48 +10:00
b66d31891b Revert "profile instant.xml save"
This reverts commit e965e5edcd.
2017-03-27 05:08:30 +02:00
e965e5edcd profile instant.xml save
This does clutter up stderr, but only because instant.xml is arguably
saved much too often (and it's not really instant :)
2017-03-25 15:10:02 +01:00
cf52d6e4b4 enough with umpteen "i18n.h" files. Consolidate on pbd/i18n.h 2016-07-14 14:45:23 -04:00
b48d87b3ea add API to query stateful ID override mode 2015-12-17 23:18:22 +01:00
81103d822a use thread private data **pointer** correctly for Stateful::ID regeneration 2015-11-17 08:53:29 -05:00
d2cba4d7ac fix inadvertently commit error related to at-process-exit deletion for thread private variable 2015-11-16 21:55:57 -05:00
e1dc2d4604 correct value testing for Stateful thread-private variable controlling ID regeneration 2015-11-16 21:24:10 -05:00
92fe47bdee provide a mechanism to force ID regeneration/reset in PBD::Stateful when settingthe ID object from XML or string sources 2015-11-12 10:24:41 -05:00
a4daf93f2f Use XMLNode::remove_child_and_delete in Stateful::add_extra_xml
As the node being replaced has been added with XMLNode::add_child_nocopy the
node also needs to be deleted or a memory leak occurs.
2015-11-10 23:14:17 +10:00
4e6cdb4daa Use constructor initialization list in Stateful class 2015-11-10 23:14:16 +10:00
22b07e0233 NOOP, remove trailing tabs/whitespace. 2015-10-05 16:17:49 +02:00
4dc63966f0 globally remove all trailing whitespace from ardour code base.
Paul Davis was responsible for introducing almost all of this.
2015-10-04 14:51:05 -04:00
7b480eaa27 Windows (compiler specific) includes for libpbd 2013-07-16 18:00:49 +01:00
3cd8138a41 convert from Glib:: to Glib::Threads for all thread-related API
git-svn-id: svn://localhost/ardour2/branches/3.0@13084 d708f5d6-7413-0410-9779-e7cbd77b26cf
2012-07-25 17:48:55 +00:00
28d7884eed Replace PBD::sys::path use in PBD::Stateful
git-svn-id: svn://localhost/ardour2/branches/3.0@12843 d708f5d6-7413-0410-9779-e7cbd77b26cf
2012-06-23 05:07:27 +00:00
Carl Hetherington
39f765614a Clear up confusion with overloads of _frozen and frozen()
meaning different things.


git-svn-id: svn://localhost/ardour2/branches/3.0@11016 d708f5d6-7413-0410-9779-e7cbd77b26cf
2011-12-17 16:37:18 +00:00
4085309cdb make Stateful::_id private and provide appropriate methods to set it, and use them throughout ardour
git-svn-id: svn://localhost/ardour2/branches/3.0@10222 d708f5d6-7413-0410-9779-e7cbd77b26cf
2011-10-18 13:18:47 +00:00
1060243302 major, substantive reworking of how we store GUI information (visibility, height) for automation data. old design stored (insufficient) identifying information plus actual data in a GUI-only XML node; new scheme adds GUI data via extra_xml node to each AutomationControl object. reworked public/private methods for showing/hiding TimeAxisView objects; changed labelling of automation tracks to just show the name of the controlled parameter - more info can be viewed in the tooltip for the track headers. NOTE: Session file format ALTERED. No data loss but track visibility may be different than previous ardour3 versions
git-svn-id: svn://localhost/ardour2/branches/3.0@9703 d708f5d6-7413-0410-9779-e7cbd77b26cf
2011-06-11 15:35:34 +00:00
Carl Hetherington
b6587ad160 Assorted doxygen fixes; no functional changes.
git-svn-id: svn://localhost/ardour2/branches/3.0@9575 d708f5d6-7413-0410-9779-e7cbd77b26cf
2011-05-23 22:12:45 +00:00
4e62adfe1a Fix more broken whitespace.
git-svn-id: svn://localhost/ardour2/branches/3.0@8318 d708f5d6-7413-0410-9779-e7cbd77b26cf
2010-12-21 00:41:13 +00:00
e178fb2e50 add notification of what was changed in Stateful::post_set() call
git-svn-id: svn://localhost/ardour2/branches/3.0@8306 d708f5d6-7413-0410-9779-e7cbd77b26cf
2010-12-20 16:10:58 +00:00
90e73a3a6d (1) remove almost-never used block/unlock_property_changes() methods from PBD::Stateful (2) hide used and path columns from region list (3) detect mouse position within MIDI notes and thus allow move or trim from the same mouse mode (object or trim; first & last 1/4 of each note is for trimming
git-svn-id: svn://localhost/ardour2/branches/3.0@7823 d708f5d6-7413-0410-9779-e7cbd77b26cf
2010-09-21 15:15:06 +00:00
Carl Hetherington
c243a02c99 Fix crossfade undo using the stateful diff system. Fixes #3257.
git-svn-id: svn://localhost/ardour2/branches/3.0@7694 d708f5d6-7413-0410-9779-e7cbd77b26cf
2010-08-26 01:44:11 +00:00
Carl Hetherington
f30402d073 clear_history -> clear_changes and some comments.
git-svn-id: svn://localhost/ardour2/branches/3.0@7685 d708f5d6-7413-0410-9779-e7cbd77b26cf
2010-08-25 17:32:08 +00:00
Carl Hetherington
21855b71d2 Modify StatefulDiffCommand undo record to only contain the changes in one direction, as the other direction can be inferred. Breaks session history file compatibility.
git-svn-id: svn://localhost/ardour2/branches/3.0@7684 d708f5d6-7413-0410-9779-e7cbd77b26cf
2010-08-25 17:31:57 +00:00
Carl Hetherington
fde848282d Move various code up the Property / Stateful hierarchies.
git-svn-id: svn://localhost/ardour2/branches/3.0@7682 d708f5d6-7413-0410-9779-e7cbd77b26cf
2010-08-25 17:31:41 +00:00
Carl Hetherington
7b29752441 Rename various things in the property system.
git-svn-id: svn://localhost/ardour2/branches/3.0@7681 d708f5d6-7413-0410-9779-e7cbd77b26cf
2010-08-25 17:31:33 +00:00
f4401c5928 midway snapshot of work done on managing Region & Source lifetimes correctly. may fix missing MIDI file bug ; save empty playlists because they may be referred to by the history file ; undo commands auto-delete when objects they refer to die (currently not commands built from XML deserialization); Sources now know how many regions are using them for something, meaning that we know if we can delete the files holding any data for the source
git-svn-id: svn://localhost/ardour2/branches/3.0@7291 d708f5d6-7413-0410-9779-e7cbd77b26cf
2010-06-23 20:14:07 +00:00
Carl Hetherington
b68256a8ff Fix up route group state signal handling. Make the PropertyList version
of Stateful::set_properties emit a changed signal after it has done its work.


git-svn-id: svn://localhost/ardour2/branches/3.0@6826 d708f5d6-7413-0410-9779-e7cbd77b26cf
2010-04-02 00:21:08 +00:00
Carl Hetherington
50dd880d7e No-op: rename a few variables and add/fix some comments.
git-svn-id: svn://localhost/ardour2/branches/3.0@6818 d708f5d6-7413-0410-9779-e7cbd77b26cf
2010-04-01 01:07:24 +00:00
Carl Hetherington
afc5e3bd02 Rework to set Stateful properties automagically in the Stateful class rather than delegating to subclasses.
git-svn-id: svn://localhost/ardour2/branches/3.0@6817 d708f5d6-7413-0410-9779-e7cbd77b26cf
2010-03-31 22:45:27 +00:00
6dde6c5a8f goodbye to MementoCommand for playlists
git-svn-id: svn://localhost/ardour2/branches/3.0@6726 d708f5d6-7413-0410-9779-e7cbd77b26cf
2010-03-04 13:15:04 +00:00
17088ee3ea (1) remove most uses of MementoCommand for Playlist and Region (2) move frozen state from Region into Stateful, renamed "suspend property changes" (3) successive changes to a Property (scalar) after clear_history() do not keep resetting the old value (fixes region trim)
git-svn-id: svn://localhost/ardour2/branches/3.0@6720 d708f5d6-7413-0410-9779-e7cbd77b26cf
2010-03-02 18:05:26 +00:00
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
fa701b8c06 change PropertyChange from a bitfield into a real object, with all the many widespread changes that causes
git-svn-id: svn://localhost/ardour2/branches/3.0@6701 d708f5d6-7413-0410-9779-e7cbd77b26cf
2010-02-19 18:09:08 +00:00
ce7a5e1c9f the Properties & 64bit region commit
git-svn-id: svn://localhost/ardour2/branches/3.0@6695 d708f5d6-7413-0410-9779-e7cbd77b26cf
2010-02-18 13:59:49 +00:00
Carl Hetherington
3c00a7ca2a Move ARDOUR::Change into PBD so that Stateful can be aware of
what Change a State reflects.  Hence allow Stateful to do some
of the work of set/get_state in Region.


git-svn-id: svn://localhost/ardour2/branches/3.0@6671 d708f5d6-7413-0410-9779-e7cbd77b26cf
2010-02-10 01:38:20 +00:00
Carl Hetherington
dbc3faa913 Remove erroneous delete of States; they are owned by the subclass that adds them.
git-svn-id: svn://localhost/ardour2/branches/3.0@6666 d708f5d6-7413-0410-9779-e7cbd77b26cf
2010-02-09 22:26:14 +00:00
Carl Hetherington
a5c59175eb Modify Stateful to allow undo to be done using differences in state.
git-svn-id: svn://localhost/ardour2/branches/3.0@6664 d708f5d6-7413-0410-9779-e7cbd77b26cf
2010-02-09 14:44:01 +00:00
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
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
3b89d9eaa0 Remove most using declarations from header files.
git-svn-id: svn://localhost/ardour2/branches/3.0@5069 d708f5d6-7413-0410-9779-e7cbd77b26cf
2009-05-12 17:03:42 +00:00