aboutsummaryrefslogtreecommitdiffstats
path: root/src/inputPlugins/wavpack_plugin.c
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2008-08-26 08:27:04 +0200
committerMax Kellermann <max@duempel.org>2008-08-26 08:27:04 +0200
commit154aa496e8c18bba3dc10c607987c187f4686ae4 (patch)
tree32a2a35f74e823c5eea21bbfbebef1297fe6e989 /src/inputPlugins/wavpack_plugin.c
parent241cd043ca4f9dd560e6d947a9bf025f58de4ea9 (diff)
downloadmpd-154aa496e8c18bba3dc10c607987c187f4686ae4.tar.gz
mpd-154aa496e8c18bba3dc10c607987c187f4686ae4.tar.xz
mpd-154aa496e8c18bba3dc10c607987c187f4686ae4.zip
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.
Diffstat (limited to 'src/inputPlugins/wavpack_plugin.c')
-rw-r--r--src/inputPlugins/wavpack_plugin.c11
1 files changed, 6 insertions, 5 deletions
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);