comparison libtwamr/sid_sync.h @ 402:a8b73b1c5b19

libtwamr: integrate sid_sync.c
author Mychaela Falconia <falcon@freecalypso.org>
date Mon, 06 May 2024 19:58:22 +0000
parents
children
comparison
equal deleted inserted replaced
401:59655481e45b 402:a8b73b1c5b19
1 /*
2 *****************************************************************************
3 *
4 * GSM AMR-NB speech codec R98 Version 7.6.0 December 12, 2001
5 * R99 Version 3.3.0
6 * REL-4 Version 4.1.0
7 *
8 *****************************************************************************
9 *
10 * File : sid_sync.h
11 * Purpose : To ensure that the mode only switches to a
12 * neighbouring mode
13 *
14 *****************************************************************************
15 */
16 #ifndef sid_sync_h
17 #define sid_sync_h "$Id $"
18
19 /*
20 *****************************************************************************
21 * INCLUDE FILES
22 *****************************************************************************
23 */
24 #include "tw_amr.h"
25 #include "typedef.h"
26
27 /*
28 ******************************************************************************
29 * CONSTANTS
30 ******************************************************************************
31 */
32
33 /*
34 ******************************************************************************
35 * DEFINITION OF DATA TYPES
36 ******************************************************************************
37 */
38 typedef struct {
39 Word16 sid_update_rate; /* Send SID Update every sid_update_rate frame */
40 Word16 sid_update_counter; /* Number of frames since last SID */
41 Word16 sid_handover_debt; /* Number of extra SID_UPD frames to schedule*/
42 enum TXFrameType prev_ft;
43 } sid_syncState;
44
45 /*
46 *****************************************************************************
47 * LOCAL VARIABLES AND TABLES
48 *****************************************************************************
49 */
50
51 /*
52 *****************************************************************************
53 * DECLARATION OF PROTOTYPES
54 *****************************************************************************
55 */
56
57 void sid_sync_reset (sid_syncState *st);
58 /* reset of sid_sync module (i.e. set state memory to zero)
59 returns 0 on success
60 */
61
62 int sid_sync_set_handover_debt (sid_syncState *st, /* i/o: sid_sync state */
63 Word16 debtFrames);
64 /* update handover debt
65 debtFrames extra SID_UPD are scheduled .
66 to update remote decoder CNI states, right after an handover.
67 (primarily for use on MS UL side )
68 */
69
70 void sid_sync(sid_syncState *st , /* i/o: sid_sync state */
71 enum Mode mode,
72 enum TXFrameType *tx_frame_type);
73
74 #endif