Skip to content

Commit

Permalink
Default scene volume for recent nightlies (#7109)
Browse files Browse the repository at this point in the history
When revision == 22 but prior to having a volume deactivation state,
you end up with a patch silent on the matter. Make the patch default
for volume deactivation appropriate.
  • Loading branch information
baconpaul authored Jul 20, 2023
1 parent a7da585 commit fc42067
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion src/common/SurgePatch.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1684,6 +1684,12 @@ void SurgePatch::load_xml(const void *data, int datasize, bool is_preset)
}
else
{
/*
* This code runs when there is no deactivated streaming. This can happen
* in, say, nightlies when we toggle can_deactivate half way through the
* dev cycle so half the patches have it true and half false. But there is
* no good default so just maintain this nasty list.
*/
if (param_ptr[i]->can_deactivate())
{
auto cg = param_ptr[i]->ctrlgroup;
Expand All @@ -1693,7 +1699,8 @@ void SurgePatch::load_xml(const void *data, int datasize, bool is_preset)
if ((cg == cg_LFO) || // this is the LFO rate and env special case
(cg == cg_GLOBAL &&
ct == ct_freq_hpf) || // this is the global highpass special case
(ct == ct_filtertype || ct == ct_wstype) // filter bypass
(ct == ct_filtertype || ct == ct_wstype) || // filter bypass
(ct == ct_amplitude_clipper) // scene volume
)
{
param_ptr[i]->deactivated = false;
Expand Down

0 comments on commit fc42067

Please sign in to comment.