fix crasher regression when resampling waveform during gain set