WaveSynth: fix subtract
This commit is contained in:
parent
7a676fb94e
commit
a4fe7ddb76
|
@ -60,7 +60,7 @@ bool DivWaveSynth::tick(bool skipSubDiv) {
|
|||
break;
|
||||
case DIV_WS_SUBTRACT:
|
||||
for (int i=0; i<=state.speed; i++) {
|
||||
output[pos]+=MIN(height,state.param1);
|
||||
output[pos]-=MIN(height,state.param1);
|
||||
if (output[pos]<0) output[pos]+=height;
|
||||
if (++pos>=width) pos=0;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue