-
Notifications
You must be signed in to change notification settings - Fork 155
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Updated for the SDL3 RW -> IO changes #598
Conversation
All music_wavpack.c has freesrc2 along with freesrc: freesrc2 needs changing to closeio2 music_flac.c has typos / copy/paste mistakes:
stb_vorbis.h has helper procedure names with native_midi_haiku.cpp not updated native_midi_macosx.c has There may be more.. |
Thanks for the review. I fixed the things you found and did one last look around and I think you caught everything. It looks like CI is succeeding, can you take one last look as a sanity check? |
Final nits below. (If you have a better cmdline switch replacement for -rwops of playmus, be my guest) diff --git a/examples/playmus.c b/examples/playmus.c
index aebf9e5..0f66317 100644
--- a/examples/playmus.c
+++ b/examples/playmus.c
@@ -65,3 +65,3 @@ static void Usage(char *argv0)
{
- SDL_Log("Usage: %s [-i] [-l] [-8] [-f32] [-r rate] [-c channels] [-b buffers] [-v N] [-rwops] <musicfile>\n", argv0);
+ SDL_Log("Usage: %s [-i] [-l] [-8] [-f32] [-r rate] [-c channels] [-b buffers] [-v N] [-iostr] <musicfile>\n", argv0);
}
@@ -117,3 +117,3 @@ int main(int argc, char *argv[])
int interactive = 0;
- int rwops = 0;
+ int iostr = 0;
int i;
@@ -167,4 +167,4 @@ int main(int argc, char *argv[])
} else
- if (SDL_strcmp(argv[i], "-rwops") == 0) {
- rwops = 1;
+ if (SDL_strcmp(argv[i], "-iostr") == 0) {
+ iostr = 1;
} else {
@@ -213,3 +213,3 @@ int main(int argc, char *argv[])
/* Load the requested music file */
- if (rwops) {
+ if (iostr) {
music = Mix_LoadMUS_IO(SDL_IOFromFile(argv[i], "rb"), SDL_TRUE);
diff --git a/include/SDL3_mixer/SDL_mixer.h b/include/SDL3_mixer/SDL_mixer.h
index b7ece3e..9989d20 100644
--- a/include/SDL3_mixer/SDL_mixer.h
+++ b/include/SDL3_mixer/SDL_mixer.h
@@ -402,5 +402,5 @@ extern DECLSPEC int SDLCALL Mix_AllocateChannels(int numchans);
*
- * If `closeio` is SDL_TRUE, the RWops will be closed before returning,
+ * If `closeio` is SDL_TRUE, the IOStream will be closed before returning,
* whether this function succeeds or not. SDL_mixer reads everything it needs
- * from the RWops during this call in any case.
+ * from the IOStream during this call in any case.
*
@@ -451,3 +451,3 @@ extern DECLSPEC Mix_Chunk * SDLCALL Mix_LoadWAV_IO(SDL_IOStream *src, SDL_bool c
* Note that before SDL_mixer 3.0.0, this function was a macro that called
- * Mix_LoadWAV_IO(), creating a RWops and setting `closeio` to SDL_TRUE. This
+ * Mix_LoadWAV_IO(), creating a IOStream and setting `closeio` to SDL_TRUE. This
* macro has since been promoted to a proper API function. Older binaries
@@ -515,5 +515,5 @@ extern DECLSPEC Mix_Music * SDLCALL Mix_LoadMUS(const char *file);
*
- * If `closeio` is SDL_TRUE, the RWops will be closed before returning,
+ * If `closeio` is SDL_TRUE, the IOStream will be closed before returning,
* whether this function succeeds or not. SDL_mixer reads everything it needs
- * from the RWops during this call in any case.
+ * from the IOStream during this call in any case.
*
@@ -575,5 +575,5 @@ extern DECLSPEC Mix_Music * SDLCALL Mix_LoadMUS_IO(SDL_IOStream *src, SDL_bool c
*
- * If `closeio` is SDL_TRUE, the RWops will be closed before returning,
+ * If `closeio` is SDL_TRUE, the IOStream will be closed before returning,
* whether this function succeeds or not. SDL_mixer reads everything it needs
- * from the RWops during this call in any case.
+ * from the IOStream during this call in any case.
* |
Fixes #597