Turns out the pitch was accidentally used as width, leading to an out of bounds read/write.
I kept the pitch in the struct for completeness' sake. It may be needed later, if only for error checks.
For some reason there's an internal compiler error related to atomic wait.
I could work around this issue when I commented "mask = default_mask<X>;".
So after playing around a bit I had the suspicion that the VS parser can't handle some of the templatization.
Giving the decltype its own alias seems to fix this issue (and makes the code a bit more readable anyway in my opinion).
Implements the basic functionality of cellMusicDecode.
Works with Space Invaders (if you add the list selection from the other PR).
Probably fixes SSX custom music.
Fixes listing BGM in Gundam.
The returned content was always empty.
Playback of the tracks will still require a MusicSelectionContext and cellMusic playback, which isn't implemented yet.