cainteoir_waveform_view: fix drawing samples past the sample count