SDL_AUDIO_MASK_FLOAT(3)
π SDL_AUDIO_MASK_FLOAT π
okay bestie, so this is a page from the SDL3 FUNCTIONS manual and it's literally about one tiny macro. one. macro. and she's important, so let's give her the attention she deserves π
β¨ NAME β¨
SDL_AUDIO_MASK_FLOAT β the mask of bits in an SDL_AudioFormat that hold the floating point flag. that's it, that's the whole job π
β¨ SYNOPSIS β¨
#include <SDL3/SDL_audio.h>
#define SDL_AUDIO_MASK_FLOAT (1u<<8)
yes queen, it's a #define, and the value is exactly (1u<<8). do not touch it. do not round it. do not get creative π
β¨ DESCRIPTION β¨
so like, generally? you should be using SDL_AUDIO_ISFLOAT instead of this macro directly. fr fr. this one is the lowkey behind-the-scenes bitsy β she's the mask that carves out the floating point flag inside an SDL_AudioFormat, but she is not the one you're supposed to chat with at the function party. that's SDL_AUDIO_ISFLOAT's whole thing πΈ
think of SDL_AUDIO_MASK_FLOAT as the girl who holds the sign and SDL_AUDIO_ISFLOAT as the girl who reads it and tells you the answer. main character vs. supporting cast, iykyk π
lowkey a warning but in the gentlest way possible: the docs say "generally one should use SDL_AUDIO_ISFLOAT instead of this macro directly." so like. use the other one. she's right there. π«Ά
β¨ AVAILABILITY β¨
this macro has been slaying since SDL 3.2.0 β¨ so if you're on anything older, no she isn't. sorry bestie π
and that's the whole page!! obsessed with how short and iconic this one is. no cap, she ate and left zero crumbs π¦
Simple Directmedia Layer β version SDL 3.4.18 β that's the source and the version, straight from the footer, mwah π periodt π
π¦ where this page comes from
- fedora 43: SDL3-devel 3.4.18-1.fc43 Β· Zlib AND MIT AND Apache-2.0 AND (Apache-2.0 OR MIT)
- fedora 43: SDL3-devel 3.4.18-1.fc43 Β· Zlib AND MIT AND Apache-2.0 AND (Apache-2.0 OR MIT)
- fedora 44: SDL3-devel 3.4.18-1.fc44 Β· Zlib AND MIT AND Apache-2.0 AND (Apache-2.0 OR MIT)
- fedora 44: SDL3-devel 3.4.18-1.fc44 Β· Zlib AND MIT AND Apache-2.0 AND (Apache-2.0 OR MIT)
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms