Input/binary: Add reset() function

This commit is contained in:
Soeren Apel 2016-05-02 18:01:10 +02:00 committed by Uwe Hermann
parent b6b4f03e40
commit 3781b65d19
1 changed files with 11 additions and 0 deletions

View File

@ -142,6 +142,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;
}
static struct sr_option options[] = {
{ "numchannels", "Number of channels", "Number of channels", NULL, NULL },
{ "samplerate", "Sample rate", "Sample rate", NULL, NULL },
@ -167,4 +177,5 @@ SR_PRIV struct sr_input_module input_binary = {
.init = init,
.receive = receive,
.end = end,
.reset = reset,
};