decoder/mikmod: require at least version 3.2

This commit is contained in:
Max Kellermann 2018-08-02 20:31:22 +02:00
parent e9881bbfc8
commit ca4c81dd84
3 changed files with 2 additions and 12 deletions

1
NEWS
View File

@ -23,6 +23,7 @@ ver 0.21 (not yet released)
- gme: try loading m3u sidecar files - gme: try loading m3u sidecar files
- hybrid_dsd: new decoder plugin - hybrid_dsd: new decoder plugin
- mad: move "gapless_mp3_playback" setting to "decoder" block - mad: move "gapless_mp3_playback" setting to "decoder" block
- mikmod: require at least version 3.2
- pcm: support audio/L24 (RFC 3190) - pcm: support audio/L24 (RFC 3190)
* resampler * resampler
- soxr: flush resampler at end of song - soxr: flush resampler at end of song

View File

@ -944,7 +944,7 @@ MPD_ENABLE_AUTO_PKG(mpg123, MPG123, [libmpg123],
[libmpg123 decoder plugin], [libmpg123 not found]) [libmpg123 decoder plugin], [libmpg123 not found])
dnl -------------------------------- libmikmod -------------------------------- dnl -------------------------------- libmikmod --------------------------------
MPD_ENABLE_AUTO_PKG(mikmod, LIBMIKMOD, [libmikmod], MPD_ENABLE_AUTO_PKG(mikmod, LIBMIKMOD, [libmikmod >= 3.2],
[MikMod decoder plugin], [libmikmod not found]) [MikMod decoder plugin], [libmikmod not found])
dnl -------------------------------- libmodplug ------------------------------- dnl -------------------------------- libmodplug -------------------------------

View File

@ -61,10 +61,7 @@ mikmod_mpd_is_present(void)
static char drv_name[] = PACKAGE_NAME; static char drv_name[] = PACKAGE_NAME;
static char drv_version[] = VERSION; static char drv_version[] = VERSION;
#if (LIBMIKMOD_VERSION > 0x030106)
static char drv_alias[] = PACKAGE; static char drv_alias[] = PACKAGE;
#endif
static MDRIVER drv_mpd = { static MDRIVER drv_mpd = {
nullptr, nullptr,
@ -72,13 +69,9 @@ static MDRIVER drv_mpd = {
drv_version, drv_version,
0, 0,
255, 255,
#if (LIBMIKMOD_VERSION > 0x030106)
drv_alias, drv_alias,
#if (LIBMIKMOD_VERSION >= 0x030200)
nullptr, /* CmdLineHelp */ nullptr, /* CmdLineHelp */
#endif
nullptr, /* CommandLine */ nullptr, /* CommandLine */
#endif
mikmod_mpd_is_present, mikmod_mpd_is_present,
VC_SampleLoad, VC_SampleLoad,
VC_SampleUnload, VC_SampleUnload,
@ -204,11 +197,7 @@ mikmod_decoder_scan_file(Path path_fs, TagHandler &handler) noexcept
char *title = Player_LoadTitle(path2); char *title = Player_LoadTitle(path2);
if (title != nullptr) { if (title != nullptr) {
handler.OnTag(TAG_TITLE, title); handler.OnTag(TAG_TITLE, title);
#if (LIBMIKMOD_VERSION >= 0x030200)
MikMod_free(title); MikMod_free(title);
#else
free(title);
#endif
} }
return true; return true;