13
0

Clean up MonitorProcessorControls

As opposed to regular AutomationControls these PBD:::Controllables
are not SessionObjects and don't emit a signal when the session
goes away.
This commit is contained in:
Robin Gareus 2019-03-23 16:14:15 +01:00
parent 96e991d08f
commit 1d5e5b3523
Signed by: rgareus
GPG Key ID: A090BCE02CF57F04
2 changed files with 17 additions and 1 deletions

View File

@ -192,6 +192,7 @@ private:
MPControl<bool>& soloed;
ChannelRecord (uint32_t);
~ChannelRecord ();
};
std::vector<ChannelRecord*> _channels;

View File

@ -78,6 +78,13 @@ MonitorProcessor::MonitorProcessor (Session& s)
MonitorProcessor::~MonitorProcessor ()
{
allocate_channels (0);
/* special case for MPControl */
_dim_all_control->DropReferences (); /* EMIT SIGNAL */
_cut_all_control->DropReferences (); /* EMIT SIGNAL */
_mono_control->DropReferences (); /* EMIT SIGNAL */
_dim_level_control->DropReferences (); /* EMIT SIGNAL */
_solo_boost_level_control->DropReferences (); /* EMIT SIGNAL */
}
void
@ -542,5 +549,13 @@ MonitorProcessor::ChannelRecord::ChannelRecord (uint32_t chn)
, polarity (*polarity_ptr)
, soloed (*soloed_ptr)
{
}
MonitorProcessor::ChannelRecord::~ChannelRecord ()
{
/* special case for MPControl */
cut_control->DropReferences(); /* EMIT SIGNAL */
dim_control->DropReferences(); /* EMIT SIGNAL */
polarity_control->DropReferences(); /* EMIT SIGNAL */
soloed_control->DropReferences(); /* EMIT SIGNAL */
}