set_sound_input_source(3alleg4)

πŸ’– set_sound_input_source πŸ’–

okay bestie, so this is a page from the Allegro manual β€” that's the Allegro game programming library, version 4.4.3, and yes we're about to talk about picking which audio input you want your program to listen to. it's giving audio engineer but make it C. πŸŽ€


✨ NAME ✨

set_sound_input_source β€” picks which audio input source you're recording from. literally the "which mic is live rn" button of the Allegro game programming library. 🎀


🌸 SYNOPSIS 🌸

#include <allegro.h>

int set_sound_input_source(int source);

πŸ¦‹ DESCRIPTION πŸ¦‹

okay so here's the tea β˜• β€” this function selects the audio input source. that's it, that's the whole job, and honestly? iconic for it.

the parameter you pass in has to be one of these values, no substitutions, no improvising, bestie:

  • SOUND_INPUT_MIC β€” the microphone vibe πŸŽ™οΈ
  • SOUND_INPUT_LINE β€” the line-in vibe πŸ”Œ
  • SOUND_INPUT_CD β€” the CD audio vibe πŸ’Ώ

pick your fighter, pass it in, and the hardware knows what's up. periodt.


⭐ RETURN VALUE ⭐

  • it returns zero on success β€” slay, we ate, the source is set πŸ’…
  • it returns -1 if the hardware does not provide an input select register β€” which means, in plain english, you have no control over the input source. the hardware said "no ❀️" and there's genuinely nothing you can do about it. not a skill issue, just a hardware issue 😭

🌈 SEE ALSO 🌈


lowkey reminder: this whole page is Allegro manual energy, so if the hardware doesn't cooperate, don't take it personally. the register just isn't there. iykyk. πŸ’€

and that's a wrap on set_sound_input_source!! πŸ’–βœ¨ this lil page came to you courtesy of the Allegro manual, version 4.4.3 β€” the same version stamped right there on the page footer, no cap. go forth and select your audio input, main character. πŸ‘‘πŸŒΈπŸ’