ws-cleanup: consistency (lower-case tags, WAVE channel order, loops = play count, Err messages, caps)

- Audio tags keys are lower case everywhere (Types.Tags): FLAC no longer returns TITLE / ARTIST (the raw fields stay
  in meta.source.comments; also for Vorbis and Opus); Vorbis / Opus / FLAC read and write tags through
  codecs/VorbisComment (TRACKNUMBER -> track, DISCNUMBER -> disc, DESCRIPTION -> comment); MP3 albumArtist ->
  albumartist and year -> date (ID3 TYER / TDRC, ID3v1); RIFF INFO / CAF / MP4 freeform names are lower-cased (MP4
  writes iTunSMPB / iTunNORM back in their usual spelling; m4a reads tags.itunsmpb).
- Channel order: Vorbis (and Opus mapping family 1) decode to WAVE order like FLAC / WAV / AAC (both used to return
  the Vorbis order); the Vorbis encoder takes WAVE order and writes Vorbis order. Pcm.WAVE_FROM_VORBIS / Pcm.reorder;
  Vorbis.packetDecoder gives pd.order. Tests reorder oggdec's / opusdec's raw (Vorbis-order) references.
- img.loops is the play count in GIF, APNG and WebP (they already agreed; Types / WebP docs said "loop count");
  tests/api round-trips loops 0 / 1 / 3 through all three.
- Err: messages without the format name (png / midi encoders said "png encode: ..."); codecs/Bzip2 and codecs/Zstd
  check arguments through Bytes.span.
- caps: mp3 encodeLayers = { 2, 3 }, opus encodeChannels = 2.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
This commit is contained in:
4DBugandClaude Opus 5.5 committed 2026-10-31 11:01:22 -05:00
1 parent 8158acf3d5
commit fb2dd98db2
27 files changed
+164 -170

No files matched your search

+3 -3
View File
@@ -344,7 +344,7 @@ do
eq(tg.title, "Test Title", "fixture title")
eq(tg.artist, "Some Artist", "fixture artist")
eq(tg.album, "An Album", "fixture album")
eq(tg.year, "2001", "fixture year")
eq(tg.date, "2001", "fixture year")
eq(tg.track, "7", "fixture track")
eq(tg.genre, "Rock", "fixture genre")
eq(tg.comment, "hello", "fixture comment")
@@ -405,7 +405,7 @@ do
eq(dec.tags.title, "Ünïcödé ★ title", "v2.4 title")
eq(dec.tags.artist, "One / Two", "v2.4 multi-value")
eq(dec.tags.genre, "Rock", "v2.4 genre")
eq(dec.tags.year, "1999-05-01", "v2.4 TDRC")
eq(dec.tags.date, "1999-05-01", "v2.4 TDRC")
eq(dec.tags.comment, "a comment", "v2.4 COMM")
sameAudio(dec, "v2.4")
t:check(Mp3.sniff(Bytes.reader(withAudio(tag))) >= 0.7, "sniff behind an ID3v2 tag")
@@ -453,7 +453,7 @@ do
eq(dec.tags.title, "V1 Title", "v1 title")
eq(dec.tags.artist, "V1 Artist", "v1 artist")
eq(dec.tags.album, "V1 Album", "v1 album")
eq(dec.tags.year, "1987", "v1 year")
eq(dec.tags.date, "1987", "v1 year")
eq(dec.tags.comment, "v1 comment", "v1 comment")
eq(dec.tags.track, "9", "v1.1 track")
eq(dec.tags.genre, "Rock", "v1 genre")