pcm/Traits: add typedef "sum_type"

Allow 32 bit platforms to use 32 bit instead of 64 bit for summing 24
bit samples.
This commit is contained in:
Max Kellermann
2013-12-02 11:45:03 +01:00
parent f761d583b5
commit c6ef0e8887
3 changed files with 16 additions and 5 deletions

View File

@@ -125,7 +125,7 @@ template<SampleFormat F, class Traits=SampleTraits<F>>
static typename Traits::value_type
PcmAdd(typename Traits::value_type _a, typename Traits::value_type _b)
{
typename Traits::long_type a(_a), b(_b);
typename Traits::sum_type a(_a), b(_b);
return PcmClamp<F, Traits>(a + b);
}