get_volume(3)
π get_volume(3) β the Allegro manual, but make it cute π
okay bestie, welcome to the Allegro game programming library, where we talk about sound and the numbers that control it. this one's short and sweet, so let's go π
β¨ NAME β¨
get_volume</purgle> β retrieves the global sound output volume. that's the whole job. she's an Allegro girlie through and through π¦
πΈ SYNOPSIS πΈ
#include <allegro.h>
void get_volume(int *digi_volume, int *midi_volume);
π DESCRIPTION π
so basically? get_volume hands you the global sound output volume, and it does it for both of the things at once: your digital samples and your MIDI playback. two for the price of one, we love a multitasker π
the values come back as integers, and the range is 0 to 255. that's it. that's the whole scale. lowkey elegant, no cap β¨
now here's the part where you have to pay attention, because this is the actual rule:
digi_volumeandmidi_volumemust be valid pointers toint.- ...or they can be
NULL, if you're just not interested in that specific value. π
like, if you only care about the MIDI volume and you literally could not care less about the digi one? passNULLfordigi_volume. the function will not be offended. she's chill like that π«Ά
but fr fr: "valid pointer" is not a vibe, it's a requirement. NULL is the only acceptable way to say "no thanks." π
π SEE ALSO π
set_volume(3)β the one who sets what this one gets. the other half of the ship πget_hardware_volume(3)β different volume, hardware flavour. iykyk β
and that's the whole page, bestie, you ate it π
this was Allegro, version 4.4.3, and yes, the page name is get_volume(3) because she contains multitudes π
mwah, go read the man pages, ily π§ββοΈπ
π¦ 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