MIX_GetTrackGain(3)
β¨ MIX_GetTrackGain(3) β¨
okay bestie, welcome to the SDL_mixer3 corner of the manual, where we're gonna talk about MIX_GetTrackGain(3) and why it's lowkey the glow-up check for your track's volume π
πΈ NAME πΈ
MIX_GetTrackGain β get a track's gain control ποΈβ¨
π SYNOPSIS π
#include <SDL3_mixer/SDL_mixer.h>
float MIX_GetTrackGain(MIX_Track *track);
π¦ DESCRIPTION π¦
so this one is literally just a lil peek at the gain value π it hands you back the last value that got set through MIX_SetTrackGain() β that's it, that's the whole vibe.
and if nobody has ever explicitly set a gain on that track? no problem, you get 1.0f back. default queen behavior π (which, yes, means "no change to the volume," iykyk).
π FUNCTION PARAMETERS π
trackβ the track you're asking about, bestie. the one you wanna query. π«Ά
β RETURN VALUE β
it returns the track's current gain. that's the whole thing. slay. β¨
π THREAD SAFETY π
fr fr, you can call this from any thread. no cap. all threads are welcome at this party π no locks, no drama, no gatekeeping.
π AVAILABILITY π
this iconic lil function has been around since SDL_mixer 3.0.0. so if you're on anything olderβ¦ sorry bestie, it's giving upgrade era π
π₯ SEE ALSO π₯
MIX_SetTrackGain(3)β the one that actually sets the thing you're reading here πMIX_GetMixerGain(3)β same energy, but for the whole mixer ποΈ
and that's the tea π this page came from the SDL_mixer manual, sitting pretty at version SDL_mixer 3.2.4, filed under the SDL_mixer3 functions section (and yeah, the original footer said MIX_GetTrackGain(3) right back at us, so consider this your cute lil sign-off π). go forth and read your gains, queen π§β¨
π¦ where this page comes from
- fedora 44: SDL3_mixer-doc 3.2.4-3.fc44 Β· Zlib AND (GPL-2.0-or-later OR LGPL-2.0-or-later)
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms