annotate libgsmfr2/ed_state.c @ 484:20d44cfc219c

CHANGES: list all new command line utils
author Mychaela Falconia <falcon@freecalypso.org>
date Mon, 20 May 2024 01:42:38 +0000
parents ffdcdb27d673
children 3a617e4e9b27
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
3
3cd5ad24b1d4 libgsmfrp: implement internal state
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1 /*
3cd5ad24b1d4 libgsmfrp: implement internal state
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2 * In this module we implement allocation and initialization
263
ffdcdb27d673 libgsmfr2: integrate e/d state from TU-Berlin code
Mychaela Falconia <falcon@freecalypso.org>
parents: 262
diff changeset
3 * of state structures for our GSM 06.10 encoder & decoder
ffdcdb27d673 libgsmfr2: integrate e/d state from TU-Berlin code
Mychaela Falconia <falcon@freecalypso.org>
parents: 262
diff changeset
4 * based on libgsm from TU-Berlin.
3
3cd5ad24b1d4 libgsmfrp: implement internal state
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
5 */
3cd5ad24b1d4 libgsmfrp: implement internal state
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
6
4
286d5f097eb4 libgsmfrp: implement comfort noise generation
Mychaela Falconia <falcon@freecalypso.org>
parents: 3
diff changeset
7 #include <stdint.h>
3
3cd5ad24b1d4 libgsmfrp: implement internal state
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
8 #include <stdlib.h>
3cd5ad24b1d4 libgsmfrp: implement internal state
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
9 #include <string.h>
256
a33edf624061 libgsmfr2: start with API definition and port of libgsmfrp code
Mychaela Falconia <falcon@freecalypso.org>
parents: 4
diff changeset
10 #include "tw_gsmfr.h"
263
ffdcdb27d673 libgsmfr2: integrate e/d state from TU-Berlin code
Mychaela Falconia <falcon@freecalypso.org>
parents: 262
diff changeset
11 #include "typedef.h"
ffdcdb27d673 libgsmfr2: integrate e/d state from TU-Berlin code
Mychaela Falconia <falcon@freecalypso.org>
parents: 262
diff changeset
12 #include "ed_state.h"
3
3cd5ad24b1d4 libgsmfrp: implement internal state
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
13
263
ffdcdb27d673 libgsmfr2: integrate e/d state from TU-Berlin code
Mychaela Falconia <falcon@freecalypso.org>
parents: 262
diff changeset
14 struct gsmfr_0610_state *gsmfr_0610_create(void)
3
3cd5ad24b1d4 libgsmfrp: implement internal state
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
15 {
263
ffdcdb27d673 libgsmfr2: integrate e/d state from TU-Berlin code
Mychaela Falconia <falcon@freecalypso.org>
parents: 262
diff changeset
16 struct gsmfr_0610_state *st;
3
3cd5ad24b1d4 libgsmfrp: implement internal state
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
17
263
ffdcdb27d673 libgsmfr2: integrate e/d state from TU-Berlin code
Mychaela Falconia <falcon@freecalypso.org>
parents: 262
diff changeset
18 st = malloc(sizeof(struct gsmfr_0610_state));
3
3cd5ad24b1d4 libgsmfrp: implement internal state
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
19 if (st)
263
ffdcdb27d673 libgsmfr2: integrate e/d state from TU-Berlin code
Mychaela Falconia <falcon@freecalypso.org>
parents: 262
diff changeset
20 gsmfr_0610_reset(st);
3
3cd5ad24b1d4 libgsmfrp: implement internal state
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
21 return st;
3cd5ad24b1d4 libgsmfrp: implement internal state
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
22 }
3cd5ad24b1d4 libgsmfrp: implement internal state
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
23
263
ffdcdb27d673 libgsmfr2: integrate e/d state from TU-Berlin code
Mychaela Falconia <falcon@freecalypso.org>
parents: 262
diff changeset
24 void gsmfr_0610_reset(struct gsmfr_0610_state *st)
3
3cd5ad24b1d4 libgsmfrp: implement internal state
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
25 {
263
ffdcdb27d673 libgsmfr2: integrate e/d state from TU-Berlin code
Mychaela Falconia <falcon@freecalypso.org>
parents: 262
diff changeset
26 memset(st, 0, sizeof(struct gsmfr_0610_state));
ffdcdb27d673 libgsmfr2: integrate e/d state from TU-Berlin code
Mychaela Falconia <falcon@freecalypso.org>
parents: 262
diff changeset
27 st->nrp = 40;
3
3cd5ad24b1d4 libgsmfrp: implement internal state
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
28 }