From 36e3fda554921ef4024cfb6c61f0ba981b7c963c Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Mon, 2 Dec 2013 11:26:38 +0100 Subject: [PATCH] pcm/Traits: add template specialization for FLOAT --- src/pcm/Traits.hxx | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/src/pcm/Traits.hxx b/src/pcm/Traits.hxx index b17123c0d..df2e7978f 100644 --- a/src/pcm/Traits.hxx +++ b/src/pcm/Traits.hxx @@ -105,4 +105,15 @@ struct SampleTraits { static constexpr unsigned BITS = 24; }; +template<> +struct SampleTraits { + typedef float value_type; + typedef value_type *pointer_type; + typedef const value_type *const_pointer_type; + + typedef float long_type; + + static constexpr size_t SAMPLE_SIZE = sizeof(value_type); +}; + #endif