commit: ad4e4ee4e4bc53c6ce7aef369d597b6a81c8f8b2
parent 95fc9cde4ca17edfeba2463212ba7fe30c84d25d
Author: Haelwenn (lanodan) Monnier <contact@hacktivis.me>
Date: Fri, 12 Mar 2021 16:05:43 +0100
man5x/au.5x: Enhance with documentation from Sun
Diffstat:
1 file changed, 28 insertions(+), 12 deletions(-)
diff --git a/man5x/au.5x b/man5x/au.5x
@@ -15,21 +15,24 @@ which is an attempt to provide documentation of similarities and (noteworthy) di
.Nm
is a simple Audio Format that came from Sun/NeXT, it is widely supported on Unix systems.
.Ss Header
-Each field are 32-bits big-endian integers.
+All fields are 32-bits (so 4 octets) unsigned big-endian integers.
.Bl -tag -width Ds
-.It Magic-signature
-".snd" (0x2E736E64)
-.It Offset
-number of bytes the header contains
-.It Lenght
-0 or 0xFFFFFFFF for undefined
-.It Encoding
+.It magic
+Always equal to 0x2E736E64 (".snd")
+.It header size
+number of octets the header contains; 24 if no further info was added
+.It data size
+number of octets the data contains; 0 or 0xFFFFFFFF for undefined
+.It encoding
refer to codecs section
-.It Sample rate
-in Hz
-.It Channels
-1 for mono, 2 for stereo, ...
+.It sample rate
+number of samples per seconds (aka Hz). Common ones are 8000, 11025, 16000, 22050, 32000, 44100, and 48000 Hz.
+.It channels
+Number of interleaved channels. 1 for mono, 2 for stereo, ...
.El
+.Pp
+You may append information after the header in multiple of 8 octets that is terminated and filled with NULL octets.
+Pure ASCII is the strongly suggested usage but it seen as implementation defined.
.Ss Codecs
.Bl -tag -width Ds
.It 01
@@ -46,15 +49,28 @@ unsigned 8-bit linear PCM
32-bit IEEE floating point
.It 07
64-bit IEEE floating point
+.It 23
+4-bit CCITT G.721 ADPCM
+.It 25
+CCITT G.723 3-bit ADPCM
.It 27
8-bit G.711 A-law
.El
+.Pp
+Note: Linear PCM data is signed and zero-centered.
.Sh SOURCE
.Bl -bullet -compact
.It
.Lk https://code.9front.org/hg/plan9front/file/default/sys/src/cmd/audio/sundec 9front's /sys/src/cmd/audio/sundec
.It
.Lk https://wiki.multimedia.cx/index.php/Au/snd Au/snd - MultimediaWiki
+.It
+.Lk https://pubs.opengroup.org/external/auformat.html AU - Audio File Format © Sun Microsystems 1992
+.It
+.Xr audio_filehdr 3 ,
+.Xr audio_hdr 3
+.It
+.Lk https://docs.python.org/3/library/sunau.html Python3 sunau module documentation
.El
.Sh AUTHORS
.An Haelwenn (lanodan) Monnier Aq Mt contact+c-u-d@hacktivis.me