Repository navigation
GME: Read per-track playlists of NEZplug rips - #557
Merged
Merged
Conversation
Playlists for GBS rips, as NEZplug defined them and Zophar's packs ship them, number tracks from 0, the same as KSS. libgme took them as 1-based, so every entry played the song before the one it names, and the first entry pointed before the first song and played nothing.
A file can come with others it needs, such as playlists beside it. Add an optional filesBesideURL: to CogSource, which FileSource answers by listing the folder, with the sandbox access it already takes care of.
GBS, NSF and similar rips made for NEZplug often come with one playlist
per track ("01 Title.m3u" holding "Game.gbs::GBS,12,Title,0:04,,1")
rather than one named after the file. Only that one was read, so such a
rip listed its raw subsongs, all with the default length. When there is
no playlist named after the file, gather the lines that name it from the
playlists beside it, in Finder order, so the tracks get their order,
titles, lengths and fades.
The container, decoder and metadata reader share the loading, so all
three see the same tracks.
Contributor
Author
|
There might have been a reason for GBS to be flagged the same as KSS, but I couldn't find it |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
I've been getting Game Boy soundtracks from https://www.zophar.net/music (Castlevania: The Adventure, Belmont's Revenge and Legends, among others). Each one is a zip with the GBS and an m3u per track, each holding a single line like
DMG-CVJ.gbs::GBS,12,Start BGM,0:04,,1. After unzipping one and dropping the folder into Cog, I got every song of the GBS in the file's own order, all with the same length and titled after the file, so it was hard to tell what was what. And the songs that were in the m3us played the wrong song.Two things were behind it:
DMG-CVJ.m3uhere), so per-track playlists were never read. When there is none, it now gathers the lines naming the file from the playlists beside it, in Finder order. To list the folder, sources get an optionalfilesBesideURL:, which FileSource implements, so the sandbox handling stays where it already is.Tested with a Debug build: the unzipped rips list every track in the playlists' order with its title, length and fade.
I'll open a second PR for the zips themselves, which still add a single entry.