You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If closeio is true, the IOStream will be closed before returning, whether this function succeeds or not.
SDL_mixer reads everything it needs from the IOStream during this call in any case.
The second sentence appears misleading at best, as it seems to suggest that the buffer associated with the IO stream can be altered or freed by the user while SDL_mixer is still playing music therein. However, looking at the source code of SDL_mixer, it seems that the buffer is never actually copied internally, but simply read on the fly as the music plays. So, if I understand it correctly, the user may not free the buffer passed to the IO stream until Mix_FreeMusic is called. I think the wiki should state this explicitly.
The text was updated successfully, but these errors were encountered:
The SDL_mixer wiki page on Mix_LoadMUS_IO (https://wiki.libsdl.org/SDL3_mixer/Mix_LoadMUS_IO), as well as SDL_mixer.h, reads:
The second sentence appears misleading at best, as it seems to suggest that the buffer associated with the IO stream can be altered or freed by the user while SDL_mixer is still playing music therein. However, looking at the source code of SDL_mixer, it seems that the buffer is never actually copied internally, but simply read on the fly as the music plays. So, if I understand it correctly, the user may not free the buffer passed to the IO stream until Mix_FreeMusic is called. I think the wiki should state this explicitly.
The text was updated successfully, but these errors were encountered: