Audio::GSM - Perl extension for libgsm
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);
Audio::GSM is an OO wrapper for libgsm.
$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.
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
gsm(3), gsm_option(3)
Alexander Frolov, <froller@froller.net>
To install Audio::GSM, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Audio::GSM
CPAN shell
perl -MCPAN -e shell install Audio::GSM
For more information on module installation, please visit the detailed CPAN module installation guide.