diff options
author | J. Alexander Treuman <jat@spatialrift.net> | 2007-06-25 14:24:30 +0000 |
---|---|---|
committer | J. Alexander Treuman <jat@spatialrift.net> | 2007-06-25 14:24:30 +0000 |
commit | f66b834f8fa642e42de3f305ec968cc0cbd23857 (patch) | |
tree | 859022d6e88dffe6d1b04cd3e3b63ff77d6745e7 /src/inputPlugins | |
parent | f83d1aa460a67ed92119eebbe712b16839a07077 (diff) | |
download | mpd-f66b834f8fa642e42de3f305ec968cc0cbd23857.tar.gz mpd-f66b834f8fa642e42de3f305ec968cc0cbd23857.tar.xz mpd-f66b834f8fa642e42de3f305ec968cc0cbd23857.zip |
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
Diffstat (limited to '')
-rw-r--r-- | src/inputPlugins/wavpack_plugin.c | 17 |
1 files 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); |