Skip to content

Commit 1d2f9f0

Browse files
cuckydevicculus
authored andcommitted
Use DSBFREQUENCY_MAX instead of hardcoded constant for DirectSound driver max frequency.
1 parent 6efe0e1 commit 1d2f9f0

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

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)