get_hardware_volume(3)

πŸ“¦ version 4.4.3.1, in fedora 43, fedora 44

✨ get_hardware_volume(3) ✨

okay bestie, so this one lives in the Allegro manual (that's the Allegro game programming library, in case you were wondering πŸŽ€) and it's literally just a cute lil function called get_hardware_volume. she's here to spill the tea on your sound volume. πŸ’–


πŸ¦‹ SYNOPSIS πŸ¦‹

#include <allegro.h>

void get_hardware_volume(int *digi_volume, int *midi_volume);

🌸 DESCRIPTION 🌸

so what she does is retrieve the hardware sound output volume β€” and not just for one thing, bestie, for both of them:

  • digital samples 🎡
  • MIDI playback 🎹

and she hands them back to you as integers from 0 to 255. very demure, very mindful. ✨

but wait, there's a plot twist 😭 β€” if the info is not available, you get a -1 instead. it's giving "idk her". πŸ’€

now, the parameters:

  • digi_volume β€” your digital sample volume goes here.
  • midi_volume β€” your MIDI volume goes here.

and listen, these must be valid pointers to int, no cap. OR β€” and this is the slay part β€” you can pass NULL if you're simply not interested in that specific value. not me passing NULL for the MIDI volume because I only care about my samples πŸ™ˆ

real talk though: valid pointers to int or NULL. nothing else. don't be out here passing garbage, she will not be okay with it. πŸ’…

πŸ’œ SEE ALSO πŸ’œ


mwah 🫢 that's the whole page, she's short and she's iconic. this was brought to you by the Allegro girlies on version 4.4.3 β€” get_hardware_volume(3), forever and always. periodt. πŸ‘‘πŸŒˆβ­

πŸ“¦ where this page comes from