From f53b49e402acd0e3396054f649ea02ccbf68000c Mon Sep 17 00:00:00 2001 From: Paul Davis Date: Mon, 26 Oct 2009 01:07:45 +0000 Subject: [PATCH] (forward ported from 2.0-ongoing) fix for peak data reading (carl h, #2388) git-svn-id: svn://localhost/ardour2/branches/3.0@5921 d708f5d6-7413-0410-9779-e7cbd77b26cf --- libs/ardour/audiosource.cc | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/libs/ardour/audiosource.cc b/libs/ardour/audiosource.cc index 883bc0b41b..fb969fc8b9 100644 --- a/libs/ardour/audiosource.cc +++ b/libs/ardour/audiosource.cc @@ -394,7 +394,7 @@ AudioSource::read_peaks_with_fpp (PeakData *peaks, nframes_t npeaks, sframes_t s } if (zero_fill) { - memset (&peaks[npeaks], 0, sizeof (PeakData) * zero_fill); + memset (peaks + npeaks - zero_fill, 0, sizeof (PeakData) * zero_fill); } return 0; @@ -505,7 +505,7 @@ AudioSource::read_peaks_with_fpp (PeakData *peaks, nframes_t npeaks, sframes_t s } if (zero_fill) { - memset (&peaks[npeaks], 0, sizeof (PeakData) * zero_fill); + memset (peaks + npeaks - zero_fill, 0, sizeof (PeakData) * zero_fill); } ret = 0; @@ -583,7 +583,7 @@ AudioSource::read_peaks_with_fpp (PeakData *peaks, nframes_t npeaks, sframes_t s } if (zero_fill) { - memset (&peaks[npeaks], 0, sizeof (PeakData) * zero_fill); + memset (peaks + npeaks - zero_fill, 0, sizeof (PeakData) * zero_fill); } ret = 0;