Александр Фролов
and 1 contributors

NAME

Audio::GSM - Perl extension for libgsm

SYNOPSIS

  use Audio::GSM;
  $gsm = new Audio::GSM;
  $wav49 = $gsm->option(GSM_OPT_WAV49);
  $gsm->option(GSM_OPT_WAV49, $wav49);
  $gsmData = $gsm->encode($pcmData);
  $pcmData = $gsm->decode($gsmData);

DESCRIPTION

Audio::GSM is an OO wrapper for libgsm.

Methods

$gsm->option(OPTION, [EXPR])

    Sets the OPTION and returns its previous value if EXPR is present, returns its current value otherwise. See gsm_option(3).

$gsm->encode(PCMDATA)

    Encodes raw PCM data and returns GSM frames. PCMDATA is 640 bytes length portion of 16-bit mono PCM data.

    Return value is a pair of 32 and 33 bytes length GSM frames. See gsm(3).

$gsm->decode(GSMDATA)

    Decodes GSM frames and returns raw PCM data. GSMDATA is a pair of 32 and 33 bytes length GSM frames. See gsm(3).

    Return value is 640 bytes length portion of 16-bit mono PCM data.

Exported constants

  GSM_MAGIC
  GSM_MAJOR
  GSM_MINOR
  GSM_OPT_FAST
  GSM_OPT_FRAME_CHAIN
  GSM_OPT_FRAME_INDEX
  GSM_OPT_LTP_CUT
  GSM_OPT_VERBOSE
  GSM_OPT_WAV49
  GSM_PATCHLEVEL

SEE ALSO

gsm(3), gsm_option(3)

AUTHOR

Alexander Frolov, <froller@froller.net>