aboutsummaryrefslogtreecommitdiffstats
path: root/src/pcm
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2013-12-02 11:26:38 +0100
committerMax Kellermann <max@duempel.org>2013-12-02 11:26:38 +0100
commit36e3fda554921ef4024cfb6c61f0ba981b7c963c (patch)
treeccce615b654f4eccf4f4460836ad2b2f497796ba /src/pcm
parent2b44a2c9bd8f9a171a2e998feb14f3c5a1c29381 (diff)
downloadmpd-36e3fda554921ef4024cfb6c61f0ba981b7c963c.tar.gz
mpd-36e3fda554921ef4024cfb6c61f0ba981b7c963c.tar.xz
mpd-36e3fda554921ef4024cfb6c61f0ba981b7c963c.zip
pcm/Traits: add template specialization for FLOAT
Diffstat (limited to 'src/pcm')
-rw-r--r--src/pcm/Traits.hxx11
1 files changed, 11 insertions, 0 deletions
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<SampleFormat::S24_P32> {
static constexpr unsigned BITS = 24;
};
+template<>
+struct SampleTraits<SampleFormat::FLOAT> {
+ 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