FreeCalypso > hg > gsm-codec-lib
comparison libgsmefr/enc_wrap.c @ 113:269d341db403
libgsmefr: implement main encoder wrapper
author | Mychaela Falconia <falcon@freecalypso.org> |
---|---|
date | Tue, 29 Nov 2022 07:30:39 +0000 |
parents | |
children |
comparison
equal
deleted
inserted
replaced
112:035424a6ca83 | 113:269d341db403 |
---|---|
1 /* | |
2 * This module contains our EFR_encode_frame() function, which is the primary | |
3 * (most common, most useful) interface to our EFR encoder. | |
4 */ | |
5 | |
6 #include "gsm_efr.h" | |
7 | |
8 void EFR_encode_frame(struct EFR_encoder_state *st, const int16_t *pcm_in, | |
9 uint8_t *frame, int *sp_out, int *vad_out) | |
10 { | |
11 int16_t params[EFR_NUM_PARAMS]; | |
12 int sp; | |
13 | |
14 EFR_encode_params(st, pcm_in, params, &sp, vad_out); | |
15 EFR_params2frame(params, frame); | |
16 if (!sp) | |
17 EFR_insert_sid_codeword(frame); | |
18 if (sp_out) | |
19 *sp_out = sp; | |
20 } |