summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorMax Kellermann <max@musicpd.org>2017-03-10 13:48:52 +0100
committerMax Kellermann <max@musicpd.org>2017-03-10 13:48:52 +0100
commit1dd01c99e81e25988e31e4913913fea36d4d9fff (patch)
treecba7f1b1291a415cc17fa6bf27decd988dcb324a /src
parentd50b30a498eee7bf423c65b6ca54020a215c9cdf (diff)
decoder/sidplay: make compatible with libsidplayfp < 1.8
https://bugs.musicpd.org/view.php?id=4665
Diffstat (limited to 'src')
-rw-r--r--src/decoder/plugins/SidplayDecoderPlugin.cxx8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/decoder/plugins/SidplayDecoderPlugin.cxx b/src/decoder/plugins/SidplayDecoderPlugin.cxx
index 56dad0217..6674462eb 100644
--- a/src/decoder/plugins/SidplayDecoderPlugin.cxx
+++ b/src/decoder/plugins/SidplayDecoderPlugin.cxx
@@ -50,6 +50,10 @@
#include <string.h>
#include <stdio.h>
+#ifdef HAVE_SIDPLAYFP
+#define LIBSIDPLAYFP_VERSION GCC_MAKE_VERSION(LIBSIDPLAYFP_VERSION_MAJ, LIBSIDPLAYFP_VERSION_MIN, LIBSIDPLAYFP_VERSION_LEV)
+#endif
+
#define SUBTUNE_PREFIX "tune_"
static constexpr Domain sidplay_domain("sidplay");
@@ -285,8 +289,12 @@ sidplay_file_decode(DecoderClient &client, Path path_fs)
#endif
#ifdef HAVE_SIDPLAYFP
+#if LIBSIDPLAYFP_VERSION >= GCC_MAKE_VERSION(1,8,0)
const bool stereo = tune.getInfo()->sidChips() >= 2;
#else
+ const bool stereo = tune.getInfo()->isStereo();
+#endif
+#else
const bool stereo = tune.isStereo();
#endif