| 1 |
.\" |
| 2 |
.\" Copyright 1992-1995 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 |
.PU |
| 7 |
.TH GSM_OPTION 3 |
| 8 |
.SH NAME |
| 9 |
gsm_option \(em customizing the GSM 06.10 implementation |
| 10 |
.SH SYNOPSIS |
| 11 |
#include "gsm.h" |
| 12 |
.PP |
| 13 |
int gsm_option(handle, option, valueP); |
| 14 |
.br |
| 15 |
gsm handle; |
| 16 |
.br |
| 17 |
int option; |
| 18 |
.br |
| 19 |
int * valueP; |
| 20 |
.SH "DESCRIPTION" |
| 21 |
The gsm library is an implementation of the final draft GSM 06.10 |
| 22 |
standard for full-rate speech transcoding, a lossy |
| 23 |
speech compression algorithm. |
| 24 |
.PP |
| 25 |
The gsm_option() function can be used to set and query various |
| 26 |
options or flags that are not needed for regular GSM 06.10 encoding |
| 27 |
or decoding, but might be of interest in special cases. |
| 28 |
.PP |
| 29 |
The second argument to gsm_option specifies what parameter |
| 30 |
should be changed or queried. |
| 31 |
The third argument is either a null pointer, in which case |
| 32 |
the current value of that parameter is returned; |
| 33 |
or it is a pointer to an integer containing the value |
| 34 |
you want to set, in which case the previous value will |
| 35 |
be returned. |
| 36 |
.PP |
| 37 |
The following options are currently defined: |
| 38 |
.PP |
| 39 |
.I GSM_OPT_VERBOSE |
| 40 |
Verbosity level. |
| 41 |
.br |
| 42 |
.in+5 |
| 43 |
This option is only supported if the library was compiled |
| 44 |
with debugging turned on, and may be used by developers of |
| 45 |
compression algorithms to aid debugging. |
| 46 |
.br |
| 47 |
The verbosity level can be changed at any time during encoding or decoding. |
| 48 |
.in-5 |
| 49 |
.sp |
| 50 |
.I GSM_OPT_FAST |
| 51 |
Faster compression algorithm. |
| 52 |
.br |
| 53 |
.in+5 |
| 54 |
This implementation offers a not strictly standard-compliant, but |
| 55 |
faster compression algorithm that is compatible with the regular |
| 56 |
method and does not noticably degrade audio quality. |
| 57 |
.br |
| 58 |
The value passed to |
| 59 |
.br |
| 60 |
.nf |
| 61 |
gsm_option(handle, GSM_OPT_FAST, & value) |
| 62 |
.fi |
| 63 |
.br |
| 64 |
functions as a boolean flag; if it is zero, the regular algorithm |
| 65 |
will be used, if not, the faster version will be used. |
| 66 |
.br |
| 67 |
The availability of this option depends on the hardware used; |
| 68 |
if it is not available, gsm_option will return -1 on an attempt |
| 69 |
to set or query it. |
| 70 |
.br |
| 71 |
This option can be set any time during encoding or decoding. |
| 72 |
.in-5 |
| 73 |
.ne 5 |
| 74 |
.sp |
| 75 |
.PP |
| 76 |
.I GSM_OPT_LTP_CUT |
| 77 |
Enable, disable, or query the LTP cut-off optimization. |
| 78 |
.br |
| 79 |
.in+5 |
| 80 |
During encoding, the search for the long-term correlation |
| 81 |
lag forms the bottleneck of the algorithm. |
| 82 |
The ltp-cut option enables an approximation that disregards most |
| 83 |
of the samples for purposes of finding that correlation, |
| 84 |
and hence speeds up the encoding at a noticable loss in quality. |
| 85 |
.br |
| 86 |
The value passed to |
| 87 |
.br |
| 88 |
.nf |
| 89 |
gsm_option(handle, GSM_OPT_LTP_CUT, & value) |
| 90 |
.fi |
| 91 |
.br |
| 92 |
turns the optimization on if nonzero, and off if zero. |
| 93 |
.br |
| 94 |
This option can be set any time during encoding |
| 95 |
or decoding; it will only affect the encoding pass, not |
| 96 |
the decoding. |
| 97 |
.SH "RETURN VALUE" |
| 98 |
gsm_option() returns -1 if an option is not supported, the |
| 99 |
previous value of the option otherwise. |
| 100 |
.SH BUGS |
| 101 |
Please direct bug reports to [email protected] and [email protected]. |
| 102 |
.SH "SEE ALSO" |
| 103 |
toast(1), gsm(3), gsm_explode(3), gsm_print(3) |