aboutsummaryrefslogtreecommitdiffstats
path: root/src/pcm/PcmConvert.hxx
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2013-11-29 21:39:53 +0100
committerMax Kellermann <max@duempel.org>2013-11-30 13:08:55 +0100
commit0eefc7a43ce13876cdfb434e2a890a16befcb847 (patch)
tree583e30d7e6cde01c33e42ec998883bcd94c46951 /src/pcm/PcmConvert.hxx
parent3a666702af9a57c7e8dc5e266b28eaaa5835f5e5 (diff)
downloadmpd-0eefc7a43ce13876cdfb434e2a890a16befcb847.tar.gz
mpd-0eefc7a43ce13876cdfb434e2a890a16befcb847.tar.xz
mpd-0eefc7a43ce13876cdfb434e2a890a16befcb847.zip
pcm/PcmConvert: move code to new class PcmFormatConverter
Diffstat (limited to '')
-rw-r--r--src/pcm/PcmConvert.hxx15
1 files changed, 6 insertions, 9 deletions
diff --git a/src/pcm/PcmConvert.hxx b/src/pcm/PcmConvert.hxx
index 12c4b26f3..d78d72214 100644
--- a/src/pcm/PcmConvert.hxx
+++ b/src/pcm/PcmConvert.hxx
@@ -20,10 +20,10 @@
#ifndef PCM_CONVERT_HXX
#define PCM_CONVERT_HXX
-#include "PcmDither.hxx"
#include "PcmDsd.hxx"
#include "PcmResample.hxx"
#include "PcmBuffer.hxx"
+#include "FormatConverter.hxx"
#include "AudioFormat.hxx"
#include <stddef.h>
@@ -42,10 +42,7 @@ class PcmConvert {
PcmResampler resampler;
- PcmDither dither;
-
- /** the buffer for converting the sample format */
- PcmBuffer format_buffer;
+ PcmFormatConverter format_converter;
/** the buffer for converting the channel count */
PcmBuffer channels_buffer;
@@ -85,16 +82,16 @@ public:
Error &error);
private:
- ConstBuffer<int16_t> Convert16(ConstBuffer<void> src,
+ ConstBuffer<int16_t> Convert16(ConstBuffer<int16_t> src,
AudioFormat format,
Error &error);
- ConstBuffer<int32_t> Convert24(ConstBuffer<void> src,
+ ConstBuffer<int32_t> Convert24(ConstBuffer<int32_t> src,
AudioFormat format,
Error &error);
- ConstBuffer<int32_t> Convert32(ConstBuffer<void> src,
+ ConstBuffer<int32_t> Convert32(ConstBuffer<int32_t> src,
AudioFormat format,
Error &error);
- ConstBuffer<float> ConvertFloat(ConstBuffer<void> src,
+ ConstBuffer<float> ConvertFloat(ConstBuffer<float> src,
AudioFormat format,
Error &error);
};