From 9ba291c98db5d7d2acde4d1a92152d9f84e3c16a Mon Sep 17 00:00:00 2001 From: Hugh Sanderson Date: Sun, 12 Jan 2025 10:14:23 +0800 Subject: [PATCH] Update local-toolkit sdl version --- project/src/audio/SDLSound.cpp | 7 ++++++- project/toolkit/sdl-mixer/SDL_mixer | 2 +- project/toolkit/sdl/SDL | 2 +- project/toolkit/sdl/files.xml | 16 ++++++++++++---- 4 files changed, 20 insertions(+), 7 deletions(-) diff --git a/project/src/audio/SDLSound.cpp b/project/src/audio/SDLSound.cpp index 9ba0f896d..3aa476e4c 100644 --- a/project/src/audio/SDLSound.cpp +++ b/project/src/audio/SDLSound.cpp @@ -33,7 +33,11 @@ enum { STEREO_SAMPLES = 2 }; unsigned int sSoundPos = 0; double sMusicT0 = 0; double sLastMusicUpdate = 0; +#ifdef NME_SDL3 +double sMusicFrequency = 0.0; +#else double sMusicFrequency = 44100; +#endif bool sSoundPaused = false; void onChannelDone(int inChannel) @@ -365,10 +369,11 @@ class SDLSoundChannel : public SoundChannel void initSpec() { Mix_QuerySpec(&mFrequency, &mFormat, &mChannels); + if (mFrequency!=44100) ELOG("Warning - Frequency mismatch %d",mFrequency); #ifdef NME_SDL3 - if (mFormat!=SDL_AUDIO_F32) + if (mFormat!=SDL_AUDIO_S16) #else if (mFormat!=32784) #endif diff --git a/project/toolkit/sdl-mixer/SDL_mixer b/project/toolkit/sdl-mixer/SDL_mixer index 124831c87..487018646 160000 --- a/project/toolkit/sdl-mixer/SDL_mixer +++ b/project/toolkit/sdl-mixer/SDL_mixer @@ -1 +1 @@ -Subproject commit 124831c87e6e546ee905db38e1c2f6086fc3c18c +Subproject commit 48701864697a904b3a771dcd20b5b6740f1c1d5c diff --git a/project/toolkit/sdl/SDL b/project/toolkit/sdl/SDL index 640559eba..8ec576dda 160000 --- a/project/toolkit/sdl/SDL +++ b/project/toolkit/sdl/SDL @@ -1 +1 @@ -Subproject commit 640559eba68e9d3cc0840fa745cff38f41adcc3f +Subproject commit 8ec576ddabdc7edfd68e7a8a3214e84e4026328d diff --git a/project/toolkit/sdl/files.xml b/project/toolkit/sdl/files.xml index 3c676660c..9e8229ce1 100644 --- a/project/toolkit/sdl/files.xml +++ b/project/toolkit/sdl/files.xml @@ -132,6 +132,7 @@ + @@ -145,7 +146,6 @@ - @@ -188,6 +188,7 @@ + @@ -248,9 +249,9 @@ - - - + + + @@ -266,6 +267,9 @@ + + +
@@ -280,6 +284,8 @@ + +
@@ -314,6 +320,7 @@ + @@ -564,6 +571,7 @@ +