AFINITBYTEORDER(3)
π NAME π
okay so bestie, this page is afInitCompression β it initializes compression for a track in an audio file setup. that's the whole vibe. π
it lives in the Audio File Library manual, section 3, and the header up top literally reads AFINITBYTEORDER(3) β yes the title is a lil cursed and does not match the function, no cap, but the function you actually want is afInitCompression. iykyk. π
β¨ SYNOPSIS β¨
#include <audiofile.h>
void afInitCompression(AFfilesetup setup, int track, int compression);
πΈ PARAMETERS πΈ
setupβ a valid file setup, the kind you get back fromafNewFileSetup(3). that's your foundation, bestie.trackβ which track inside the audio file setup we're talking about. for all currently supported file formats,trackis alwaysAF_DEFAULT_TRACK. always. no drama.compressionβ an identifier for the compression type you want, likeAF_COMPRESSION_G711_ULAW, used for the audio data in that track.
π¦ DESCRIPTION π¦
so you've got an AFfilesetup structure that came from afNewFileSetup(3), and you've got a track identified by track (which, reminder, is AF_DEFAULT_TRACK for all currently supported file formats), and afInitCompression does exactly what it says on the tin: it initializes that track to the compression you specified. slay. π₯
here are the compression types currently supported, and yes i am listing every single one because we don't skip:
AF_COMPRESSION_NONEβ no compression at all. raw. unbothered. natural.AF_COMPRESSION_G711_ULAWβ CCITT G.711 mu-law encodingAF_COMPRESSION_G711_ALAWβ CCITT G.711 A-law encodingAF_COMPRESSION_IMAβ IMA ADPCM encodingAF_COMPRESSION_MS_ADPCMβ MS ADPCM encodingAF_COMPRESSION_FLACβ FLACAF_COMPRESSION_ALACβ Apple Lossless Audio Codec
π ERRORS π
afInitCompression can produce the following errors, and when it does, it's giving "read the error code, bestie":
AF_BAD_FILESETUPβsetuprepresents an invalid file setup. πAF_BAD_TRACKIDβtrackrepresents an invalid track identifier.AF_BAD_COMPTYPEβcompressionrepresents an invalid compression type. π
π SEE ALSO π
π AUTHOR π
Michael Pruester... no wait, Michael Pruett <michael@68k.org> π
and that's the whole page, bestie. this one came out of the Audio File Library 0.3.6, dated 03/06/2013 β iconic behavior honestly, periodt. go forth and compress. π«Άβ¨
π¦ where this page comes from
- alpine 3.24: audiofile-doc 0.3.6-r3 Β· LGPL-2.1-or-later
- arch rolling: audiofile 0.3.6-12 Β· Apache-2.0 AND GPL-2.0-or-later AND LGPL-2.1-or-later
- debian bookworm: libaudiofile-dev 0.3.6-5+deb12u1 Β· LGPL-2.1-or-later
- debian trixie: libaudiofile-dev 0.3.6-7+b1 Β· LGPL-2.1-or-later
- epel 10: audiofile-devel 1:0.3.6-44.el10_2 Β· LGPL-2.1-or-later and GPL-2.0-or-later
- epel 9: audiofile-devel 1:0.3.6-36.el9 Β· LGPL-2.1-or-later and GPL-2.0-or-later
- fedora 43: audiofile-devel 1:0.3.6-42.fc43 Β· LGPL-2.1-or-later and GPL-2.0-or-later
- fedora 43: audiofile-devel 1:0.3.6-42.fc43 Β· LGPL-2.1-or-later and GPL-2.0-or-later
- fedora 44: audiofile-devel 1:0.3.6-44.fc44 Β· LGPL-2.1-or-later and GPL-2.0-or-later
- fedora 44: audiofile-devel 1:0.3.6-44.fc44 Β· LGPL-2.1-or-later and GPL-2.0-or-later
- nixpkgs unstable: audiofile 0.3.6
- opensuse-leap 16.0: audiofile-doc 0.3.6-bp160.1.13 Β· GPL-2.0-or-later AND LGPL-2.1-or-later
- opensuse-leap 16.0: audiofile-doc 0.3.6-bp160.1.13 Β· GPL-2.0-or-later AND LGPL-2.1-or-later
- opensuse-leap 16.0: audiofile-doc 0.3.6-bp160.1.13 Β· GPL-2.0-or-later AND LGPL-2.1-or-later
- opensuse-leap 16.0: audiofile-doc 0.3.6-bp160.1.13 Β· GPL-2.0-or-later AND LGPL-2.1-or-later
- ubuntu jammy: libaudiofile-dev 0.3.6-5+deb10u1build0.22.04.1 Β· LGPL-2.1-or-later
- ubuntu jammy: libaudiofile-dev 0.3.6-5build1 Β· LGPL-2.1-or-later
- ubuntu noble: libaudiofile-dev 0.3.6-6build2 Β· LGPL-2.1-or-later
- ubuntu questing: libaudiofile-dev 0.3.6-7build1
- ubuntu resolute: libaudiofile-dev 0.3.6-7build2 Β· LGPL-2.1-or-later
- ubuntu stonking: libaudiofile-dev 0.3.6-7build2 Β· LGPL-2.1-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms