From 1b4555092905f85a215f91e78ae57d733668105c Mon Sep 17 00:00:00 2001
From: Sam Lantinga <[EMAIL REDACTED]>
Date: Mon, 31 Jul 2023 20:35:36 -0700
Subject: [PATCH] Updated the SDL 3.0 framework
---
Xcode/SDL/SDL3.xcframework/Info.plist | 24 +-
.../SDL3.framework/Headers/SDL_assert.h | 12 +-
.../SDL3.framework/Headers/SDL_atomic.h | 20 +-
.../SDL3.framework/Headers/SDL_audio.h | 177 +++-
.../SDL3.framework/Headers/SDL_begin_code.h | 10 +-
.../SDL3.framework/Headers/SDL_blendmode.h | 2 +-
.../SDL3.framework/Headers/SDL_clipboard.h | 108 ++
.../SDL3.framework/Headers/SDL_cpuinfo.h | 47 +-
.../SDL3.framework/Headers/SDL_endian.h | 6 +-
.../SDL3.framework/Headers/SDL_events.h | 36 +-
.../SDL3.framework/Headers/SDL_filesystem.h | 93 ++
.../SDL3.framework/Headers/SDL_gamepad.h | 238 +++--
.../SDL3.framework/Headers/SDL_hidapi.h | 109 +-
.../SDL3.framework/Headers/SDL_hints.h | 321 ++++--
.../SDL3.framework/Headers/SDL_intrin.h | 126 ++-
.../SDL3.framework/Headers/SDL_joystick.h | 2 +-
.../SDL3.framework/Headers/SDL_keycode.h | 2 +-
.../SDL3.framework/Headers/SDL_main.h | 6 +-
.../SDL3.framework/Headers/SDL_main_impl.h | 2 +-
.../SDL3.framework/Headers/SDL_mouse.h | 10 +-
.../SDL3.framework/Headers/SDL_mutex.h | 462 ++++++---
.../SDL3.framework/Headers/SDL_oldnames.h | 115 ++-
.../SDL3.framework/Headers/SDL_opengl.h | 2 +-
.../SDL3.framework/Headers/SDL_pixels.h | 12 +-
.../Headers/SDL_platform_defines.h | 32 +-
.../SDL3.framework/Headers/SDL_render.h | 39 +-
.../SDL3.framework/Headers/SDL_rwops.h | 13 +-
.../SDL3.framework/Headers/SDL_sensor.h | 16 +-
.../SDL3.framework/Headers/SDL_shape.h | 9 +-
.../SDL3.framework/Headers/SDL_stdinc.h | 38 +-
.../SDL3.framework/Headers/SDL_surface.h | 105 +-
.../SDL3.framework/Headers/SDL_system.h | 2 +-
.../SDL3.framework/Headers/SDL_syswm.h | 28 +-
.../SDL3.framework/Headers/SDL_thread.h | 30 +-
.../SDL3.framework/Headers/SDL_video.h | 378 +++++--
.../ios-arm64/SDL3.framework/Info.plist | Bin 857 -> 854 bytes
.../ios-arm64/SDL3.framework/SDL3 | Bin 1124824 -> 1111704 bytes
.../ios-arm64/SDL3.framework/default.metallib | Bin 21904 -> 21904 bytes
.../SDL3.framework/Headers/SDL_assert.h | 12 +-
.../SDL3.framework/Headers/SDL_atomic.h | 20 +-
.../SDL3.framework/Headers/SDL_audio.h | 177 +++-
.../SDL3.framework/Headers/SDL_begin_code.h | 10 +-
.../SDL3.framework/Headers/SDL_blendmode.h | 2 +-
.../SDL3.framework/Headers/SDL_clipboard.h | 108 ++
.../SDL3.framework/Headers/SDL_cpuinfo.h | 47 +-
.../SDL3.framework/Headers/SDL_endian.h | 6 +-
.../SDL3.framework/Headers/SDL_events.h | 36 +-
.../SDL3.framework/Headers/SDL_filesystem.h | 93 ++
.../SDL3.framework/Headers/SDL_gamepad.h | 238 +++--
.../SDL3.framework/Headers/SDL_hidapi.h | 109 +-
.../SDL3.framework/Headers/SDL_hints.h | 321 ++++--
.../SDL3.framework/Headers/SDL_intrin.h | 126 ++-
.../SDL3.framework/Headers/SDL_joystick.h | 2 +-
.../SDL3.framework/Headers/SDL_keycode.h | 2 +-
.../SDL3.framework/Headers/SDL_main.h | 6 +-
.../SDL3.framework/Headers/SDL_main_impl.h | 2 +-
.../SDL3.framework/Headers/SDL_mouse.h | 10 +-
.../SDL3.framework/Headers/SDL_mutex.h | 462 ++++++---
.../SDL3.framework/Headers/SDL_oldnames.h | 115 ++-
.../SDL3.framework/Headers/SDL_opengl.h | 2 +-
.../SDL3.framework/Headers/SDL_pixels.h | 12 +-
.../Headers/SDL_platform_defines.h | 32 +-
.../SDL3.framework/Headers/SDL_render.h | 39 +-
.../SDL3.framework/Headers/SDL_rwops.h | 13 +-
.../SDL3.framework/Headers/SDL_sensor.h | 16 +-
.../SDL3.framework/Headers/SDL_shape.h | 9 +-
.../SDL3.framework/Headers/SDL_stdinc.h | 38 +-
.../SDL3.framework/Headers/SDL_surface.h | 105 +-
.../SDL3.framework/Headers/SDL_system.h | 2 +-
.../SDL3.framework/Headers/SDL_syswm.h | 28 +-
.../SDL3.framework/Headers/SDL_thread.h | 30 +-
.../SDL3.framework/Headers/SDL_video.h | 378 +++++--
.../SDL3.framework/Info.plist | Bin 837 -> 834 bytes
.../SDL3.framework/SDL3 | Bin 2484528 -> 2471248 bytes
.../_CodeSignature/CodeResources | 212 ++--
.../SDL3.framework/default.metallib | Bin 24698 -> 24698 bytes
.../Versions/A/Headers/SDL_assert.h | 12 +-
.../Versions/A/Headers/SDL_atomic.h | 20 +-
.../Versions/A/Headers/SDL_audio.h | 177 +++-
.../Versions/A/Headers/SDL_begin_code.h | 10 +-
.../Versions/A/Headers/SDL_blendmode.h | 2 +-
.../Versions/A/Headers/SDL_clipboard.h | 108 ++
.../Versions/A/Headers/SDL_cpuinfo.h | 47 +-
.../Versions/A/Headers/SDL_endian.h | 6 +-
.../Versions/A/Headers/SDL_events.h | 36 +-
.../Versions/A/Headers/SDL_filesystem.h | 93 ++
.../Versions/A/Headers/SDL_gamepad.h | 238 +++--
.../Versions/A/Headers/SDL_hidapi.h | 109 +-
.../Versions/A/Headers/SDL_hints.h | 321 ++++--
.../Versions/A/Headers/SDL_intrin.h | 126 ++-
.../Versions/A/Headers/SDL_joystick.h | 2 +-
.../Versions/A/Headers/SDL_keycode.h | 2 +-
.../Versions/A/Headers/SDL_main.h | 6 +-
.../Versions/A/Headers/SDL_main_impl.h | 2 +-
.../Versions/A/Headers/SDL_mouse.h | 10 +-
.../Versions/A/Headers/SDL_mutex.h | 462 ++++++---
.../Versions/A/Headers/SDL_oldnames.h | 115 ++-
.../Versions/A/Headers/SDL_opengl.h | 2 +-
.../Versions/A/Headers/SDL_pixels.h | 12 +-
.../Versions/A/Headers/SDL_platform_defines.h | 32 +-
.../Versions/A/Headers/SDL_render.h | 39 +-
.../Versions/A/Headers/SDL_rwops.h | 13 +-
.../Versions/A/Headers/SDL_sensor.h | 16 +-
.../Versions/A/Headers/SDL_shape.h | 9 +-
.../Versions/A/Headers/SDL_stdinc.h | 38 +-
.../Versions/A/Headers/SDL_surface.h | 105 +-
.../Versions/A/Headers/SDL_system.h | 2 +-
.../Versions/A/Headers/SDL_syswm.h | 28 +-
.../Versions/A/Headers/SDL_thread.h | 30 +-
.../Versions/A/Headers/SDL_video.h | 378 +++++--
.../Versions/A/Resources/Info.plist | 16 +-
.../Versions/A/Resources/default.metallib | Bin 21968 -> 21968 bytes
.../SDL3.framework/Versions/A/SDL3 | Bin 3235056 -> 3181800 bytes
.../Versions/A/_CodeSignature/CodeResources | 944 ------------------
.../SDL3.framework/Headers/SDL_assert.h | 12 +-
.../SDL3.framework/Headers/SDL_atomic.h | 20 +-
.../SDL3.framework/Headers/SDL_audio.h | 177 +++-
.../SDL3.framework/Headers/SDL_begin_code.h | 10 +-
.../SDL3.framework/Headers/SDL_blendmode.h | 2 +-
.../SDL3.framework/Headers/SDL_clipboard.h | 108 ++
.../SDL3.framework/Headers/SDL_cpuinfo.h | 47 +-
.../SDL3.framework/Headers/SDL_endian.h | 6 +-
.../SDL3.framework/Headers/SDL_events.h | 36 +-
.../SDL3.framework/Headers/SDL_filesystem.h | 93 ++
.../SDL3.framework/Headers/SDL_gamepad.h | 238 +++--
.../SDL3.framework/Headers/SDL_hidapi.h | 109 +-
.../SDL3.framework/Headers/SDL_hints.h | 321 ++++--
.../SDL3.framework/Headers/SDL_intrin.h | 126 ++-
.../SDL3.framework/Headers/SDL_joystick.h | 2 +-
.../SDL3.framework/Headers/SDL_keycode.h | 2 +-
.../SDL3.framework/Headers/SDL_main.h | 6 +-
.../SDL3.framework/Headers/SDL_main_impl.h | 2 +-
.../SDL3.framework/Headers/SDL_mouse.h | 10 +-
.../SDL3.framework/Headers/SDL_mutex.h | 462 ++++++---
.../SDL3.framework/Headers/SDL_oldnames.h | 115 ++-
.../SDL3.framework/Headers/SDL_opengl.h | 2 +-
.../SDL3.framework/Headers/SDL_pixels.h | 12 +-
.../Headers/SDL_platform_defines.h | 32 +-
.../SDL3.framework/Headers/SDL_render.h | 39 +-
.../SDL3.framework/Headers/SDL_rwops.h | 13 +-
.../SDL3.framework/Headers/SDL_sensor.h | 16 +-
.../SDL3.framework/Headers/SDL_shape.h | 9 +-
.../SDL3.framework/Headers/SDL_stdinc.h | 38 +-
.../SDL3.framework/Headers/SDL_surface.h | 105 +-
.../SDL3.framework/Headers/SDL_system.h | 2 +-
.../SDL3.framework/Headers/SDL_syswm.h | 28 +-
.../SDL3.framework/Headers/SDL_thread.h | 30 +-
.../SDL3.framework/Headers/SDL_video.h | 378 +++++--
.../tvos-arm64/SDL3.framework/Info.plist | Bin 808 -> 810 bytes
.../tvos-arm64/SDL3.framework/SDL3 | Bin 1107568 -> 1094456 bytes
.../SDL3.framework/default.metallib | Bin 21904 -> 21904 bytes
.../SDL3.framework/Headers/SDL_assert.h | 12 +-
.../SDL3.framework/Headers/SDL_atomic.h | 20 +-
.../SDL3.framework/Headers/SDL_audio.h | 177 +++-
.../SDL3.framework/Headers/SDL_begin_code.h | 10 +-
.../SDL3.framework/Headers/SDL_blendmode.h | 2 +-
.../SDL3.framework/Headers/SDL_clipboard.h | 108 ++
.../SDL3.framework/Headers/SDL_cpuinfo.h | 47 +-
.../SDL3.framework/Headers/SDL_endian.h | 6 +-
.../SDL3.framework/Headers/SDL_events.h | 36 +-
.../SDL3.framework/Headers/SDL_filesystem.h | 93 ++
.../SDL3.framework/Headers/SDL_gamepad.h | 238 +++--
.../SDL3.framework/Headers/SDL_hidapi.h | 109 +-
.../SDL3.framework/Headers/SDL_hints.h | 321 ++++--
.../SDL3.framework/Headers/SDL_intrin.h | 126 ++-
.../SDL3.framework/Headers/SDL_joystick.h | 2 +-
.../SDL3.framework/Headers/SDL_keycode.h | 2 +-
.../SDL3.framework/Headers/SDL_main.h | 6 +-
.../SDL3.framework/Headers/SDL_main_impl.h | 2 +-
.../SDL3.framework/Headers/SDL_mouse.h | 10 +-
.../SDL3.framework/Headers/SDL_mutex.h | 462 ++++++---
.../SDL3.framework/Headers/SDL_oldnames.h | 115 ++-
.../SDL3.framework/Headers/SDL_opengl.h | 2 +-
.../SDL3.framework/Headers/SDL_pixels.h | 12 +-
.../Headers/SDL_platform_defines.h | 32 +-
.../SDL3.framework/Headers/SDL_render.h | 39 +-
.../SDL3.framework/Headers/SDL_rwops.h | 13 +-
.../SDL3.framework/Headers/SDL_sensor.h | 16 +-
.../SDL3.framework/Headers/SDL_shape.h | 9 +-
.../SDL3.framework/Headers/SDL_stdinc.h | 38 +-
.../SDL3.framework/Headers/SDL_surface.h | 105 +-
.../SDL3.framework/Headers/SDL_system.h | 2 +-
.../SDL3.framework/Headers/SDL_syswm.h | 28 +-
.../SDL3.framework/Headers/SDL_thread.h | 30 +-
.../SDL3.framework/Headers/SDL_video.h | 378 +++++--
.../SDL3.framework/Info.plist | Bin 835 -> 837 bytes
.../SDL3.framework/SDL3 | Bin 2450672 -> 2453792 bytes
.../_CodeSignature/CodeResources | 212 ++--
.../SDL3.framework/default.metallib | Bin 24730 -> 24730 bytes
189 files changed, 9872 insertions(+), 4576 deletions(-)
delete mode 100644 Xcode/SDL/SDL3.xcframework/macos-arm64_x86_64/SDL3.framework/Versions/A/_CodeSignature/CodeResources
diff --git a/Xcode/SDL/SDL3.xcframework/Info.plist b/Xcode/SDL/SDL3.xcframework/Info.plist
index 9b845d7a..97884596 100644
--- a/Xcode/SDL/SDL3.xcframework/Info.plist
+++ b/Xcode/SDL/SDL3.xcframework/Info.plist
@@ -6,7 +6,7 @@
<array>
<dict>
<key>LibraryIdentifier</key>
- <string>ios-arm64_x86_64-simulator</string>
+ <string>tvos-arm64_x86_64-simulator</string>
<key>LibraryPath</key>
<string>SDL3.framework</string>
<key>SupportedArchitectures</key>
@@ -15,61 +15,61 @@
<string>x86_64</string>
</array>
<key>SupportedPlatform</key>
- <string>ios</string>
+ <string>tvos</string>
<key>SupportedPlatformVariant</key>
<string>simulator</string>
</dict>
<dict>
<key>LibraryIdentifier</key>
- <string>ios-arm64</string>
+ <string>ios-arm64_x86_64-simulator</string>
<key>LibraryPath</key>
<string>SDL3.framework</string>
<key>SupportedArchitectures</key>
<array>
<string>arm64</string>
+ <string>x86_64</string>
</array>
<key>SupportedPlatform</key>
<string>ios</string>
+ <key>SupportedPlatformVariant</key>
+ <string>simulator</string>
</dict>
<dict>
<key>LibraryIdentifier</key>
- <string>tvos-arm64</string>
+ <string>macos-arm64_x86_64</string>
<key>LibraryPath</key>
<string>SDL3.framework</string>
<key>SupportedArchitectures</key>
<array>
<string>arm64</string>
+ <string>x86_64</string>
</array>
<key>SupportedPlatform</key>
- <string>tvos</string>
+ <string>macos</string>
</dict>
<dict>
<key>LibraryIdentifier</key>
- <string>macos-arm64_x86_64</string>
+ <string>ios-arm64</string>
<key>LibraryPath</key>
<string>SDL3.framework</string>
<key>SupportedArchitectures</key>
<array>
<string>arm64</string>
- <string>x86_64</string>
</array>
<key>SupportedPlatform</key>
- <string>macos</string>
+ <string>ios</string>
</dict>
<dict>
<key>LibraryIdentifier</key>
- <string>tvos-arm64_x86_64-simulator</string>
+ <string>tvos-arm64</string>
<key>LibraryPath</key>
<string>SDL3.framework</string>
<key>SupportedArchitectures</key>
<array>
<string>arm64</string>
- <string>x86_64</string>
</array>
<key>SupportedPlatform</key>
<string>tvos</string>
- <key>SupportedPlatformVariant</key>
- <string>simulator</string>
</dict>
</array>
<key>CFBundlePackageType</key>
diff --git a/Xcode/SDL/SDL3.xcframework/ios-arm64/SDL3.framework/Headers/SDL_assert.h b/Xcode/SDL/SDL3.xcframework/ios-arm64/SDL3.framework/Headers/SDL_assert.h
index 830fb3a9..12eb6356 100644
--- a/Xcode/SDL/SDL3.xcframework/ios-arm64/SDL3.framework/Headers/SDL_assert.h
+++ b/Xcode/SDL/SDL3.xcframework/ios-arm64/SDL3.framework/Headers/SDL_assert.h
@@ -53,7 +53,7 @@ on the assertion line and not in some random guts of SDL, and so each
assert can have unique static variables associated with it.
*/
-#if defined(_MSC_VER)
+#ifdef _MSC_VER
/* Don't include intrin.h here because it contains C++ code */
extern void __cdecl __debugbreak(void);
#define SDL_TriggerBreakpoint() __debugbreak()
@@ -134,8 +134,6 @@ typedef struct SDL_AssertData
const struct SDL_AssertData *next;
} SDL_AssertData;
-#if (SDL_ASSERT_LEVEL > 0)
-
/**
* Never call this directly.
*
@@ -152,7 +150,7 @@ typedef struct SDL_AssertData
extern DECLSPEC SDL_AssertState SDLCALL SDL_ReportAssertion(SDL_AssertData *data,
const char *func,
const char *file, int line)
-#if defined(__clang__)
+#ifdef __clang__
#if __has_feature(attribute_analyzer_noreturn)
__attribute__((analyzer_noreturn))
#endif
@@ -183,9 +181,7 @@ extern DECLSPEC SDL_AssertState SDLCALL SDL_ReportAssertion(SDL_AssertData *data
#define SDL_enabled_assert(condition) \
do { \
while ( !(condition) ) { \
- static struct SDL_AssertData sdl_assert_data = { \
- 0, 0, #condition, 0, 0, 0, 0 \
- }; \
+ static struct SDL_AssertData sdl_assert_data = { 0, 0, #condition, 0, 0, 0, 0 }; \
const SDL_AssertState sdl_assert_state = SDL_ReportAssertion(&sdl_assert_data, SDL_FUNCTION, SDL_FILE, SDL_LINE); \
if (sdl_assert_state == SDL_ASSERTION_RETRY) { \
continue; /* go again. */ \
@@ -196,8 +192,6 @@ extern DECLSPEC SDL_AssertState SDLCALL SDL_ReportAssertion(SDL_AssertData *data
} \
} while (SDL_NULL_WHILE_LOOP_CONDITION)
-#endif /* enabled assertions support code */
-
/* Enable various levels of assertions. */
#if SDL_ASSERT_LEVEL == 0 /* assertions disabled */
# define SDL_assert(condition) SDL_disabled_assert(condition)
diff --git a/Xcode/SDL/SDL3.xcframework/ios-arm64/SDL3.framework/Headers/SDL_atomic.h b/Xcode/SDL/SDL3.xcframework/ios-arm64/SDL3.framework/Headers/SDL_atomic.h
index 746bdc95..f0c652aa 100644
--- a/Xcode/SDL/SDL3.xcframework/ios-arm64/SDL3.framework/Headers/SDL_atomic.h
+++ b/Xcode/SDL/SDL3.xcframework/ios-arm64/SDL3.framework/Headers/SDL_atomic.h
@@ -244,7 +244,7 @@ typedef void (*SDL_KernelMemoryBarrierFunc)();
/* "REP NOP" is PAUSE, coded for tools that don't know it by that name. */
#if (defined(__GNUC__) || defined(__clang__)) && (defined(__i386__) || defined(__x86_64__))
#define SDL_CPUPauseInstruction() __asm__ __volatile__("pause\n") /* Some assemblers can't do REP NOP, so go with PAUSE. */
-#elif (defined(__arm__) && __ARM_ARCH >= 7) || defined(__aarch64__)
+#elif (defined(__arm__) && defined(__ARM_ARCH) && __ARM_ARCH >= 7) || defined(__aarch64__)
#define SDL_CPUPauseInstruction() __asm__ __volatile__("yield" ::: "memory")
#elif (defined(__powerpc__) || defined(__powerpc64__))
#define SDL_CPUPauseInstruction() __asm__ __volatile__("or 27,27,27");
@@ -266,7 +266,7 @@ typedef void (*SDL_KernelMemoryBarrierFunc)();
* \brief A type representing an atomic integer value. It is a struct
* so people don't accidentally use numeric operations on it.
*/
-typedef struct { int value; } SDL_atomic_t;
+typedef struct { int value; } SDL_AtomicInt;
/**
* Set an atomic variable to a new value if it is currently an old value.
@@ -274,7 +274,7 @@ typedef struct { int value; } SDL_atomic_t;
* ***Note: If you don't know what this function is for, you shouldn't use
* it!***
*
- * \param a a pointer to an SDL_atomic_t variable to be modified
+ * \param a a pointer to an SDL_AtomicInt variable to be modified
* \param oldval the old value
* \param newval the new value
* \returns SDL_TRUE if the atomic variable was set, SDL_FALSE otherwise.
@@ -285,7 +285,7 @@ typedef struct { int value; } SDL_atomic_t;
* \sa SDL_AtomicGet
* \sa SDL_AtomicSet
*/
-extern DECLSPEC SDL_bool SDLCALL SDL_AtomicCAS(SDL_atomic_t *a, int oldval, int newval);
+extern DECLSPEC SDL_bool SDLCALL SDL_AtomicCAS(SDL_AtomicInt *a, int oldval, int newval);
/**
* Set an atomic variable to a value.
@@ -295,7 +295,7 @@ extern DECLSPEC SDL_bool SDLCALL SDL_AtomicCAS(SDL_atomic_t *a, int oldval, int
* ***Note: If you don't know what this function is for, you shouldn't use
* it!***
*
- * \param a a pointer to an SDL_atomic_t variable to be modified
+ * \param a a pointer to an SDL_AtomicInt variable to be modified
* \param v the desired value
* \returns the previous value of the atomic variable.
*
@@ -303,7 +303,7 @@ extern DECLSPEC SDL_bool SDLCALL SDL_AtomicCAS(SDL_atomic_t *a, int oldval, int
*
* \sa SDL_AtomicGet
*/
-extern DECLSPEC int SDLCALL SDL_AtomicSet(SDL_atomic_t *a, int v);
+extern DECLSPEC int SDLCALL SDL_AtomicSet(SDL_AtomicInt *a, int v);
/**
* Get the value of an atomic variable.
@@ -311,14 +311,14 @@ extern DECLSPEC int SDLCALL SDL_AtomicSet(SDL_atomic_t *a, int v);
* ***Note: If you don't know what this function is for, you shouldn't use
* it!***
*
- * \param a a pointer to an SDL_atomic_t variable
+ * \param a a pointer to an SDL_AtomicInt variable
* \returns the current value of an atomic variable.
*
* \since This function is available since SDL 3.0.0.
*
* \sa SDL_AtomicSet
*/
-extern DECLSPEC int SDLCALL SDL_AtomicGet(SDL_atomic_t *a);
+extern DECLSPEC int SDLCALL SDL_AtomicGet(SDL_AtomicInt *a);
/**
* Add to an atomic variable.
@@ -328,7 +328,7 @@ extern DECLSPEC int SDLCALL SDL_AtomicGet(SDL_atomic_t *a);
* ***Note: If you don't know what this function is for, you shouldn't use
* it!***
*
- * \param a a pointer to an SDL_atomic_t variable to be modified
+ * \param a a pointer to an SDL_AtomicInt variable to be modified
* \param v the desired value to add
* \returns the previous value of the atomic variable.
*
@@ -337,7 +337,7 @@ extern DECLSPEC int SDLCALL SDL_AtomicGet(SDL_atomic_t *a);
* \sa SDL_AtomicDecRef
* \sa SDL_AtomicIncRef
*/
-extern DECLSPEC int SDLCALL SDL_AtomicAdd(SDL_atomic_t *a, int v);
+extern DECLSPEC int SDLCALL SDL_AtomicAdd(SDL_AtomicInt *a, int v);
/**
* \brief Increment an atomic variable used as a reference count.
diff --git a/Xcode/SDL/SDL3.xcframework/ios-arm64/SDL3.framework/Headers/SDL_audio.h b/Xcode/SDL/SDL3.xcframework/ios-arm64/SDL3.framework/Headers/SDL_audio.h
index bcac63d1..1dd39fc6 100644
--- a/Xcode/SDL/SDL3.xcframework/ios-arm64/SDL3.framework/Headers/SDL_audio.h
+++ b/Xcode/SDL/SDL3.xcframework/ios-arm64/SDL3.framework/Headers/SDL_audio.h
@@ -88,29 +88,29 @@ typedef Uint16 SDL_AudioFormat;
* Defaults to LSB byte order.
*/
/* @{ */
-#define AUDIO_U8 0x0008 /**< Unsigned 8-bit samples */
-#define AUDIO_S8 0x8008 /**< Signed 8-bit samples */
-#define AUDIO_S16LSB 0x8010 /**< Signed 16-bit samples */
-#define AUDIO_S16MSB 0x9010 /**< As above, but big-endian byte order */
-#define AUDIO_S16 AUDIO_S16LSB
+#define SDL_AUDIO_U8 0x0008 /**< Unsigned 8-bit samples */
+#define SDL_AUDIO_S8 0x8008 /**< Signed 8-bit samples */
+#define SDL_AUDIO_S16LSB 0x8010 /**< Signed 16-bit samples */
+#define SDL_AUDIO_S16MSB 0x9010 /**< As above, but big-endian byte order */
+#define SDL_AUDIO_S16 SDL_AUDIO_S16LSB
/* @} */
/**
* \name int32 support
*/
/* @{ */
-#define AUDIO_S32LSB 0x8020 /**< 32-bit integer samples */
-#define AUDIO_S32MSB 0x9020 /**< As above, but big-endian byte order */
-#define AUDIO_S32 AUDIO_S32LSB
+#define SDL_AUDIO_S32LSB 0x8020 /**< 32-bit integer samples */
+#define SDL_AUDIO_S32MSB 0x9020 /**< As above, but big-endian byte order */
+#define SDL_AUDIO_S32 SDL_AUDIO_S32LSB
/* @} */
/**
* \name float32 support
*/
/* @{ */
-#define AUDIO_F32LSB 0x8120 /**< 32-bit floating point samples */
-#define AUDIO_F32MSB 0x9120 /**< As above, but big-endian byte order */
-#define AUDIO_F32 AUDIO_F32LSB
+#define SDL_AUDIO_F32LSB 0x8120 /**< 32-bit floating point samples */
+#define SDL_AUDIO_F32MSB 0x9120 /**< As above, but big-endian byte order */
+#define SDL_AUDIO_F32 SDL_AUDIO_F32LSB
/* @} */
/**
@@ -118,13 +118,13 @@ typedef Uint16 SDL_AudioFormat;
*/
/* @{ */
#if SDL_BYTEORDER == SDL_LIL_ENDIAN
-#define AUDIO_S16SYS AUDIO_S16LSB
-#define AUDIO_S32SYS AUDIO_S32LSB
-#define AUDIO_F32SYS AUDIO_F32LSB
+#define SDL_AUDIO_S16SYS SDL_AUDIO_S16LSB
+#define SDL_AUDIO_S32SYS SDL_AUDIO_S32LSB
+#define SDL_AUDIO_F32SYS SDL_AUDIO_F32LSB
#else
-#define AUDIO_S16SYS AUDIO_S16MSB
-#define AUDIO_S32SYS AUDIO_S32MSB
-#define AUDIO_F32SYS AUDIO_F32MSB
+#define SDL_AUDIO_S16SYS SDL_AUDIO_S16MSB
+#define SDL_AUDIO_S32SYS SDL_AUDIO_S32MSB
+#define SDL_AUDIO_F32SYS SDL_AUDIO_F32MSB
#endif
/* @} */
@@ -164,13 +164,13 @@ typedef void (SDLCALL * SDL_AudioCallback) (void *userdata, Uint8 * stream,
* The calculated values in this structure are calculated by SDL_OpenAudioDevice().
*
* For multi-channel audio, the default SDL channel mapping is:
- * 2: FL FR (stereo)
- * 3: FL FR LFE (2.1 surround)
- * 4: FL FR BL BR (quad)
- * 5: FL FR LFE BL BR (4.1 surround)
- * 6: FL FR FC LFE SL SR (5.1 surround - last two can also be BL BR)
- * 7: FL FR FC LFE BC SL SR (6.1 surround)
- * 8: FL FR FC LFE BL BR SL SR (7.1 surround)
+ * 2: FL FR (stereo)
+ * 3: FL FR LFE (2.1 surround)
+ * 4: FL FR BL BR (quad)
+ * 5: FL FR LFE BL BR (4.1 surround)
+ * 6: FL FR FC LFE SL SR (5.1 surround - last two can also be BL BR)
+ * 7: FL FR FC LFE BC SL SR (6.1 surround)
+ * 8: FL FR FC LFE BL BR SL SR (7.1 surround)
*/
typedef struct SDL_AudioSpec
{
@@ -425,7 +425,7 @@ extern DECLSPEC int SDLCALL SDL_GetDefaultAudioInfo(char **name,
* When filling in the desired audio spec structure:
*
* - `desired->freq` should be the frequency in sample-frames-per-second (Hz).
- * - `desired->format` should be the audio format (`AUDIO_S16SYS`, etc).
+ * - `desired->format` should be the audio format (`SDL_AUDIO_S16SYS`, etc).
* - `desired->samples` is the desired size of the audio buffer, in _sample
* frames_ (with stereo output, two samples--left and right--would make a
* single sample frame). This number should be a power of two, and may be
@@ -594,9 +594,6 @@ extern DECLSPEC int SDLCALL SDL_PauseAudioDevice(SDL_AudioDeviceID dev);
* be valid pointers. The entire data portion of the file is then loaded into
* memory and decoded if necessary.
*
- * If `freesrc` is non-zero, the data source gets automatically closed and
- * freed before the function returns.
- *
* Supported formats are RIFF WAVE files with the formats PCM (8, 16, 24, and
* 32 bits), IEEE Float (32 bits), Microsoft ADPCM and IMA ADPCM (4 bits), and
* A-law and mu-law (8 bits). Other formats are currently unsupported and
@@ -643,11 +640,12 @@ extern DECLSPEC int SDLCALL SDL_PauseAudioDevice(SDL_AudioDeviceID dev);
* ```
*
* \param src The data source for the WAVE data
- * \param freesrc If non-zero, SDL will _always_ free the data source
+ * \param freesrc if SDL_TRUE, calls SDL_RWclose() on `src` before returning,
+ * even in the case of an error
* \param spec An SDL_AudioSpec that will be filled in with the wave file's
* format details
* \param audio_buf A pointer filled with the audio data, allocated by the
- * function.
+ * function
* \param audio_len A pointer filled with the length of the audio data buffer
* in bytes
* \returns This function, if successfully called, returns `spec`, which will
@@ -669,7 +667,7 @@ extern DECLSPEC int SDLCALL SDL_PauseAudioDevice(SDL_AudioDeviceID dev);
* \sa SDL_LoadWAV
*/
extern DECLSPEC SDL_AudioSpec *SDLCALL SDL_LoadWAV_RW(SDL_RWops * src,
- int freesrc,
+ SDL_bool freesrc,
SDL_AudioSpec * spec,
Uint8 ** audio_buf,
Uint32 * audio_len);
@@ -682,15 +680,15 @@ extern DECLSPEC SDL_AudioSpec *SDLCALL SDL_LoadWAV_RW(SDL_RWops * src,
SDL_LoadWAV_RW(SDL_RWFromFile(file, "rb"),1, spec,audio_buf,audio_len)
-/* SDL_AudioStream is a new audio conversion interface.
- The benefits vs SDL_AudioCVT:
- - it can handle resampling data in chunks without generating
+/* SDL_AudioStream is an audio conversion interface.
+ - It can handle resampling data in chunks without generating
artifacts, when it doesn't have the complete buffer available.
- - it can handle incoming data in any variable size.
+ - It can handle incoming data in any variable size.
- You push data as you have it, and pull it when you need it
+ - It can also function as a basic audio data queue even if you
+ just have sound that needs to pass from one place to another.
*/
-/* this is opaque to the outside world. */
-struct SDL_AudioStream;
+struct SDL_AudioStream; /* this is opaque to the outside world. */
typedef struct SDL_AudioStream SDL_AudioStream;
/**
@@ -704,6 +702,8 @@ typedef struct SDL_AudioStream SDL_AudioStream;
* \param dst_rate The sampling rate of the desired audio output
* \returns 0 on success, or -1 on error.
*
+ * \threadsafety It is safe to call this function from any thread.
+ *
* \since This function is available since SDL 3.0.0.
*
* \sa SDL_PutAudioStreamData
@@ -711,18 +711,89 @@ typedef struct SDL_AudioStream SDL_AudioStream;
* \sa SDL_GetAudioStreamAvailable
* \sa SDL_FlushAudioStream
* \sa SDL_ClearAudioStream
+ * \sa SDL_ChangeAudioStreamOutput
* \sa SDL_DestroyAudioStream
*/
extern DECLSPEC SDL_AudioStream *SDLCALL SDL_CreateAudioStream(SDL_AudioFormat src_format,
- Uint8 src_channels,
+ int src_channels,
int src_rate,
SDL_AudioFormat dst_format,
- Uint8 dst_channels,
+ int dst_channels,
int dst_rate);
+
+/**
+ * Query the current format of an audio stream.
+ *
+ * \param stream the SDL_AudioStream to query.
+ * \param src_format Where to store the input audio format; ignored if NULL.
+ * \param src_channels Where to store the input channel count; ignored if
+ * NULL.
+ * \param src_rate Where to store the input sample rate; ignored if NULL.
+ * \param dst_format Where to store the output audio format; ignored if NULL.
+ * \param dst_channels Where to store the output channel count; ignored if
+ * NULL.
+ * \param dst_rate Where to store the output sample rate; ignored if NULL.
+ * \returns 0 on success, or -1 on error.
+ *
+ * \threadsafety It is safe to call this function from any thread, as it holds
+ * a stream-specific mutex while running.
+ *
+ * \since This function is available since SDL 3.0.0.
+ */
+extern DECLSPEC int SDLCALL SDL_GetAudioStreamFormat(SDL_AudioStream *stream,
+ SDL_AudioFormat *src_format,
+ int *src_channels,
+ int *src_rate,
+ SDL_AudioFormat *dst_format,
+ int *dst_channels,
+ int *dst_rate);
+
+/**
+ * Change the input and output formats of an audio stream.
+ *
+ * Future calls to and SDL_GetAudioStreamAvailable and SDL_GetAudioStreamData
+ * will reflect the new format, and future calls to SDL_PutAudioStreamData
+ * must provide data in the new input formats.
+ *
+ * \param stream The stream the format is being changed
+ * \param src_format The format of the audio input
+ * \param src_channels The number of channels of the audio input
+ * \param src_rate The sampling rate of the audio input
+ * \param dst_format The format of the desired audio output
+ * \param dst_channels The number of channels of the desired audio output
+ * \param dst_rate The sampling rate of the desired audio output
+ * \returns 0 on success, or -1 on error.
+ *
+ * \threadsafety It is safe to call this function from any thread, as it holds
+ * a stream-specific mutex while running.
+ *
+ * \since This function is available since SDL 3.0.0.
+ *
+ * \sa SDL_GetAudioStreamFormat
+ * \sa SDL_PutAudioStreamData
+ * \sa SDL_GetAudioStreamData
+ * \sa SDL_GetAudioStreamAvailable
+ */
+extern DECLSPEC int SDLCALL SDL_SetAudioStreamFormat(SDL_AudioStream *stream,
+ SDL_AudioFormat src_format,
+ int src_channels,
+ int src_rate,
+
(Patch may be truncated, please check the link at the top of this post.)