From f66b834f8fa642e42de3f305ec968cc0cbd23857 Mon Sep 17 00:00:00 2001 From: "J. Alexander Treuman" Date: Mon, 25 Jun 2007 14:24:30 +0000 Subject: inputPlugins/wavpack_plugin: enable ReplayGain code Turns out the fix was as simple as specifying the OPEN_TAGS flag when opening the file. Thanks again to Kodest for figuring this one out. git-svn-id: https://svn.musicpd.org/mpd/trunk@6657 09075e82-0dd4-0310-85a5-a0d7c8717e4f --- src/inputPlugins/wavpack_plugin.c | 17 +++-------------- 1 file changed, 3 insertions(+), 14 deletions(-) diff --git a/src/inputPlugins/wavpack_plugin.c b/src/inputPlugins/wavpack_plugin.c index 7c50466b7..73795df94 100644 --- a/src/inputPlugins/wavpack_plugin.c +++ b/src/inputPlugins/wavpack_plugin.c @@ -206,10 +206,6 @@ static void wavpack_decode(OutputBuffer *cb, DecoderControl *dc, dc->stop = 0; } -/* - * These functions aren't currently used, which just results in warnings. - */ -#if 0 static char *wavpack_tag(WavpackContext *wpc, char *key) { char *value = NULL; @@ -271,7 +267,6 @@ static ReplayGainInfo *wavpack_replaygain(WavpackContext *wpc) return NULL; } -#endif /* * Reads metainfo from the specified file. @@ -454,20 +449,14 @@ static int wavpack_filedecode(OutputBuffer *cb, DecoderControl *dc, char *fname) ReplayGainInfo *replayGainInfo; wpc = WavpackOpenFileInput(fname, error, - OPEN_WVC | OPEN_2CH_MAX | OPEN_NORMALIZE, - 15); + OPEN_TAGS | OPEN_WVC | + OPEN_2CH_MAX | OPEN_NORMALIZE, 15); if (wpc == NULL) { ERROR("failed to open WavPack file \"%s\": %s\n", fname, error); return -1; } - /* - * ReplayGain support is currently disabled, because WavpackGetTagItem - * can't seem to find the replaygain_* fields in APEv2 tags. - */ - - /* replayGainInfo = wavpack_replaygain(wpc); */ - replayGainInfo = NULL; + replayGainInfo = wavpack_replaygain(wpc); wavpack_decode(cb, dc, wpc, 1, replayGainInfo); -- cgit v1.2.3