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.
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.
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_
functionThis way, we don't skip over the pre_load/post_load functions.