From fe5b3f4fed727b6cf0e98a3454070a53ffcb2ee6 Mon Sep 17 00:00:00 2001 From: Chris Robinson Date: Wed, 15 Nov 2023 00:52:57 -0800 Subject: Support 32-bit int sample storage --- core/fmt_traits.h | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'core/fmt_traits.h') diff --git a/core/fmt_traits.h b/core/fmt_traits.h index 1879c81b..02473014 100644 --- a/core/fmt_traits.h +++ b/core/fmt_traits.h @@ -31,6 +31,14 @@ struct FmtTypeTraits { static constexpr OutT to(const Type val) noexcept { return val*OutT{1.0/32768.0}; } }; template<> +struct FmtTypeTraits { + using Type = int32_t; + + template + static constexpr OutT to(const Type val) noexcept + { return static_cast(val)*OutT{1.0/2147483648.0}; } +}; +template<> struct FmtTypeTraits { using Type = float; -- cgit v1.2.3