GSM_OPTION(3)

NAME
gsm_option — customizing the GSM 06.10 implementation

SYNOPSIS
#include "gsm.h"

int gsm_option(handle, option, valueP);
gsm handle;
int option;
int * valueP;

DESCRIPTION
The gsm library is an implementation of the final draft GSM 06.10 standard for full-rate speech transcoding, a lossy speech compression algorithm.

The gsm_option() function can be used to set and query various options or flags that are not needed for regular GSM 06.10 encoding or decoding, but might be of interest in special cases.

The second argument to gsm_option specifies what parameter should be changed or queried. The third argument is either a null pointer, in which case the current value of that parameter is returned; or it is a pointer to an integer containing the value you want to set, in which case the previous value will be returned.

The following options are currently defined:

GSM_OPT_VERBOSE Verbosity level.
This option is only supported if the library was compiled with debugging turned on, and may be used by developers of compression algorithms to aid debugging.
The verbosity level can be changed at any time during encoding or decoding.

GSM_OPT_FAST Faster compression algorithm.
This implementation offers a not strictly standard-compliant, but faster compression algorithm that is compatible with the regular method and does not noticably degrade audio quality.
The value passed to
	gsm_option(handle, GSM_OPT_FAST, & value)
functions as a boolean flag; if it is zero, the regular algorithm will be used, if not, the faster version will be used.
The availability of this option depends on the hardware used; if it is not available, gsm_option will return -1 on an attempt to set or query it.
This option can be set any time during encoding or decoding.

GSM_OPT_LTP_CUT Enable, disable, or query the LTP cut-off optimization.
During encoding, the search for the long-term correlation lag forms the bottleneck of the algorithm. The ltp-cut option enables an approximation that disregards most of the samples for purposes of finding that correlation, and hence speeds up the encoding at a noticable loss in quality.
The value passed to
	gsm_option(handle, GSM_OPT_LTP_CUT, & value)
turns the optimization on if nonzero, and off if zero.
This option can be set any time during encoding or decoding; it will only affect the encoding pass, not the decoding.

RETURN VALUE
gsm_option() returns -1 if an option is not supported, the previous value of the option otherwise.

BUGS
Please direct bug reports to jutta@cs.tu-berlin.de and cabo@cs.tu-berlin.de.

SEE ALSO
toast(1), gsm(3), gsm_explode(3), gsm_print(3)