sdlGetAudioDeviceGain function
Get the gain of an audio device.
The gain of a device is its volume; a larger gain means a louder output, with a gain of zero being silence.
Audio devices default to a gain of 1.0f (no change in output).
Physical devices may not have their gain changed, only logical devices, and this function will always return -1.0f when used on physical devices.
\param devid the audio device to query. \returns the gain of the device or -1.0f on failure; call SDL_GetError() for more information.
\threadsafety It is safe to call this function from any thread.
\since This function is available since SDL 3.1.3.
\sa SDL_SetAudioDeviceGain
extern SDL_DECLSPEC float SDLCALL SDL_GetAudioDeviceGain(SDL_AudioDeviceID devid)
Implementation
double sdlGetAudioDeviceGain(int devid) {
final sdlGetAudioDeviceGainLookupFunction = libSdl3.lookupFunction<
Float Function(Uint32 devid),
double Function(int devid)>('SDL_GetAudioDeviceGain');
return sdlGetAudioDeviceGainLookupFunction(devid);
}