Skip to content

Commit

Permalink
Correct AW Lifecycle; Restore AD-Clip (#6548)
Browse files Browse the repository at this point in the history
The fix in 91bc21c was not quite correct. The actual problem was
that the the local ivalues were updated at the wrong point in the cycle
for the re-start effect hence the 'phantom 0' in the pdata_ival
but that phantom 0 is not in fxdata, which is correct, so adjust the
code, preservbing the fix from the prior commit but also restoring
the functionality of AD-Clip, aka AirWin ID 0

Closes #6479
  • Loading branch information
baconpaul authored Aug 20, 2022
1 parent 314514f commit 25d39a0
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions src/common/dsp/effects/airwindows/AirWindowsEffect.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -185,11 +185,7 @@ void AirWindowsEffect::process(float *dataL, float *dataR)
hasInvalidated = true;
}

// Once we are setup, an fx type of 0 is just an init cycle mistake
if (*(pdata_ival[0]) == 0 && fxdata->p[0].user_data)
return;

if (!airwin || *(pdata_ival[0]) != lastSelected || fxdata->p[0].user_data == nullptr)
if (!airwin || fxdata->p[0].val.i != lastSelected || fxdata->p[0].user_data == nullptr)
{
/*
** So do we want to let Airwindows set params as defaults or do we want
Expand All @@ -207,7 +203,7 @@ void AirWindowsEffect::process(float *dataL, float *dataR)
{
useStreamedValues = true;
}
setupSubFX(*(pdata_ival[0]), useStreamedValues);
setupSubFX(fxdata->p[0].val.i, useStreamedValues);
}

if (!airwin)
Expand Down

0 comments on commit 25d39a0

Please sign in to comment.