Commit 83e44750 authored by Max Kellermann's avatar Max Kellermann

pcm/PcmFormat: use SampleTraits::long_type in ConvertFromFloat()

parent c071d6d9
......@@ -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);
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment