diff options
author | Paul Davis <paul@linuxaudiosystems.com> | 2009-10-26 01:07:45 +0000 |
---|---|---|
committer | Paul Davis <paul@linuxaudiosystems.com> | 2009-10-26 01:07:45 +0000 |
commit | f53b49e402acd0e3396054f649ea02ccbf68000c (patch) | |
tree | b8ede6d8e9aa195bf08fa3375593b1c4f64fd3a9 /libs | |
parent | 1047b0773eae53dc26395f34ebd4d30558f7e913 (diff) |
(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
Diffstat (limited to 'libs')
-rw-r--r-- | libs/ardour/audiosource.cc | 6 |
1 files 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; |