aboutsummaryrefslogtreecommitdiffstats
path: root/src/replayGain.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/replayGain.c')
-rw-r--r--src/replayGain.c14
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++;
+ }
}
}