comparison libgsmhr1/rxfe.c @ 580:d4979cdbc081

libgsmhr1 RxFE: set in_dtx in init_cn_gen()
author Mychaela Falconia <falcon@freecalypso.org>
date Thu, 13 Feb 2025 09:21:02 +0000
parents 1dc5d9320e96
children e2d5cad04cbf
comparison
equal deleted inserted replaced
579:1dc5d9320e96 580:d4979cdbc081
211 Longword L_RxDTXGs; 211 Longword L_RxDTXGs;
212 212
213 st->cn_prng = PN_INIT_SEED; 213 st->cn_prng = PN_INIT_SEED;
214 avgGsHistQntz(st->gs_history, &L_RxDTXGs); 214 avgGsHistQntz(st->gs_history, &L_RxDTXGs);
215 st->gs_cn_out = gsQuant(L_RxDTXGs, 0); 215 st->gs_cn_out = gsQuant(L_RxDTXGs, 0);
216 st->in_dtx = 1;
216 st->dtx_bfi_count = 0; 217 st->dtx_bfi_count = 0;
217 st->dtx_muting = 0; 218 st->dtx_muting = 0;
218 } 219 }
219 220
220 static void cn_output(struct gsmhr_rxfe_state *st, Shortword *prm_out) 221 static void cn_output(struct gsmhr_rxfe_state *st, Shortword *prm_out)
272 save_speech_gs(st, prm_out); 273 save_speech_gs(st, prm_out);
273 break; 274 break;
274 case CNIFIRSTSID: 275 case CNIFIRSTSID:
275 if (dtxd_sp) 276 if (dtxd_sp)
276 *dtxd_sp = 0; 277 *dtxd_sp = 0;
277 st->in_dtx = 1;
278 if (frame_class == VALIDSID) 278 if (frame_class == VALIDSID)
279 memcpy(st->saved_frame, prm_in, sizeof(Shortword) * 4); 279 memcpy(st->saved_frame, prm_in, sizeof(Shortword) * 4);
280 init_cn_gen(st); 280 init_cn_gen(st);
281 cn_output(st, prm_out); 281 cn_output(st, prm_out);
282 break; 282 break;
283 case CNICONT: 283 case CNICONT:
284 if (dtxd_sp) 284 if (dtxd_sp)
285 *dtxd_sp = 0; 285 *dtxd_sp = 0;
286 st->in_dtx = 1;
287 if (frame_class == VALIDSID) 286 if (frame_class == VALIDSID)
288 memcpy(st->saved_frame, prm_in, sizeof(Shortword) * 4); 287 memcpy(st->saved_frame, prm_in, sizeof(Shortword) * 4);
289 else 288 else
290 deco_mode = CNIBFI; /* for interpolation */ 289 deco_mode = CNIBFI; /* for interpolation */
291 st->dtx_bfi_count = 0; 290 st->dtx_bfi_count = 0;
293 cn_output(st, prm_out); 292 cn_output(st, prm_out);
294 break; 293 break;
295 case CNIBFI: 294 case CNIBFI:
296 if (dtxd_sp) 295 if (dtxd_sp)
297 *dtxd_sp = 0; 296 *dtxd_sp = 0;
298 st->in_dtx = 1;
299 if (st->dtx_muting) { 297 if (st->dtx_muting) {
300 if (fast_cn_muting) 298 if (fast_cn_muting)
301 st->saved_frame[0] = 0; 299 st->saved_frame[0] = 0;
302 else { 300 else {
303 st->saved_frame[0] -= 2; 301 st->saved_frame[0] -= 2;