improve the way frames_per_sample are computed when using auto_width

I noticed that for long audio files, the previous solution produced waveforms which ran slower than the audio file. So here is an update:

Previously the frames_per_sample depended on the width, and thus for long audio the visual representation of the waveform could be "slower" than the actual audio. Now we'll set the samples_pre_frame based on the audio's sample_rate, so the waveform will match the audio.