get_volume(3)

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

πŸ’– 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_volume and midi_volume must be valid pointers to int.
  • ...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? pass NULL for digi_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 πŸ‘‘


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