summaryrefslogtreecommitdiff
path: root/streamer.c
diff options
context:
space:
mode:
authorGravatar Alexey Yakovenko <wakeroid@gmail.com>2009-09-24 20:35:53 +0200
committerGravatar Alexey Yakovenko <wakeroid@gmail.com>2009-09-24 20:35:53 +0200
commitb8b547871f5e4374726921baeb0f9390b73cc4d1 (patch)
tree9d72a8193edbd96e2694c8cbc0a5557e734179c5 /streamer.c
parent981ecf8e2629d9dd2f8070097ec65bbfd23a5718 (diff)
fixed replaygain for read_int16_resample codepath
Diffstat (limited to 'streamer.c')
-rw-r--r--streamer.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/streamer.c b/streamer.c
index d1ad0bdb..f7f241ba 100644
--- a/streamer.c
+++ b/streamer.c
@@ -394,7 +394,7 @@ apply_replay_gain_int16 (playItem_t *it, char *bytes, int size) {
}
int16_t *s = (int16_t*)bytes;
for (int j = 0; j < size/2; j++) {
- int32_t sample = ((int32_t)*s) * vol / 1000;
+ int32_t sample = ((int32_t)(*s)) * vol / 1000;
if (sample > 0x7fff) {
sample = 0x7fff;
}
@@ -495,7 +495,7 @@ streamer_read_async (char *bytes, int size) {
// }
if (!decoder->read_float32) {
bytesread = decoder->read_int16 (g_readbuffer, nbytes);
- apply_replay_gain_int16 (&str_streaming_song, g_readbuffer, nbytes/2);
+ apply_replay_gain_int16 (&str_streaming_song, g_readbuffer, nbytes);
}
else {
samplesize = 4;