GSM_EXPLODE(3)

πŸ“¦
version 1.0.24 Β· 2 versions
, in alpine 3.22, alpine 3.23, alpine 3.24, arch rolling, centos-stream 10, centos-stream 9, fedora 43, fedora 44, nixos 26.05, nixpkgs unstable, opensuse-leap 16.0

πŸ’– NAME πŸ’–

gsm_explode, gsm_implode β€” GSM 06.10 supplementary functions for testing

okay bestie, welcome to the Library Functions Manual πŸŽ€ this is the little corner of the GSM universe where the test-support girlies live. no cap, these two functions exist purely to help you verify stuff, not to ship audio out into the wild.


✨ SYNOPSIS ✨

#include "gsm.h"

void gsm_explode(g, frame, xframe)
gsm        g;
gsm_frame  frame;
gsm_signal xframe[ 76 ];

void gsm_implode(g, xframe, frame)
gsm        g;
gsm_signal xframe[ 76 ];
gsm_frame  frame;

look at that K&R-era drip πŸ’… both of them return void, so don't go looking for a return value from gsm_implode β€” it's giving nothing and that's on purpose.


πŸ¦‹ DESCRIPTION πŸ¦‹

Gsm is an implementation of the final draft GSM 06.10 standard for full-rate speech transcoding. that's the whole main character energy right there β€” full-rate speech transcoding, final draft, iconic.

Test data for implementations of this particular document can be bought and used to verify an implementation. yes literally bought. it's a whole thing. you buy the test data, you run it, you verify your implementation isn't lying to you πŸ™ˆ

here's the tea though: the encoded test data uses a format different from what one would use to transmit frames with the least number of bits. so the test-data format is not the skinny little wire format you'd actually send. two different vibes entirely.

that's exactly why these two exist. gsm_explode() and gsm_implode() convert between:

  • the internal, small, 33-byte format β€” the compact one, the itty bitty one πŸ“
  • the 76-word format used by the test data β€” the chunky one 🌸

one goes boom β†’ big, the other goes big β†’ boom. that's it. that's the function.


⭐ RETURN VALUE ⭐

gsm_explode() returns -1 if the passed frame is invalid, else 0.

so like, -1 is the "girl that frame is not it" signal πŸ’€ and 0 means we're slaying. gsm_implode() doesn't get a return value section, so don't @ me about it.


😭 BUGS 😭

found something cursed? Please direct bug reports to jutta@pobox.com and cabo@tzi.org.

fr fr send them the receipts, they want to know 🫢

🌈 SEE ALSO 🌈


and that's the whole page, bestie πŸ’œ GSM_EXPLODE(3) β€” that's the title, that's the footer, that's the whole glow-up. now go explode some frames βœ¨πŸ‘‘