FreeCalypso > hg > gsm-codec-lib
comparison libgsmfr2/pp_good.c @ 530:96c4ed5529bf
libgsmfr2 preproc: implement support for DTXd
| author | Mychaela Falconia <falcon@freecalypso.org> |
|---|---|
| date | Thu, 19 Sep 2024 20:15:54 +0000 |
| parents | 573afa985df6 |
| children |
comparison
equal
deleted
inserted
replaced
| 529:79cd992de3ad | 530:96c4ed5529bf |
|---|---|
| 17 /* now classify by SID */ | 17 /* now classify by SID */ |
| 18 sid = gsmfr_preproc_sid_classify(frame); | 18 sid = gsmfr_preproc_sid_classify(frame); |
| 19 switch (sid) { | 19 switch (sid) { |
| 20 case 0: /* good speech frame */ | 20 case 0: /* good speech frame */ |
| 21 st->rx_state = SPEECH; | 21 st->rx_state = SPEECH; |
| 22 st->dtxd_sid_flag = 0; | |
| 22 memcpy(&st->speech_frame, frame, GSMFR_RTP_FRAME_LEN); | 23 memcpy(&st->speech_frame, frame, GSMFR_RTP_FRAME_LEN); |
| 23 return; | 24 return; |
| 24 case 1: /* invalid SID frame */ | 25 case 1: /* invalid SID frame */ |
| 25 /* state-dependent handling, similar to BFI */ | 26 /* state-dependent handling, similar to BFI */ |
| 26 gsmfr_preproc_invalid_sid(st, frame); | 27 gsmfr_preproc_invalid_sid(st, frame); |
| 27 return; | 28 return; |
| 28 case 2: /* valid SID frame */ | 29 case 2: /* valid SID frame */ |
| 29 st->rx_state = COMFORT_NOISE; | 30 st->rx_state = COMFORT_NOISE; |
| 31 st->dtxd_sid_flag = 1; | |
| 30 gsmfr_preproc_sid2cn(st, frame); | 32 gsmfr_preproc_sid2cn(st, frame); |
| 31 return; | 33 return; |
| 32 } | 34 } |
| 33 } | 35 } |
