aboutsummaryrefslogtreecommitdiffstats
path: root/src/DecoderInternal.hxx
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2013-11-13 19:10:43 +0100
committerMax Kellermann <max@duempel.org>2013-11-13 19:16:31 +0100
commitf1ca61d7d7fac7a0a93daa244bf86c2ae7ebabd7 (patch)
tree974778506726772914bf9fa64b18f533a557ecd5 /src/DecoderInternal.hxx
parenta80b5cf19b8d2dda6db15444cd11aa9494546380 (diff)
downloadmpd-f1ca61d7d7fac7a0a93daa244bf86c2ae7ebabd7.tar.gz
mpd-f1ca61d7d7fac7a0a93daa244bf86c2ae7ebabd7.tar.xz
mpd-f1ca61d7d7fac7a0a93daa244bf86c2ae7ebabd7.zip
DecoderInternal: allocate PcmConvert dynamically
Reduce header dependencies and allow it to be nullptr to disable it.
Diffstat (limited to 'src/DecoderInternal.hxx')
-rw-r--r--src/DecoderInternal.hxx9
1 files changed, 7 insertions, 2 deletions
diff --git a/src/DecoderInternal.hxx b/src/DecoderInternal.hxx
index 37abb4427..e98e0aae3 100644
--- a/src/DecoderInternal.hxx
+++ b/src/DecoderInternal.hxx
@@ -21,9 +21,9 @@
#define MPD_DECODER_INTERNAL_HXX
#include "DecoderCommand.hxx"
-#include "pcm/PcmConvert.hxx"
#include "ReplayGainInfo.hxx"
+class PcmConvert;
struct DecoderControl;
struct InputStream;
struct Tag;
@@ -31,7 +31,11 @@ struct Tag;
struct Decoder {
DecoderControl &dc;
- PcmConvert conv_state;
+ /**
+ * For converting input data to the configured audio format.
+ * nullptr means no conversion necessary.
+ */
+ PcmConvert *convert;
/**
* The time stamp of the next data chunk, in seconds.
@@ -85,6 +89,7 @@ struct Decoder {
Decoder(DecoderControl &_dc, bool _initial_seek_pending, Tag *_tag)
:dc(_dc),
+ convert(nullptr),
timestamp(0),
initial_seek_pending(_initial_seek_pending),
initial_seek_running(false),