SDL: test: Use AUDIO_F32SYS for native-endianness

From 4f2c7328d6f60dcc2662e93127b20b20189f3ac8 Mon Sep 17 00:00:00 2001
From: Simon McVittie <[EMAIL REDACTED]>
Date: Wed, 10 Jan 2024 11:05:34 +0000
Subject: [PATCH] test: Use AUDIO_F32SYS for native-endianness

AUDIO_F32 is an alias for AUDIO_F32LSB, 32-bit floating point with least
significant byte first, resulting in audio_resampleLoss() failing on
big-endian machines. This particular test generates a buffer with
native-endianness float values, so it ought to be using AUDIO_F32SYS,
which is 32-bit floating point in the native endianness.

Already fixed by commit 47bcb078 "Fixed some incorrect SDL_AUDIO_F32 uses"
on the SDL 3 branch.

Signed-off-by: Simon McVittie <>
 test/testautomation_audio.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/test/testautomation_audio.c b/test/testautomation_audio.c
index 0e75e19d9102..03cc6463256d 100644
--- a/test/testautomation_audio.c
+++ b/test/testautomation_audio.c
@@ -1040,8 +1040,8 @@ int audio_resampleLoss()
     SDLTest_AssertPass("Test resampling of %i s %i Hz %f phase sine wave from sampling rate of %i Hz to %i Hz",
                        spec->time, spec->freq, spec->phase, spec->rate_in, spec->rate_out);
-    ret = SDL_BuildAudioCVT(&cvt, AUDIO_F32, 1, spec->rate_in, AUDIO_F32, 1, spec->rate_out);
-    SDLTest_AssertPass("Call to SDL_BuildAudioCVT(&cvt, AUDIO_F32, 1, %i, AUDIO_F32, 1, %i)", spec->rate_in, spec->rate_out);
+    ret = SDL_BuildAudioCVT(&cvt, AUDIO_F32SYS, 1, spec->rate_in, AUDIO_F32SYS, 1, spec->rate_out);
+    SDLTest_AssertPass("Call to SDL_BuildAudioCVT(&cvt, AUDIO_F32SYS, 1, %i, AUDIO_F32SYS, 1, %i)", spec->rate_in, spec->rate_out);
     SDLTest_AssertCheck(ret == 1, "Expected SDL_BuildAudioCVT to succeed and conversion to be needed.");
     if (ret != 1) {
       return TEST_ABORTED;