AFREADMISC(3)
β¨ AFREADMISC(3) β¨
okay bestie, sit down, hydrate, and let me tell you about afReadMisc, afWriteMisc, and afSeekMisc β three little functions from the Audio File Library that let you poke at the miscellaneous metadata hiding inside an audio file. it's giving backstage pass energy π
π NAME π
afReadMisc, afWriteMisc, afSeekMisc β your trio for accessing miscellaneous metadata in an audio file π¦
πΈ SYNOPSIS πΈ
#include <audiofile.h>
int afReadMisc (AFfilehandle file, int miscid, void *buffer, int nbytes);
int afWriteMisc (AFfilehandle file, int miscid, const void *buffer, int nbytes);
int afSeekMisc (AFfilehandle file, int miscid, int offbytes);
literally just three lines and you're in. no cap. β¨
π«Ά DESCRIPTION π«Ά
afReadMisc reads up to nbytes from the miscellaneous data chunk identified by miscid in file. it's the "gimme the tea" of functions π
afWriteMisc writes up to nbytes to the miscellaneous data chunk identified by miscid in file. putting your own little secrets in there, iconic π
afSeekMisc changes the current offset within the miscellaneous data chunk identified by miscid to the offset offbytes. it's the "okay but actually let's look over here" move π
β RETURN VALUE β
afReadMiscreturns the number of bytes read from the specified miscellaneous chunk into the buffer referred to bybuffer. πafWriteMiscreturns the number of bytes written to the specified miscellaneous chunk from the buffer referred to bybuffer. πafSeekMiscreturns the new location of the logical data pointer, measured as an offset in bytes from the beginning of the miscellaneous chunk's data area. π¦
so like, always check the return value bestie, don't just vibe and assume π
π ERRORS π
afReadMisc, afWriteMisc, and afSeekMisc can produce the following error codes:
AF_BAD_READAF_BAD_WRITEAF_BAD_MISCSEEKAF_BAD_MISCIDAF_BAD_TRACKIDAF_BAD_FILEHANDLE
if you see one of these, something is lowkey not okay β the read, the write, the seek, the misc id, the track id, or the file handle itself. check your args fr fr π
π AUTHOR π
Michael Pruett <michael@68k.org> β the main character who made this happen π
that's the whole page bestie, you ate that π β¨
this was Audio File Library 0.3.6, dated 03/06/2013, and yes it's still serving AFREADMISC(3) energy. mwah π«Άπ
π¦ 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