From 940ecf5345f339b9d3ec3e8029e345540358fa4c Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Tue, 26 Aug 2008 08:27:14 +0200 Subject: added decoder_read() On our way to stabilize the decoder API, we will one day remove the input stream functions. The most basic function, read() will be provided by decoder_api.h with this patch. It already contains a loop (still with manual polling), error/eof handling and decoder command checks. This kind of code used to be duplicated in all decoder plugins. --- src/inputPlugins/wavpack_plugin.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/inputPlugins/wavpack_plugin.c') diff --git a/src/inputPlugins/wavpack_plugin.c b/src/inputPlugins/wavpack_plugin.c index 00aa09993..b641ab7dc 100644 --- a/src/inputPlugins/wavpack_plugin.c +++ b/src/inputPlugins/wavpack_plugin.c @@ -358,7 +358,7 @@ static int32_t read_bytes(void *id, void *data, int32_t bcount) --bcount; ++i; } - return i + readFromInputStream(isp->is, buf, 1, bcount); + return i + decoder_read(isp->decoder, isp->is, buf, bcount); } static uint32_t get_pos(void *id) -- cgit v1.2.3