FreeCalypso > hg > gsm-codec-lib
comparison hrutil/tw5b-out-cod.c @ 557:129c895a0564
hrutil: new program gsmhr-cod2hex
author | Mychaela Falconia <falcon@freecalypso.org> |
---|---|
date | Thu, 06 Feb 2025 08:38:27 +0000 |
parents | |
children |
comparison
equal
deleted
inserted
replaced
556:18aca50d68df | 557:129c895a0564 |
---|---|
1 /* | |
2 * The helper function implemented in this module emits TW-TS-005 Annex B | |
3 * hex output based on an encoder output array, i.e., a cod-style frame. | |
4 * This helper function will be used for gsmhr-cod2hex, gsmhr-encode[-r] | |
5 * and gsmhr-tfo-xfrm utilities. | |
6 */ | |
7 | |
8 #include <stdint.h> | |
9 #include <stdio.h> | |
10 #include "../libgsmhr1/tw_gsmhr.h" | |
11 #include "../libtest/tw5writer.h" | |
12 | |
13 void | |
14 emit_cod_to_tw5b(outf, params, emit_5993) | |
15 FILE *outf; | |
16 int16_t *params; | |
17 { | |
18 uint8_t frame[GSMHR_FRAME_LEN_5993]; | |
19 | |
20 gsmhr_encoder_twts002_out(params, frame); | |
21 if (emit_5993) | |
22 emit_hex_frame(outf, frame, GSMHR_FRAME_LEN_5993); | |
23 else | |
24 emit_hex_frame(outf, frame + 1, GSMHR_FRAME_LEN_RPF); | |
25 } |