diff options
Diffstat (limited to 'src/player.c')
-rw-r--r-- | src/player.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/player.c b/src/player.c index 051220c..e895558 100644 --- a/src/player.c +++ b/src/player.c @@ -69,10 +69,10 @@ static inline signed short int applyReplayGain (signed short int value, unsigned int scale) { int tmpReplayBuf = value * scale; /* avoid clipping */ - if (tmpReplayBuf > INT16_MAX*RG_SCALE_FACTOR) { - return INT16_MAX; - } else if (tmpReplayBuf < INT16_MIN*RG_SCALE_FACTOR) { - return INT16_MIN; + if (tmpReplayBuf > SHRT_MAX*RG_SCALE_FACTOR) { + return SHRT_MAX; + } else if (tmpReplayBuf < SHRT_MIN*RG_SCALE_FACTOR) { + return SHRT_MIN; } else { return tmpReplayBuf / RG_SCALE_FACTOR; } |