Explorar o código

Use DSBFREQUENCY_MAX instead of hardcoded constant for DirectSound driver max frequency.

(cherry picked from commit 1d2f9f0e0e1745b5a1122469155ac0ead1907e67)
Regan Green hai 1 día
pai
achega
764d7633ea
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  1. 1 1
      src/audio/directsound/SDL_directsound.c

+ 1 - 1
src/audio/directsound/SDL_directsound.c

@@ -545,7 +545,7 @@ static bool DSOUND_OpenDevice(SDL_AudioDevice *device)
             tried_format = true;
 
             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
             SDL_UpdatedAudioDeviceFormat(device);