Александр Фролов > Audio-GSM-0.03 > Audio::GSM

Download:
Audio-GSM-0.03.tar.gz

Dependencies

Annotate this POD

View/Report Bugs
Module Version: 0.03   Source   Latest Release: Audio-GSM-0.04

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 frame. PCMDATA is 320 bytes length portion of 16-bit mono PCM data.

Return value is 32 or 33 bytes length GSM frame. Short (32 bytes) frames are null-padded. See gsm(3).

$gsm->decode(GSMDATA)

Decodes GSM frame and returns PCM data. GSMDATA is 33 bytes length GSM frame.

Return value is 320 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>

syntax highlighting: