SDL: Use DSBFREQUENCY_MAX instead of hardcoded constant for DirectSound driver max frequency. (764d7)

From 764d7633ea1ef4e2451d4caf2cf99a2f52dbf9b2 Mon Sep 17 00:00:00 2001
From: Regan Green <[EMAIL REDACTED]>
Date: Wed, 25 Mar 2026 20:02:34 -0400
Subject: [PATCH] Use DSBFREQUENCY_MAX instead of hardcoded constant for
 DirectSound driver max frequency.

(cherry picked from commit 1d2f9f0e0e1745b5a1122469155ac0ead1907e67)
---
 src/audio/directsound/SDL_directsound.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/audio/directsound/SDL_directsound.c b/src/audio/directsound/SDL_directsound.c
index 445d14a7167f4..89480ee49d5f6 100644
--- a/src/audio/directsound/SDL_directsound.c
+++ b/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);