engine: platform: sdl: request AUDIO_S16SYS to make sound output in native endian

This commit is contained in:
Alibek Omarov
2026-04-25 00:23:32 +05:00
committed by a1batross
parent 8545ed5ccb
commit 22ecec095e
2 changed files with 5 additions and 5 deletions

View File

@@ -106,7 +106,7 @@ qboolean SNDDMA_Init( void )
memset( &desired, 0, sizeof( desired ) );
desired.freq = SOUND_DMA_SPEED;
desired.format = AUDIO_S16LSB;
desired.format = AUDIO_S16SYS;
desired.samples = 1024;
desired.channels = 2;
desired.callback = SDL_SoundCallback;
@@ -119,7 +119,7 @@ qboolean SNDDMA_Init( void )
return false;
}
if( obtained.format != AUDIO_S16LSB )
if( obtained.format != AUDIO_S16SYS )
{
Con_Printf( "SDL audio format %d unsupported.\n", obtained.format );
goto fail;

View File

@@ -123,7 +123,7 @@ qboolean SNDDMA_Init( void )
memset( &desired, 0, sizeof( desired ) );
desired.freq = SOUND_DMA_SPEED;
desired.format = AUDIO_S16LSB;
desired.format = AUDIO_S16SYS;
desired.samples = 1024;
desired.channels = 2;
desired.callback = SDL_SoundCallback;
@@ -136,7 +136,7 @@ qboolean SNDDMA_Init( void )
return false;
}
if( obtained.format != AUDIO_S16LSB )
if( obtained.format != AUDIO_S16SYS )
{
Con_Printf( "SDL audio format %d unsupported.\n", obtained.format );
goto fail;
@@ -277,7 +277,7 @@ qboolean VoiceCapture_Init( void )
SDL_zero( wanted );
wanted.freq = voice.samplerate;
wanted.format = AUDIO_S16LSB;
wanted.format = AUDIO_S16SYS;
wanted.channels = VOICE_PCM_CHANNELS;
wanted.samples = voice.frame_size;
wanted.callback = SDL_SoundInputCallback;