Skip to content

Commit

Permalink
don't allow SDL2 to change channels count
Browse files Browse the repository at this point in the history
  • Loading branch information
nesbox committed May 13, 2020
1 parent df13c96 commit 0feb848
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/system/sdlgpu.c
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,7 @@ static void initSound()
.userdata = NULL,
};

platform.audio.device = SDL_OpenAudioDevice(NULL, 0, &want, &platform.audio.spec, SDL_AUDIO_ALLOW_ANY_CHANGE);
platform.audio.device = SDL_OpenAudioDevice(NULL, 0, &want, &platform.audio.spec, SDL_AUDIO_ALLOW_FREQUENCY_CHANGE | SDL_AUDIO_ALLOW_FORMAT_CHANGE | SDL_AUDIO_ALLOW_SAMPLES_CHANGE);

SDL_BuildAudioCVT(&platform.audio.cvt, want.format, want.channels, platform.audio.spec.freq, platform.audio.spec.format, platform.audio.spec.channels, platform.audio.spec.freq);

Expand Down

0 comments on commit 0feb848

Please sign in to comment.