-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Don't write temporary music files to disk, use memory streams instead
Refactored the `I_SDL_RegisterSong` function to eliminate the use of temporary files written to disk. Instead, music data is now processed and loaded directly from memory using SDL_RWops. This approach improves performance and avoids potential issues with file system permissions or clutter. - Replaced temporary file creation (`M_TempFile`) with memory streams (`SDL_RWFromConstMem`). - Added support for converting MUS to MIDI entirely in memory using `mem_fopen` and `mem_get_buf`. - Updated error handling and logging for better diagnostics. - Preserves compatibility with existing workflows while removing dependency on disk operations. Thanks @JNechaevsky for suggestion.
- Loading branch information
Showing
1 changed file
with
64 additions
and
38 deletions.
There are no files selected for viewing
This file contains 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