diff options
author | Andreas Claesson <andreas.claesson@gmail.com> | 2005-05-25 15:25:59 +0000 |
---|---|---|
committer | Andreas Claesson <andreas.claesson@gmail.com> | 2005-05-25 15:25:59 +0000 |
commit | af30dfbe847477360a1c86418a6f5a63aabdc8e4 (patch) | |
tree | 7e4aa1f8129eed939db71f93e8505196a52744a6 /src/replayGain.c | |
parent | 84808afcd92c85f6d9f434aa93f5b92c98548f1c (diff) | |
download | mpd-af30dfbe847477360a1c86418a6f5a63aabdc8e4.tar.gz mpd-af30dfbe847477360a1c86418a6f5a63aabdc8e4.tar.xz mpd-af30dfbe847477360a1c86418a6f5a63aabdc8e4.zip |
Fixing faulty check in pcm_volumeChange and fixed some warnings.
git-svn-id: https://svn.musicpd.org/mpd/branches/ancl@3287 09075e82-0dd4-0310-85a5-a0d7c8717e4f
Diffstat (limited to 'src/replayGain.c')
-rw-r--r-- | src/replayGain.c | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/src/replayGain.c b/src/replayGain.c index d0de774a0..ace70b0e5 100644 --- a/src/replayGain.c +++ b/src/replayGain.c @@ -155,12 +155,16 @@ void doReplayGain(ReplayGainInfo * info, char * buffer, int bufferSize, /* no check for overflow needed - replaygain peak info prevent * clipping and we have 3 headroom bits in our 32 bit samples */ if(iScale == 1) { - while(samples--) - *buffer32++ = *buffer32 >> shift; + while(samples--) { + *buffer32 = *buffer32 >> shift; + buffer32++; + } } - else { - while(samples--) - *buffer32++ = (*buffer32 >> shift) * iScale; + else { + while(samples--) { + *buffer32 = (*buffer32 >> shift) * iScale; + buffer32++; + } } } |