GSM_PRINT(3)
β¨ GSM_PRINT(3) β¨
okay bestie so this is a page from the Library Functions Manual, and it's all about gsm_print β the GSM 06.10 supplementary function for debugging. yes it's a real manual page and yes it slays π
πΈ NAME πΈ
gsm_print β GSM 06.10 supplementary function for debugging πβ¨
π SYNOPSIS π
#include "gsm.h"
#include <stdio.h>
int gsm_print(f, g, frame);
FILE * f;
gsm g;
gsm_frame frame;
like. the vibes are immaculate and the signature is right there, no cap π
π¦ DESCRIPTION π¦
So gsm is an implementation of the final draft GSM 06.10 standard for full-rate speech transcoding β which is, lowkey, a lossy speech compression algorithm π like it literally throws bits away on purpose and that's the whole point.
The compressed form? It involves 76 variables with different numbers of significant bits, all packed into 33 bytes. 76 things. 33 bytes. the math is mathing and honestly it's giving chaos πβ¨
So if you're the type of main character who wants to investigate the details of this coding scheme (iconic behavior), gsm_print() is your girl: it dumps the contents of individual gsm_frames to a file pointer provided by the application. you bring the FILE *, it brings the tea βπ
β RETURN VALUE β
gsm_print()returns-1if the frame is invalid π- otherwise it returns
0π«Ά
that's it that's the whole vibe check β
π EXAMPLE π
a single frame looks like this, and ngl it's kind of a masterpiece:
LARc: 29 32 20 11 08 05 06 07
#1: Nc 0040 bc 0 Mc 1 xmaxc 60
06 04 00 03 03 06 04 02 02 04 05 04 01
#2: Nc 0045 bc 1 Mc 1 xmaxc 48
03 07 01 03 04 04 07 01 03 02 04 05 03
#3: Nc 0091 bc 1 Mc 1 xmaxc 46
00 03 03 07 01 06 02 04 05 03 03 02 04
#4: Nc 0120 bc 0 Mc 1 xmaxc 47
07 03 06 00 03 03 06 05 00 03 02 07 04
look at those numbers go π§β¨ ate and left no crumbs
π BUGS π
found a bug? do not come for me, come for the actual humans π please direct bug reports to:
jutta@pobox.comcabo@tzi.org
π SEE ALSO π
go read those too, iykyk ππ
and that's the whole page bestie!! it lives in the Library Functions Manual as GSM_PRINT(3) and that's the whole sign-off ππ«Ά stay compressed, stay lossy, stay iconic πβ¨πΈ
π¦ where this page comes from
- alpine 3.22: gsm-doc 1.0.22-r3 Β· TU-Berlin-2.0
- alpine 3.23: gsm-doc 1.0.23-r0 Β· TU-Berlin-2.0
- alpine 3.24: gsm-doc 1.0.23-r0 Β· TU-Berlin-2.0
- arch rolling: gsm 1.0.24-1 Β· custom
- centos-stream 10: gsm-devel 1.0.22-8.el10 Β· tu-berlin-2.0
- centos-stream 9: gsm-devel 1.0.19-6.el9 Β· MIT
- centos-stream 9: gsm-devel 1.0.19-6.el9 Β· MIT
- fedora 43: gsm-devel 1.0.23-1.fc43 Β· tu-berlin-2.0
- fedora 43: gsm-devel 1.0.23-1.fc43 Β· tu-berlin-2.0
- fedora 44: gsm-devel 1.0.24-2.fc44 Β· tu-berlin-2.0
- fedora 44: gsm-devel 1.0.24-2.fc44 Β· tu-berlin-2.0
- nixos 26.05: gsm 1.0.24
- nixpkgs unstable: gsm 1.0.24
- opensuse-leap 16.0: libgsm-devel 1.0.22-160000.3.2 Β· ISC
- opensuse-leap 16.0: libgsm-devel 1.0.22-160000.3.2 Β· ISC
- opensuse-leap 16.0: libgsm-devel 1.0.22-160000.3.2 Β· ISC
- opensuse-leap 16.0: libgsm-devel 1.0.22-160000.3.2 Β· ISC
- Copyright 1992 by Jutta Degener and Carsten Bormann, Technische
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms