13
0
livetrax/libs
Paul Davis 1686db8b0c 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
..
appleutility wscript: drop configure statements already present in the top level wscript 2022-01-22 22:19:03 +01:00
ardour Change the type of reference held by a MidiModel to its MidiSource 2022-04-05 20:52:09 -06:00
ardouralsautil wscript: drop configure statements already present in the top level wscript 2022-01-22 22:19:03 +01:00
audiographer Amend f322c4ded7, clean up includes, fix visibility 2022-01-28 02:29:11 +01:00
auscan wscript: drop configure statements already present in the top level wscript 2022-01-22 22:19:03 +01:00
backends wscript: drop configure statements already present in the top level wscript 2022-01-22 22:19:03 +01:00
canvas canvas: add a drawing-request-freeze/thaw API 2022-04-05 20:52:09 -06:00
clearlooks-newer wscript: drop configure statements already present in the top level wscript 2022-01-22 22:19:03 +01:00
evoral remove concept of "note-mode" from Evoral::Sequence (and thus ARDOUR::MidiModel) 2022-04-05 20:52:09 -06:00
fluidsynth wscript: drop configure statements already present in the top level wscript 2022-01-22 22:19:03 +01:00
fst wscript: drop configure statements already present in the top level wscript 2022-01-22 22:19:03 +01:00
gtkmm2ext Replace Glib::Threads with PBD::Thread (2/2) 2022-03-01 01:34:35 +01:00
hidapi wscript: drop configure statements already present in the top level wscript 2022-01-22 22:19:03 +01:00
libltc wscript: drop configure statements already present in the top level wscript 2022-01-22 22:19:03 +01:00
lua Add API to modify Lua Metatable and set Metamethods 2022-01-24 06:23:16 +01:00
midi++2 wscript: drop configure statements already present in the top level wscript 2022-01-22 22:19:03 +01:00
panners wscript: drop configure statements already present in the top level wscript 2022-01-22 22:19:03 +01:00
pbd Fix unset of LIBRARY_PATH environment variable 2022-04-01 20:50:28 +02:00
plugins wscript: drop configure statements already present in the top level wscript 2022-01-22 22:19:03 +01:00
ptformat ptformat: Update to upstream c1c6475 2022-03-29 18:59:46 +11:00
qm-dsp wscript: improve configure messages slightly 2022-01-22 22:19:07 +01:00
surfaces fixes issue where monitor section gets stuck on mute 2022-03-17 15:37:07 -06:00
temporal temporal: fix location of enum conversion decls 2022-04-05 20:52:09 -06:00
vamp-plugins Do not use ABU suffix for vamp plugin shared object 2022-04-01 18:40:46 +02:00
vamp-pyin wscript: drop configure statements already present in the top level wscript 2022-01-22 22:19:03 +01:00
vfork wscript: drop configure statements already present in the top level wscript 2022-01-22 22:19:03 +01:00
vst3
waveview Replace Glib::Threads with PBD::Thread (1/2) 2022-03-01 01:33:49 +01:00
widgets Dim text rendered with ShadedPlusSign 2022-01-31 01:58:42 +01:00
zita-convolver wscript: drop configure statements already present in the top level wscript 2022-01-22 22:19:03 +01:00
zita-resampler wscript: drop configure statements already present in the top level wscript 2022-01-22 22:19:03 +01:00