decoder/sidplay: make compatible with libsidplayfp < 1.8

https://bugs.musicpd.org/view.php?id=4665
This commit is contained in:
Max Kellermann 2017-03-10 13:48:52 +01:00
parent d50b30a498
commit 1dd01c99e8
2 changed files with 9 additions and 0 deletions

1
NEWS
View File

@ -2,6 +2,7 @@ ver 0.20.6 (not yet released)
* decoder
- ffmpeg: re-enable as fallback
- mpcdec: fix crash (division by zero) after seeking
- sidplay: make compatible with libsidplayfp < 1.8
* workaround for GCC 4.9.4 / libstdc++ bug (build failure)
ver 0.20.5 (2017/02/20)

View File

@ -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,7 +289,11 @@ 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