comparison amrtest/mode_kw.c @ 422:1ceda5586d01

implement twamr-tseq-enc test program
author Mychaela Falconia <falcon@freecalypso.org>
date Tue, 07 May 2024 06:27:20 +0000
parents
children
comparison
equal deleted inserted replaced
421:09534cdc59ec 422:1ceda5586d01
1 /*
2 * The function in this module groks user-input mode strings like "MR122"
3 * and returns the mode number.
4 */
5
6 #include <stdlib.h>
7 #include <string.h>
8 #include <strings.h>
9 #include "../libtwamr/tw_amr.h"
10
11 grok_mode_name(mode_str, mode_out)
12 char *mode_str;
13 enum Mode *mode_out;
14 {
15 if (!strcmp(mode_str, "MR475"))
16 *mode_out = MR475;
17 else if (!strcmp(mode_str, "MR515"))
18 *mode_out = MR515;
19 else if (!strcmp(mode_str, "MR59"))
20 *mode_out = MR59;
21 else if (!strcmp(mode_str, "MR67"))
22 *mode_out = MR67;
23 else if (!strcmp(mode_str, "MR74"))
24 *mode_out = MR74;
25 else if (!strcmp(mode_str, "MR795"))
26 *mode_out = MR795;
27 else if (!strcmp(mode_str, "MR102"))
28 *mode_out = MR102;
29 else if (!strcmp(mode_str, "MR122"))
30 *mode_out = MR122;
31 else
32 return -1;
33 return 0;
34 }