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
commit2bf7ec4f3935c68e6d129ffac17820411b3ea44d (patch)
tree8689514b06b6e9220def40fc1a82ead33dd17455 /src/inputPlugins/wavpack_plugin.c
parent154aa496e8c18bba3dc10c607987c187f4686ae4 (diff)
downloadmpd-2bf7ec4f3935c68e6d129ffac17820411b3ea44d.tar.gz
mpd-2bf7ec4f3935c68e6d129ffac17820411b3ea44d.tar.xz
mpd-2bf7ec4f3935c68e6d129ffac17820411b3ea44d.zip
added decoder_initialized()
decoder_initialized() sets the state to DECODE_STATE_DECODE and wakes up the player thread. It is called by the decoder plugin after its internal initialization is finished. More arguments will be added later to prevent direct accesses to the DecoderControl struct.
Diffstat (limited to 'src/inputPlugins/wavpack_plugin.c')
-rw-r--r--src/inputPlugins/wavpack_plugin.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/inputPlugins/wavpack_plugin.c b/src/inputPlugins/wavpack_plugin.c
index 99491a232..cd832fdc4 100644
--- a/src/inputPlugins/wavpack_plugin.c
+++ b/src/inputPlugins/wavpack_plugin.c
@@ -18,7 +18,7 @@
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
-#include "../inputPlugin.h"
+#include "../decoder_api.h"
#ifdef HAVE_WAVPACK
@@ -124,7 +124,7 @@ 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(mpd_unused struct decoder * decoder,
+static void wavpack_decode(struct decoder * decoder,
WavpackContext *wpc, int canseek,
ReplayGainInfo *replayGainInfo)
{
@@ -166,9 +166,10 @@ static void wavpack_decode(mpd_unused struct decoder * decoder,
getOutputAudioFormat(&(dc.audioFormat), &(ob.audioFormat));
dc.totalTime = (float)allsamples / dc.audioFormat.sampleRate;
- dc.state = DECODE_STATE_DECODE;
dc.seekable = canseek;
+ decoder_initialized(decoder);
+
position = 0;
do {