Fix double multiplication by sample rate that resulted in the waveform renderer allocating way more memory than needed

Originally committed to SVN as r6815.
This commit is contained in:
Thomas Goyne 2012-05-18 01:58:35 +00:00
parent 2243844d89
commit 33c36a3298

View file

@ -92,7 +92,7 @@ void AudioWaveformRenderer::Render(wxBitmap &bmp, int start, AudioRenderingStyle
if (!audio_buffer)
{
// Buffer for one pixel strip of audio
size_t buffer_needed = pixel_samples * provider->GetChannels() * provider->GetSampleRate() * provider->GetBytesPerSample();
size_t buffer_needed = pixel_samples * provider->GetChannels() * provider->GetBytesPerSample();
audio_buffer = new char[buffer_needed];
}