comparison libgsmfr2/ed_state.c @ 263:ffdcdb27d673

libgsmfr2: integrate e/d state from TU-Berlin code
author Mychaela Falconia <falcon@freecalypso.org>
date Sat, 13 Apr 2024 01:10:37 +0000
parents libgsmfr2/pp_state.c@573afa985df6
children 3a617e4e9b27
comparison
equal deleted inserted replaced
262:573afa985df6 263:ffdcdb27d673
1 /*
2 * In this module we implement allocation and initialization
3 * of state structures for our GSM 06.10 encoder & decoder
4 * based on libgsm from TU-Berlin.
5 */
6
7 #include <stdint.h>
8 #include <stdlib.h>
9 #include <string.h>
10 #include "tw_gsmfr.h"
11 #include "typedef.h"
12 #include "ed_state.h"
13
14 struct gsmfr_0610_state *gsmfr_0610_create(void)
15 {
16 struct gsmfr_0610_state *st;
17
18 st = malloc(sizeof(struct gsmfr_0610_state));
19 if (st)
20 gsmfr_0610_reset(st);
21 return st;
22 }
23
24 void gsmfr_0610_reset(struct gsmfr_0610_state *st)
25 {
26 memset(st, 0, sizeof(struct gsmfr_0610_state));
27 st->nrp = 40;
28 }