Adding resampling for waveforms