Skip to content

SDL2: Limit DirectSound maximum sample rate#15267

Merged
icculus merged 1 commit intolibsdl-org:SDL2from
cuckydev:fix-dsound-max-frequency-sdl2
Mar 26, 2026
Merged

SDL2: Limit DirectSound maximum sample rate#15267
icculus merged 1 commit intolibsdl-org:SDL2from
cuckydev:fix-dsound-max-frequency-sdl2

Conversation

@cuckydev
Copy link
Copy Markdown
Contributor

Limits the maximum sample rate for DirectSound audio to DSBFREQUENCY_MAX, as otherwise the sound buffer will fail to be created (documented here, reported here).

The exact maximum frequency depends on the version of DirectSound being targeted, which is currently defined as DirectSound 8.0 in SDL2:

#define DIRECTSOUND_VERSION 0x0800

This PR is the same as #15266 and #15265 from the SDL3 branch.

@cuckydev cuckydev changed the title Limit DirectSound maximum sample rate SDL2: Limit DirectSound maximum sample rate Mar 26, 2026
@cuckydev cuckydev force-pushed the fix-dsound-max-frequency-sdl2 branch from 218a6c0 to 26e37f4 Compare March 26, 2026 01:00
@cuckydev cuckydev force-pushed the fix-dsound-max-frequency-sdl2 branch from 26e37f4 to 6872c21 Compare March 26, 2026 01:03
@icculus icculus merged commit f9e8203 into libsdl-org:SDL2 Mar 26, 2026
34 checks passed
@icculus
Copy link
Copy Markdown
Collaborator

icculus commented Mar 26, 2026

Thank you for jumping on this!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants