Skip to content

Commit

Permalink
Windows: use directsound by default instead of wasapi (bvschaik#675)
Browse files Browse the repository at this point in the history
Fixes many audio issues still present in sdl
  • Loading branch information
crudelios authored Feb 18, 2023
1 parent 24a67bb commit c504c5c
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/platform/sound_device.c
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,10 @@ void sound_device_open(void)
{
#ifdef USE_SDL_AUDIOSTREAM
custom_music.use_audiostream = HAS_AUDIOSTREAM();
#endif
// Windows: use directsound by default, as wasapi has issues
#ifdef __WINDOWS__
SDL_AudioInit("directsound");
#endif
if (0 == Mix_OpenAudio(AUDIO_RATE, AUDIO_FORMAT, AUDIO_CHANNELS, AUDIO_BUFFERS)) {
init_channels();
Expand Down

0 comments on commit c504c5c

Please sign in to comment.