libgme / game-music-emu

Blargg's video game music emulation library, which allows audio applications to easily add playback support for the music of many classic video game consoles.
GNU Lesser General Public License v2.1
59 stars 12 forks source link

WIP: Improved handling of RSN files #56

Closed myQwil closed 8 months ago

myQwil commented 9 months ago

Spc_Emu.cpp: move RSN logic to rsn_unpack()

The previous approach relied too heavily on the rsn file layout being the same for every rsn, whereas this new approach is slightly more flexible. It should now be able to handle non-spc files appearing midway through the unpacking process.

Space is first reserved for the rsn archive in its entirety, then after copying only spc files/headers to the buffer, any excess space is freed.

Gme_File.cpp: check if emu is archive in load_file()

For the C interface when calling gme_load_file().

Gme_File.cpp: add a protected load_archive_ function

This way, we don't skip over the pre_load/post_load functions.

Wohlstand commented 9 months ago

Please rebase your changes to the latest state, there are CI probmels had been fixed.

myQwil commented 8 months ago

Closing this PR with #74 acting as its replacement.