From ab4c27cfa66f34e0b6cdecb48766904281c2df04 Mon Sep 17 00:00:00 2001 From: Soeren Apel Date: Mon, 2 May 2016 18:17:34 +0200 Subject: [PATCH] Input/wav: Add reset() function --- src/input/wav.c | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/src/input/wav.c b/src/input/wav.c index a887fb74..0f56a4ad 100644 --- a/src/input/wav.c +++ b/src/input/wav.c @@ -356,6 +356,16 @@ static int end(struct sr_input *in) return ret; } +static int reset(struct sr_input *in) +{ + struct context *inc = in->priv; + + inc->started = FALSE; + g_string_truncate(in->buf, 0); + + return SR_OK; +} + SR_PRIV struct sr_input_module input_wav = { .id = "wav", .name = "WAV", @@ -366,4 +376,5 @@ SR_PRIV struct sr_input_module input_wav = { .init = init, .receive = receive, .end = end, + .reset = reset, };