SDL_HINT_AUDIO_DISK_TIMESCALE(3)

πŸ’– SDL_HINT_AUDIO_DISK_TIMESCALE πŸ’–

okay bestie, welcome to the SDL3 hints era ✨ this one lives in the SDL3 man pages and it's all about making the disk audio driver go zoom zoom or slow-mo. no cap.


🌸 NAME 🌸

SDL_HINT_AUDIO_DISK_TIMESCALE β€” a variable that controls the audio rate when you're using the disk audio driver. that's it, that's the whole vibe πŸŽ€


✨ SYNOPSIS ✨

#include <SDL3/SDL_hints.h>

#define SDL_HINT_AUDIO_DISK_TIMESCALE "SDL_AUDIO_DISK_TIMESCALE"

literally just pull in the header and the macro is right there, sitting pretty πŸ¦‹


πŸ’… DESCRIPTION πŸ’…

so here's the tea, bestie πŸ“ the disk audio driver normally simulates real-time for the audio rate that was specified. like, it pretends to be a clock. very method acting of it.

but!! you can use this variable to adjust that rate higher or lower β€” and it goes all the way down to 0. yes, zero. the floor is literally zero. πŸ’€

the default value is "1.0". periodt.

🫢 lowkey important: this hint should be set before an audio device is opened. set it late and it's giving too late bestie, the device already made its choices.

🌈 AVAILABILITY 🌈

this hint has been around since SDL 3.2.0. iconic, honestly. πŸ‘‘


Simple Directmedia Layer β€’ SDL 3.4.18 β€” mwah, that's the version, and this little page is SDL_HINT_AUDIO_DISK_TIMESCALE(3) saying byeee, go set your hint before you open that device πŸŽ€πŸ’–βœ¨

πŸ“¦ where this page comes from