ws-audio2: music/umx (Unreal music packages): the package tables parsed, the music export's module handed to a new api hook opts.decodeModule(buf, format?)

src/Formats/init.luau: withHooks adds opts.decodeModule (F.load of the bytes as music) next to decodeImage /
openAudio, so a format never requires another; docs/API.md lists it. Backward compatible (a new optional hook).
This commit is contained in:
4DBug committed 2026-10-31 14:54:54 -05:00
1 parent 3d5cf3130e
commit 26fa887370
8 files changed
+368 -1

No files matched your search

+2
View File
@@ -84,6 +84,8 @@ A format never requires another format, so the api passes these to decoders / en
- `opts.decodeImage(buf) -> Image | nil, Err` and `opts.encodeImage(img, format) -> buffer | nil, Err`: images inside
other files (ICO PNG entries, PSD / glTF / 3MF textures, MJPEG frames, ...).
- `opts.decodeModule(buf, format?) -> Module | nil, Err`: tracker modules inside other files (the module of an Unreal
`.umx` package), loaded as music.
- `opts.openAudio(demuxer, track) -> Decoder | nil, Err`: audio tracks of video containers (wrapped by
`containers/AudioWrap` and opened as the matching audio format).
- `opts.plugins` (default `F.plugins`): injected optional dependencies, e.g. `F.plugins.brep` (a B-rep kernel for
+1
View File
@@ -86,6 +86,7 @@ is tested under both runtimes (luau `--codegen -O2` and LuaJIT through the build
| music | sf2 | .sf2 | yes | - | sm24: true, sf3: false | `tests/music/sf2.luau` |
| music | stm | .stm | yes | - | render: true, channels: 4, 4 | `tests/music/stm.luau` |
| music | ult | .ult | yes | - | render: true, channels: 1, 32 | `tests/music/ult.luau` |
| music | umx | .umx | yes | - | render: true, container: true | `tests/music/umx.luau` |
| music | xm | .xm | yes | yes | render: true, channels: 1, 64 | `tests/music/xm.luau` |
| playlist | m3u | .m3u .m3u8 | yes | yes | hls: true | `tests/playlist/m3u.luau` |
| playlist | pls | .pls | yes | yes | | `tests/playlist/pls.luau` |