diff options
author | 2009-09-24 20:35:53 +0200 | |
---|---|---|
committer | 2009-09-24 20:35:53 +0200 | |
commit | b8b547871f5e4374726921baeb0f9390b73cc4d1 (patch) | |
tree | 9d72a8193edbd96e2694c8cbc0a5557e734179c5 /streamer.c | |
parent | 981ecf8e2629d9dd2f8070097ec65bbfd23a5718 (diff) |
fixed replaygain for read_int16_resample codepath
Diffstat (limited to 'streamer.c')
-rw-r--r-- | streamer.c | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -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; |