get_hardware_volume(3alleg4)
β¨ NAME β¨
get_hardware_volume β the little function that goes and asks your sound card "hey bestie, how loud are you rn?" π It's part of the Allegro game programming library, so you already know it's iconic.
πΈ SYNOPSIS πΈ
#include <allegro.h>
void get_hardware_volume(int *digi_volume, int *midi_volume);
π DESCRIPTION π
okay so here's the tea β β get_hardware_volume retrieves the hardware sound output volume, and it does it for both your digital samples and your MIDI playback, because why would it do one when it can do both? main character energy fr fr π
The values come back as integers from 0 to 255, or -1 if the information is not available. So if you get a -1, that's the function literally saying "idk her π" β the info just isn't there.
The parameters digi_volume and midi_volume must be valid pointers to int. But here's the cute part β if you're not interested in one of the specific values, you can just pass NULL for that one and it's totally fine. Lowkey flexible, highkey slay. π¦
π«Ά Friendly lil reminder bestie: valid pointers only. Passing garbage where a pointer should be is not the vibe, and the function will not be nice about it.
π SEE ALSO π
set_hardware_volume(3alleg4)β the one that sets it instead of getting it πget_volume(3alleg4)β different volume, still relevant, go read it β¨
and that's the whole page, no cap π this was Allegro, version 4.4.3 β tysm for reading, love u, bye bestie ππ
π¦ 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