api/waveform: add resize functionality