diff options
author | Lars-Dominik Braun <lars@6xq.net> | 2014-01-31 17:43:00 +0100 |
---|---|---|
committer | Lars-Dominik Braun <lars@6xq.net> | 2014-01-31 17:43:00 +0100 |
commit | ef4fe8e4c89bcf8df9b3f74d285d8bbd71a09eea (patch) | |
tree | 9fccf82e53d3df2f41546c609a613872c48c0ee9 /src/player.c | |
parent | b91dada75f804ccca64644f6d40276db4815f4b3 (diff) | |
download | pianobar-ef4fe8e4c89bcf8df9b3f74d285d8bbd71a09eea.tar.gz pianobar-ef4fe8e4c89bcf8df9b3f74d285d8bbd71a09eea.tar.bz2 pianobar-ef4fe8e4c89bcf8df9b3f74d285d8bbd71a09eea.zip |
Switch to clang for debugging build + fix issues
Diffstat (limited to 'src/player.c')
-rw-r--r-- | src/player.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/player.c b/src/player.c index 939b326..55b9e90 100644 --- a/src/player.c +++ b/src/player.c @@ -83,8 +83,8 @@ unsigned int BarPlayerCalcScale (const float applyGain) { */ static inline signed short int applyReplayGain (const signed short int value, const unsigned int scale) { - int tmpReplayBuf = value * scale; - /* avoid clipping */ + int tmpReplayBuf = value * (signed int) scale; + /* clipping */ if (tmpReplayBuf > SHRT_MAX*RG_SCALE_FACTOR) { return SHRT_MAX; } else if (tmpReplayBuf < SHRT_MIN*RG_SCALE_FACTOR) { |