Asterisk - The Open Source Telephony Project  18.5.0
gsm_option.c
Go to the documentation of this file.
1 /*
2  * Copyright 1992 by Jutta Degener and Carsten Bormann, Technische
3  * Universitaet Berlin. See the accompanying file "COPYRIGHT" for
4  * details. THERE IS ABSOLUTELY NO WARRANTY FOR THIS SOFTWARE.
5  */
6 
7 /* $Header$ */
8 
9 #include "private.h"
10 
11 #include "gsm.h"
12 #include "proto.h"
13 
14 int gsm_option P3((r, opt, val), gsm r, int opt, int * val)
15 {
16  int result = -1;
17 
18  switch (opt) {
19  case GSM_OPT_LTP_CUT:
20 #ifdef LTP_CUT
21  result = r->ltp_cut;
22  if (val) r->ltp_cut = *val;
23 #endif
24  break;
25 
26  case GSM_OPT_VERBOSE:
27 #ifndef NDEBUG
28  result = r->verbose;
29  if (val) r->verbose = *val;
30 #endif
31  break;
32 
33  case GSM_OPT_FAST:
34 
35 #if defined(FAST) && defined(USE_FLOAT_MUL)
36  result = r->fast;
37  if (val) r->fast = !!*val;
38 #endif
39  break;
40 
42 
43 #ifdef WAV49
44  result = r->frame_chain;
45  if (val) r->frame_chain = *val;
46 #endif
47  break;
48 
50 
51 #ifdef WAV49
52  result = r->frame_index;
53  if (val) r->frame_index = *val;
54 #endif
55  break;
56 
57  case GSM_OPT_WAV49:
58 
59 #ifdef WAV49
60  result = r->wav_fmt;
61  if (val) r->wav_fmt = !!*val;
62 #endif
63  break;
64 
65  default:
66  break;
67  }
68  return result;
69 }
unsigned char frame_index
#define GSM_OPT_LTP_CUT
Definition: gsm.h:52
Definition: ast_expr2.c:325
#define GSM_OPT_WAV49
Definition: gsm.h:53
#define GSM_OPT_VERBOSE
Definition: gsm.h:50
int gsm_option P3((r, opt, val), gsm r, int opt, int *val)
Definition: gsm_option.c:14
#define GSM_OPT_FRAME_CHAIN
Definition: gsm.h:55
unsigned char frame_chain
#define GSM_OPT_FRAME_INDEX
Definition: gsm.h:54
#define GSM_OPT_FAST
Definition: gsm.h:51
static PGresult * result
Definition: cel_pgsql.c:88