From 154aa496e8c18bba3dc10c607987c187f4686ae4 Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Tue, 26 Aug 2008 08:27:04 +0200 Subject: added struct decoder The decoder struct should later be made opaque to the decoder plugin, because maintaining a stable struct ABI is quite difficult. The ABI should only consist of a small number of stable functions. --- src/inputPlugins/wavpack_plugin.c | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) (limited to 'src/inputPlugins/wavpack_plugin.c') diff --git a/src/inputPlugins/wavpack_plugin.c b/src/inputPlugins/wavpack_plugin.c index ae5f50826..99491a232 100644 --- a/src/inputPlugins/wavpack_plugin.c +++ b/src/inputPlugins/wavpack_plugin.c @@ -124,7 +124,8 @@ static void format_samples_float(mpd_unused int Bps, void *buffer, * This does the main decoding thing. * Requires an already opened WavpackContext. */ -static void wavpack_decode(WavpackContext *wpc, int canseek, +static void wavpack_decode(mpd_unused struct decoder * decoder, + WavpackContext *wpc, int canseek, ReplayGainInfo *replayGainInfo) { void (*format_samples)(int Bps, void *buffer, uint32_t samcnt); @@ -436,7 +437,7 @@ static unsigned int wavpack_trydecode(InputStream *is) /* * Decodes a stream. */ -static int wavpack_streamdecode(InputStream *is) +static int wavpack_streamdecode(struct decoder * decoder, InputStream *is) { char error[ERRORLEN]; WavpackContext *wpc; @@ -535,7 +536,7 @@ static int wavpack_streamdecode(InputStream *is) return -1; } - wavpack_decode(wpc, canseek, NULL); + wavpack_decode(decoder, wpc, canseek, NULL); WavpackCloseFile(wpc); if (wvc_url != NULL) { @@ -550,7 +551,7 @@ static int wavpack_streamdecode(InputStream *is) /* * Decodes a file. */ -static int wavpack_filedecode(char *fname) +static int wavpack_filedecode(struct decoder * decoder, char *fname) { char error[ERRORLEN]; WavpackContext *wpc; @@ -566,7 +567,7 @@ static int wavpack_filedecode(char *fname) replayGainInfo = wavpack_replaygain(wpc); - wavpack_decode(wpc, 1, replayGainInfo); + wavpack_decode(decoder, wpc, 1, replayGainInfo); if (replayGainInfo) freeReplayGainInfo(replayGainInfo); -- cgit v1.2.3