libsdl-org / SDL

Simple Directmedia Layer

Home Page:https://libsdl.org

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

SDL_SetAudioDeviceFrequencyRatio and SDL_GetAudioDeviceFrequencyRatio

luppichristian opened this issue · comments

Since SDL_SetAudioDeviceGain() and SDL_GetAudioDeviceGain() was added,
it would be useful to also have a setter and getter for the frequency ratio to match the audio stream API.

Maybe we should remove SDL_SetAudioDeviceGain() and SDL_GetAudioDeviceGain()?

I think it would be useful to keep them since you can use audio devices to "group" audio streams.
For example you could manage the "master" volume and frequency ratio only operating on the audio device, instead of each individual audio stream.

We're 100% not adding per-device frequency. I'm not sure what one would use it for, and making that work would probably be disproportionately complex.

But there is something useful to a master gain value to adjust all playing things at once, so I would rather leave that.