Repository navigation
v0.0.9
Breaking: import paths. The codecs and containers now sit under their family, as Odin's core:image/png does. Package names are unchanged, so only the import paths change:
| Before | Now |
|---|---|
odecs/aac, alac, flac, mp3, opus, vorbis, wav |
odecs/audio/aac, audio/alac, audio/flac, audio/mp3, audio/opus, audio/vorbis, audio/wav |
odecs/bmp, gif, jpeg, webp, png/encoder |
odecs/image/bmp, image/gif, image/jpeg, image/webp, image/png/encoder |
odecs/h264, h265, vp9, av1, prores |
odecs/video/h264, video/h265, video/vp9, video/av1, video/prores |
odecs/mp4, webm, ogg |
odecs/container/mp4, container/webm, container/ogg |
Subpackages move with them: for example, odecs/h264/decoder is now odecs/video/h264/decoder and odecs/aac/encoder is now odecs/audio/aac/encoder. These stay where they were: audio, image, video, media (and media/native, media/vulkan, media/videotoolbox), common, shaders, tools, viewer and demo.
Audio no longer links video (reported by ottis). audio decodes through its own audio.Decoder, which is the one implementation of AAC, FLAC, MP3, Opus, ALAC and Vorbis packet decoding. media's native provider delegates to it. An audio-only program decoding Vorbis now has 863 KB of text, down from 3.31 MB on v0.0.8. It contains no video symbols and needs no video codec's licence notice. CI has a new layers gate: audio reaches no media, video or image package, and image reaches no audio, video, media or container package.
Audio additions (asked for by odawg):
i16as well asf32.audio.read(&r, out)takes[]f32or[]i16.audio.decode_into(data, out, channels)fills a caller's buffer of either type, sized frominfo.- WAV and FLAC reads are bit-identical to
wav.readandflac.interleavein both types. - The lossy codecs round their
f32withcommon.to_i16.
- A channel limit.
open,open_stream,decodeanddecode_intotakechannels = N, which keeps the first N channels in WAVE order.Reader.keptgives the count that reads return. Info.loopis aMaybe(audio.Loop).Loopholds{start, end}in frames, withendexclusive. It comes from:- WAV's first
smplloop, which is end-inclusive, soendhere is one past it; - a FLAC file's
APPLICATION "riff"smplchunk; LOOPSTART/LOOPLENGTHVorbis comments, in Ogg Vorbis, Ogg Opus and FLAC.
- WAV's first
- WAV writing:
wav.header_into(dst, frames, rate, channels, format)andwav.HEADER_SIZEgive the 44-byte header alone, for writers that stream their own samples.wav.smpl_loopparses asmplchunk body.
f32 output is unchanged: it is byte-identical on 100 fixture files. The wav, flac, mp3, opus, mkv, alpha, mp4 and vorbis gates pass, and so do the image and WebP gates after the move. Every package checks under vet, and every package's tests pass.