mirror of
https://github.com/libsdl-org/SDL.git
synced 2026-05-28 20:09:38 +08:00
Use DSBFREQUENCY_MAX instead of hardcoded constant for DirectSound driver max frequency.
This commit is contained in:
committed by
Ryan C. Gordon
parent
6efe0e19a7
commit
1d2f9f0e0e
@@ -545,7 +545,7 @@ static bool DSOUND_OpenDevice(SDL_AudioDevice *device)
|
|||||||
tried_format = true;
|
tried_format = true;
|
||||||
|
|
||||||
device->spec.format = test_format;
|
device->spec.format = test_format;
|
||||||
device->spec.freq = SDL_min(200000, device->spec.freq); // DirectSound has an arbitrary limit of 200,000Hz.
|
device->spec.freq = SDL_min(DSBFREQUENCY_MAX, device->spec.freq);
|
||||||
|
|
||||||
// Update the fragment size as size in bytes
|
// Update the fragment size as size in bytes
|
||||||
SDL_UpdatedAudioDeviceFormat(device);
|
SDL_UpdatedAudioDeviceFormat(device);
|
||||||
|
|||||||
Reference in New Issue
Block a user