get_sound_input_cap_bits(3)
β¨ get_sound_input_cap_bits β¨
ok so bestie, we're in the Allegro manual today and this one's a lil function called get_sound_input_cap_bits. she's small, she's mighty, and she's here to tell you which audio input sample formats your current driver is actually vibing with. π
πΈ NAME πΈ
get_sound_input_cap_bits β checks which audio input sample formats are supported. Allegro game programming library. periodt.
π SYNOPSIS π
#include <allegro.h>
int get_sound_input_cap_bits();
π DESCRIPTION π
ok so what she does is: she checks which sample formats are supported by the current audio input driver, and she hands you back one of these bitfield values. no cap, that's the whole job:
0 = audio input not supported
8 = eight bit audio input is supported
16 = sixteen bit audio input is supported
24 = both eight and sixteen bit audio input are supported
lowkey important:24is just8 | 16doing its little bitwise thing, so you can absolutely test the individual bits yourself. the example below does exactly that and honestly? she ate. π₯
Example, straight from the source, don't touch a single character:
cap = get_sound_input_cap_bits();
if (cap == 0) {
/* Ugh, no audio input supported? */
} else {
if (cap & 8) {
/* We have eight bit audio input. */
}
if (cap & 16) {
/* We have sixteen bit audio input. */
}
}
see how it works? if cap comes back as 0 you're in your no audio input era π and if it's anything else you check the bits and see what you're working with. cap & 8 for eight bit, cap & 16 for sixteen bit. main character energy, honestly. π
π¦ SEE ALSO π¦
start_sound_input(3)get_sound_input_cap_parm(3)get_sound_input_cap_rate(3)get_sound_input_cap_stereo(3)
go read those next bestie, they're all in the same squad π«Ά
and that's the whole page, bestie! π this lil icon lives in Allegro, version 4.4.3, and it's filed under get_sound_input_cap_bits(3) β mwah, love that for her. πβ¨π
π¦ where this page comes from
- fedora 43: allegro-devel 4.4.3.1-18.fc43 Β· Giftware
- fedora 43: allegro-devel 4.4.3.1-18.fc43 Β· Giftware
- fedora 44: allegro-devel 4.4.3.1-20.fc44 Β· Giftware
- fedora 44: allegro-devel 4.4.3.1-20.fc44 Β· Giftware
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms