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
This commit is contained in:
		@@ -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);
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user