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.
This PR works around
miniaudio
's file name hashing which causes the following issues:When multiple files are extracted (e.g., from a game data archive) into the same temporary file (e.g.,
temp.wav
) and loaded sequentially, all files are resolved to the first-loaded sound due to the static file name.The MIDI file decoder allows user-defined SoundFonts (
.sf2
). However, reloading the same MIDI file with a different SoundFont causes a conflict due to file name hashing. For example: If MIDI fileA.mid
is loaded with SoundFontA.sf2
and later withB.sf2
, playback defaults to the first-loaded SoundFont (A.sf2
), even ifB.sf2
is specified.Additionally,
_MEMSOUND
now works correctly with fully decodedMEMORY
sounds, expanding its functionality.Quality of life improvements:
Special thanks to @mkilgore for proposing the workaround and providing the original implementation.