Asterisk - The Open Source Telephony Project  18.5.0
Functions
gsm_option.c File Reference
#include "private.h"
#include "gsm.h"
#include "proto.h"
Include dependency graph for gsm_option.c:

Go to the source code of this file.

Functions

int gsm_option P3 ((r, opt, val), gsm r, int opt, int *val)
 

Function Documentation

◆ P3()

int gsm_option P3 ( (r, opt, val ,
gsm  r,
int  opt,
int *  val 
)

Definition at line 14 of file gsm_option.c.

References gsm_state::fast, gsm_state::frame_chain, gsm_state::frame_index, GSM_OPT_FAST, GSM_OPT_FRAME_CHAIN, GSM_OPT_FRAME_INDEX, GSM_OPT_LTP_CUT, GSM_OPT_VERBOSE, GSM_OPT_WAV49, gsm_state::ltp_cut, result, gsm_state::verbose, and gsm_state::wav_fmt.

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
#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