Commit Graph

10 Commits

Author SHA1 Message Date
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 54597bd803 change the type of reference held by a MidiModel to its MidiSource
This also requires a change in the type of reference held by
a MidiAutomationListBinder.

Both the MidiSource and MidiModel have a reference to each other, and it is
important that we avoid circular references to avoid problems with object
destruction. We had been accomplishing this by having the Model hold a
weak_ptr<MidiSource>. However, the lifetime of a MidiSource and its MidiModel
are coincident and there's really no need to use a smart ptr at all. A normal
reference is just fine. However, due to constructors that accept a serialized
state, we cannot use an actual reference (we cannot set the constructor in the
initializer list), so we use a bare ptr instead.

This forces a similar change in MidiAutomationListBinder, which also maintains
a reference to the Source. However, the only purpose of this object is to
ensure that if the Source is destroyed, relevant commands will be removed from
the undo/redo history, and so all that matters here is that the binder connects
to the Destroyed signal of the source, and arranges for its own destruction
when received.

Note that the previous construction of the binder, actually holding a
shared_ptr<MidiSource> would appear have prevented the Destroyed signal from
ever being emitted (from ~Destructible), and so this may also be a bug fix that
allows MidiSources to actually be deleted (the memory object, not the file).
2022-04-05 20:52:09 -06:00
Paul Davis 27c98adda9 alter API for MementoCommandBinder to allow future flexibility 2021-08-13 12:51:30 -06:00
Robin Gareus a22f918d9d
Update libardour GPL boilerplate and (C) from git log 2019-08-03 15:53:16 +02:00
Tim Mayberry 815d93a1e7 Use XMLNode::get/set_parameter API in ARDOUR::MidiAutomationListBinder class 2017-04-19 09:36:52 +10:00
Paul Davis 17ace643e4 OMNIBUS COMMIT: prefer const XMLNode::property method (and provide a real one) 2016-05-04 23:09:45 -04:00
David Robillard 767c0238a3 Replace half-baked param metadata with descriptor.
Among other things, this means that automation controls/lists have the actual
min/max/normal/toggled of parameters, and not those inferred from the Parameter
ID, which is not correct for things like plugin parameters.

Pushing things down to the Evoral::ParmeterDescriptor may be useful in the
future to have lists do smarter things based on parameter range, but currently
I have just pushed down the above-mentioned currently used attributes.
2014-12-01 23:35:24 -05: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
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 451c5c4d06 Add missing files.
git-svn-id: svn://localhost/ardour2/branches/3.0@7412 d708f5d6-7413-0410-9779-e7cbd77b26cf
2010-07-14 12:29:01 +00:00