Skip to content

Commit

Permalink
Merge branch 'master' of https://github.com/8bitbubsy/pt2-clone
Browse files Browse the repository at this point in the history
  • Loading branch information
8bitbubsy committed Aug 20, 2024
2 parents 6564a25 + 4310182 commit c804490
Showing 1 changed file with 1 addition and 7 deletions.
8 changes: 1 addition & 7 deletions src/pt2_audio.c
Original file line number Diff line number Diff line change
Expand Up @@ -430,7 +430,7 @@ bool setupAudio(void)
want.callback = audioCallback;
want.userdata = NULL;

dev = SDL_OpenAudioDevice(NULL, 0, &want, &have, SDL_AUDIO_ALLOW_ANY_CHANGE);
dev = SDL_OpenAudioDevice(NULL, 0, &want, &have, SDL_AUDIO_ALLOW_FREQUENCY_CHANGE);
if (dev == 0)
{
showErrorMsgBox("Couldn't open audio device:\n\"%s\"\n\nDo you have an audio device enabled and plugged in?", SDL_GetError());
Expand All @@ -445,12 +445,6 @@ bool setupAudio(void)
return false;
}

if (have.format != AUDIO_S16)
{
showErrorMsgBox("Couldn't open audio device:\nThis program only supports 16-bit audio streams. Sorry!");
return false;
}

audio.outputRate = have.freq;
audio.audioBufferSize = have.samples;
audio.oversamplingFlag = (audio.outputRate < 96000); // we do 2x oversampling if the audio output rate is below 96kHz
Expand Down

0 comments on commit c804490

Please sign in to comment.