diff options
author | Max Kellermann <max@duempel.org> | 2013-02-01 13:50:10 +0100 |
---|---|---|
committer | Max Kellermann <max@duempel.org> | 2013-02-01 14:10:27 +0100 |
commit | ef99d6ce3d9b82cb249ae08b390049a6f9cd9d56 (patch) | |
tree | 7e41014940911702613ee76f7305a2e4d0724f8c /src/PcmVolume.cxx | |
parent | 0ac06d77f1d47398808935418153a14d1d858860 (diff) | |
download | mpd-ef99d6ce3d9b82cb249ae08b390049a6f9cd9d56.tar.gz mpd-ef99d6ce3d9b82cb249ae08b390049a6f9cd9d56.tar.xz mpd-ef99d6ce3d9b82cb249ae08b390049a6f9cd9d56.zip |
PcmUtils: remove pcm_range(), use PcmClamp() instead
Diffstat (limited to '')
-rw-r--r-- | src/PcmVolume.cxx | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/PcmVolume.cxx b/src/PcmVolume.cxx index e19469f4a..556ab9925 100644 --- a/src/PcmVolume.cxx +++ b/src/PcmVolume.cxx @@ -40,7 +40,7 @@ pcm_volume_change_8(int8_t *buffer, const int8_t *end, int volume) PCM_VOLUME_1 / 2) / PCM_VOLUME_1; - *buffer++ = pcm_range(sample, 8); + *buffer++ = PcmClamp<int8_t, int16_t, 8>(sample); } } @@ -54,7 +54,7 @@ pcm_volume_change_16(int16_t *buffer, const int16_t *end, int volume) PCM_VOLUME_1 / 2) / PCM_VOLUME_1; - *buffer++ = pcm_range(sample, 16); + *buffer++ = PcmClamp<int16_t, int32_t, 16>(sample); } } @@ -107,7 +107,7 @@ pcm_volume_change_24(int32_t *buffer, const int32_t *end, int volume) PCM_VOLUME_1 / 2) / PCM_VOLUME_1; #endif - *buffer++ = pcm_range(sample, 24); + *buffer++ = PcmClamp<int32_t, int32_t, 24>(sample); } } @@ -127,7 +127,7 @@ pcm_volume_change_32(int32_t *buffer, const int32_t *end, int volume) sample = (sample * volume + pcm_volume_dither() + PCM_VOLUME_1 / 2) / PCM_VOLUME_1; - *buffer++ = pcm_range_64(sample, 32); + *buffer++ = PcmClamp<int32_t, int64_t, 32>(sample); #endif } } |