comparison libtwamr/vad_reset.c @ 414:028ed5114e52

libtwamr: implement run-time VAD selection scheme
author Mychaela Falconia <falcon@freecalypso.org>
date Tue, 07 May 2024 02:06:47 +0000
parents
children
comparison
equal deleted inserted replaced
413:c1bb166f768e 414:028ed5114e52
1 /*
2 * The vad_reset() function implemented in this module is new with libtwamr,
3 * i.e., it does not originate from 3GPP, even though it is styled after
4 * 3GPP AMR code. This function initializes our unified vadState structure,
5 * which is a union of vadState1 and vadState2, plus a selection flag.
6 */
7
8 #include "typedef.h"
9 #include "namespace.h"
10 #include "vad.h"
11
12 void vad_reset(vadState *st, Flag use_vad2)
13 {
14 st->use_vad2 = use_vad2;
15 if (st->use_vad2)
16 vad2_reset(&st->u.v2);
17 else
18 vad1_reset(&st->u.v1);
19 }