diff options
author | Max Kellermann <max@duempel.org> | 2013-12-02 08:47:09 +0100 |
---|---|---|
committer | Max Kellermann <max@duempel.org> | 2013-12-02 11:21:32 +0100 |
commit | 83e4475021317788028a58cf49d1801123de9829 (patch) | |
tree | ab09a2100ae5e1c743040a4e2fade53410cb9404 /src/pcm | |
parent | c071d6d9f62682cd7831f8e23b6c360a00fbe779 (diff) | |
download | mpd-83e4475021317788028a58cf49d1801123de9829.tar.gz mpd-83e4475021317788028a58cf49d1801123de9829.tar.xz mpd-83e4475021317788028a58cf49d1801123de9829.zip |
pcm/PcmFormat: use SampleTraits::long_type in ConvertFromFloat()
Diffstat (limited to '')
-rw-r--r-- | src/pcm/PcmFormat.cxx | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/pcm/PcmFormat.cxx b/src/pcm/PcmFormat.cxx index 348437a12..06390249d 100644 --- a/src/pcm/PcmFormat.cxx +++ b/src/pcm/PcmFormat.cxx @@ -56,8 +56,10 @@ ConvertFromFloat(typename Traits::pointer_type dest, const float factor = 1 << (bits - 1); while (src != end) { - int sample(*src++ * factor); - *dest++ = PcmClamp<typename Traits::value_type, int, bits>(sample); + typename Traits::long_type sample(*src++ * factor); + *dest++ = PcmClamp<typename Traits::value_type, + typename Traits::long_type, + Traits::BITS>(sample); } } |