propose Mix_LoadMUS_RW Add end point
Add length support instead of the entire file
https://github.com/libsdl-org/SDL_mixer/blob/4d2fec78b8deca24ce6c7f7a9e3725cf31f75896/src/codecs/mp3utils.c#L40
pack{ 1.mp3 2.mp3 3.mp3 } SDL_RWseek(2.mp3) It won’t stop after playing 2.mp3 Sorry, I do not speak English, this is from Google Translate.
One way of doing it is that you use Mix_LoadMUS_RW and the RW is generated
using SDL_RWFromConstMem where size is known.
Other than that, what you request requires support from SDL with some new RW procedure where the size is passed to SDL. @icculus, @slouken?
My mp3 file package is in a large file, so I can only use SDL_RWFromFile
My mp3 file package is in a large file, so I can only use SDL_RWFromFile
What I meant is: If your mp3 files are not large, then you can read them into memory and use SDL_RWFromConstMem with that memory buffer. But if the mp3s are really large, sorry, I don't know any other way myself.
You would have to create a custom RWops stream that seeks within the correct range and returns end of file outside of that range. There currently isn't a built-in RWops that provides a view into part of a file.