Asterisk - The Open Source Telephony Project
GIT-master-f36a736
codecs
gsm
src
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
41
case
GSM_OPT_FRAME_CHAIN
:
42
43
#ifdef WAV49
44
result
= r->
frame_chain
;
45
if
(
val
) r->
frame_chain
= *
val
;
46
#endif
47
break
;
48
49
case
GSM_OPT_FRAME_INDEX
:
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
}
result
static PGresult * result
Definition:
cel_pgsql.c:84
gsm.h
GSM_OPT_FRAME_INDEX
#define GSM_OPT_FRAME_INDEX
Definition:
gsm.h:54
GSM_OPT_FRAME_CHAIN
#define GSM_OPT_FRAME_CHAIN
Definition:
gsm.h:55
GSM_OPT_VERBOSE
#define GSM_OPT_VERBOSE
Definition:
gsm.h:50
GSM_OPT_FAST
#define GSM_OPT_FAST
Definition:
gsm.h:51
GSM_OPT_WAV49
#define GSM_OPT_WAV49
Definition:
gsm.h:53
GSM_OPT_LTP_CUT
#define GSM_OPT_LTP_CUT
Definition:
gsm.h:52
P3
int gsm_option P3((r, opt, val), gsm r, int opt, int *val)
Definition:
gsm_option.c:14
proto.h
gsm_state
Definition:
codecs/gsm/inc/private.h:18
gsm_state::fast
char fast
Definition:
codecs/gsm/inc/private.h:36
gsm_state::ltp_cut
word ltp_cut
Definition:
codecs/gsm/inc/private.h:30
gsm_state::frame_chain
unsigned char frame_chain
Definition:
codecs/gsm/inc/private.h:40
gsm_state::verbose
char verbose
Definition:
codecs/gsm/inc/private.h:35
gsm_state::frame_index
unsigned char frame_index
Definition:
codecs/gsm/inc/private.h:39
gsm_state::wav_fmt
char wav_fmt
Definition:
codecs/gsm/inc/private.h:38
val
Definition:
ast_expr2.c:325
Generated on Wed Dec 18 2024 20:04:15 for Asterisk - The Open Source Telephony Project by
1.9.4