AFINITFILEFORMAT(3)
β¨ AFINITFILEFORMAT(3) β¨
okay bestie, sit down, hydrate, because we're talking about afInitFileFormat π β it lives in section 3 of the manual (that's the library-calls section, iykyk), and it is literally the glow-up your audio file setup has been waiting for.
πΈ NAME πΈ
afInitFileFormat β initialize file format of an audio file setup π
π¦ SYNOPSIS π¦
#include <audiofile.h>
void afInitFileFormat(AFfilesetup setup, int fileFormat);
π PARAMETERS π
setupβ a valid file setup created byafNewFileSetup(3). like, it has to be valid, bestie, don't come at it with a fake one πfileFormatβ an integer constant specifying a file format. yes, an integer constant. we'll get to the whole list in a sec π«Ά
π DESCRIPTION π
So here's the tea β β you've got an AFfilesetup structure, right? And you made it with afNewFileSetup(3), iconic. Now you hand it to afInitFileFormat, and it initializes the file format to whatever fileFormat you passed in. That's it. That's the whole job. Main character behavior honestly. π
Here are the file formats that are currently supported β every single one, no skips, no cap:
AF_FILE_RAWDATAβ raw audio dataAF_FILE_AIFFβ Audio Interchange File FormatAF_FILE_AIFFCβ Audio Interchange File Format AIFF-CAF_FILE_NEXTSNDβ NeXT.snd/Sun.auAF_FILE_WAVEβ Microsoft RIFF WAVEAF_FILE_BICSFβ Berkeley/IRCAM/CARL Sound FileAF_FILE_AVRβ Audio Visual ResearchAF_FILE_IFF_8SVXβ Amiga IFF/8SVXAF_FILE_SAMPLEVISIONβ Sample VisionAF_FILE_VOCβ Creative Voice FileAF_FILE_NIST_SPHEREβ NIST SPHEREAF_FILE_CAFβ Core Audio Format
a whole buffet of formats, fr fr πβ¨
π ERRORS π
ngl, afInitFileFormat can produce the following errors, and when it does, it's giving drama:
AF_BAD_FILESETUPβsetuprepresents an invalid file setup. (the setup said "not today" π)AF_BAD_FILEFMTβfileFormatrepresents an unknown file format. (who is she? we don't know her π)AF_BAD_NOT_IMPLEMENTEDβfileFormatrepresents a file format which is not currently implemented. (vibe's real, the code isn't π)
bestie, if you see one of these, don't panic β just check which of the three it is and fix accordingly π«Ά
π SEE ALSO π
afNewFileSetup(3)β the origin story, the prequel, the one that madesetupin the first place π§
π AUTHOR π
Michael Pruett <michael@68k.org> β the legend, the moment, the actual author π
Audio File Library 0.3.6 β dated 03/06/2013 β and that's the whole page, bestie! you ate that. periodt. π β¨π¦πΈπ
π¦ 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