Skip to content

Commit 764d763

Browse files
cuckydevslouken
authored andcommitted
Use DSBFREQUENCY_MAX instead of hardcoded constant for DirectSound driver max frequency.
(cherry picked from commit 1d2f9f0)
1 parent fda7c0b commit 764d763

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/audio/directsound/SDL_directsound.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -545,7 +545,7 @@ static bool DSOUND_OpenDevice(SDL_AudioDevice *device)
545545
tried_format = true;
546546

547547
device->spec.format = test_format;
548-
device->spec.freq = SDL_min(200000, device->spec.freq); // DirectSound has an arbitrary limit of 200,000Hz.
548+
device->spec.freq = SDL_min(DSBFREQUENCY_MAX, device->spec.freq);
549549

550550
// Update the fragment size as size in bytes
551551
SDL_UpdatedAudioDeviceFormat(device);

0 commit comments

Comments
 (0)