GET_SOUND_INPUT_CAP_BITS(3alleg4)
π get_sound_input_cap_bits β aka "wait, can my audio input even DO that??" π
okay bestie, so this one lives in the Allegro manual (yes, the Allegro game programming library, the whole vibe). It's get_sound_input_cap_bits, and it is exactly the kind of function you go looking for at 2am when your audio input is doing something mysterious and you need answers. β¨
πΈ SYNOPSIS πΈ
#include <allegro.h>
int get_sound_input_cap_bits();
π DESCRIPTION π
so the whole job of this girl is: she checks which sample formats the current audio input driver actually supports, and hands you back one of these bitfield values. no cap, that's it, that's the tea. π«Ά
0= audio input not supported π8= eight bit audio input is supported16= sixteen bit audio input is supported24= both eight and sixteen bit audio input are supported π
and here's an example, because seeing it in action hits different:
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. */
}
}
likeβ¦ the cap == 0 branch is giving tragic, but at least now you know, bestie. knowledge is power. π
π SEE ALSO π
start_sound_input(3alleg4)get_sound_input_cap_parm(3alleg4)get_sound_input_cap_rate(3alleg4)get_sound_input_cap_stereo(3alleg4)
and that's the whole page, gorgeous π this was the <b>Allegro</b> manual, <b>version 4.4.3</b> β mwah, go check your bitfield, ily, bye πβ¨π¦
π¦ where this page comes from
- debian bookworm: allegro4-doc 2:4.4.3.1-3 Β· Allegro-gift-ware
- debian trixie: allegro4-doc 2:4.4.3.1-5 Β· Allegro-gift-ware
- ubuntu jammy: allegro4-doc 2:4.4.3.1-2 Β· Allegro-gift-ware
- ubuntu noble: allegro4-doc 2:4.4.3.1-4.1build3 Β· Allegro-gift-ware
- ubuntu questing: allegro4-doc 2:4.4.3.1-6
- ubuntu resolute: allegro4-doc 2:4.4.3.1-7 Β· Allegro-gift-ware
- ubuntu stonking: allegro4-doc 2:4.4.3.1-9 Β· Allegro-gift-ware
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms