get_hardware_volume(3)
β¨ 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 tointorNULL. 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
- 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