Browse code

Use the audio format native to host AUDIO_S16 defaults to little endian format which causes issues when running on big endian systems. Use AUDIO_S16SYS instead which sets to whatever endian the system uxn is being built on is.

Sevan Janiyan authored on 15/05/2023 02:08:58 • Devine Lu Linvega committed on 15/05/2023 02:34:55
Showing 1 changed files
... ...
@@ -210,7 +210,7 @@ init(void)
210 210
 	SDL_AudioSpec as;
211 211
 	SDL_zero(as);
212 212
 	as.freq = SAMPLE_FREQUENCY;
213
-	as.format = AUDIO_S16;
213
+	as.format = AUDIO_S16SYS;
214 214
 	as.channels = 2;
215 215
 	as.callback = audio_callback;
216 216
 	as.samples = 512;