From 7a098ca0ed68f1a790fe45226db05869301b7fa0 Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Fri, 20 Jan 2017 15:48:30 +0100 Subject: [PATCH] pcm/Traits: add specialization for SampleFormat::DSD --- src/pcm/Traits.hxx | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/pcm/Traits.hxx b/src/pcm/Traits.hxx index c0ef32388..6d7bcc6ea 100644 --- a/src/pcm/Traits.hxx +++ b/src/pcm/Traits.hxx @@ -150,4 +150,13 @@ struct SampleTraits { static constexpr value_type MAX = 1; }; +template<> +struct SampleTraits { + typedef uint8_t value_type; + typedef value_type *pointer_type; + typedef const value_type *const_pointer_type; + + static constexpr size_t SAMPLE_SIZE = sizeof(value_type); +}; + #endif