From: Soeren Apel Date: Mon, 2 May 2016 16:17:34 +0000 (+0200) Subject: Input/wav: Add reset() function X-Git-Tag: libsigrok-0.5.0~430 X-Git-Url: https://sigrok.org/gitaction?a=commitdiff_plain;h=ab4c27cfa66f34e0b6cdecb48766904281c2df04;p=libsigrok.git Input/wav: Add reset() function --- 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, };