AuListDevices(3)

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

✨ AuListDevices β€” the "who's in the building" page πŸ’–

okay bestie, we're in the audiolib manual, section 3 (library functions), and this page is all about AuListDevices. it's giving ✨device roster✨ energy, and honestly? obsessed. πŸŽ€


🌸 NAME 🌸

AuListDevices β€” list devices. yes bestie, that's the whole job. it lists devices. iconic behavior, no notes. πŸ’…


πŸ¦‹ SYNOPSIS πŸ¦‹

#include <audio/audiolib.h>

AuDeviceAttributes *AuListDevices(server, valuemask, attributes,
ndevices, status)
    AuServer *server;
    AuMask valuemask;
    AuDeviceAttributes *attributes;
    int *ndevices; /* RETURN */
    AuStatus *status; /* RETURN */

so you pull in <audio/audiolib.h> first (obviously, she's the moment), and then you've got this function handing you back a pointer to AuDeviceAttributes. the two little /* RETURN */ notes are your lil reminders that ndevices and status are coming back out of the function, not going in. pay attention to the asterisks, bestie, they're load-bearing. 😭


πŸ’œ ARGUMENTS πŸ’œ

  • server β€” the connection to the audio server. your lil handshake with the main character. 🀝
  • valuemask β€” this one tells the function which device attributes are actually defined inside the attributes argument. and listen, it has to be a bitwise inclusive OR of zero or more of these constants, no substitutions: AuCompCommonIDMask, AuCompCommonKindMask, AuCompCommonUseMask, AuCommonFormatMask, AuCommonNumTracksMask, AuCommonAccessMask, AuCommonDescriptionMask, AuCompDeviceMinSampleRateMask, AuCompDeviceMaxSampleRateMask, AuCompDeviceLocationMask, AuCompDeviceGainMask, AuCompDeviceLineModeMask, AuCompDeviceChildrenMask, or AuCompDeviceMasks. and if valuemask is zero? then the attributes are ignored and are not referenced. so don't stress about that struct, she's off duty. πŸ™ˆ
  • attributes β€” the structure where the values get pulled from, as specified by the value mask. she's the source, the blueprint, the vibe reference. πŸŽ€
  • ndevices β€” returns the number of devices in the returned list. the headcount, fr fr. πŸ”’
  • status β€” if it's non-NULL, it flushes the output buffer and returns the status from the server. if it's NULL, she simply does not. πŸ’…

🌈 DESCRIPTION 🌈

AuListDevices returns a list of devices whose attributes match those values in attributes specified by valuemask. that's it, that's the whole slay. ✨

but if there was an error? she returns NULL, with ndevices set to 0. so an empty roster, no cap. πŸ’€

and when you're done with the list, use AuFreeDeviceList to release the memory in the list once it's no longer needed. do NOT just walk away from that memory, bestie, that's not the vibe. free her. 🫢


πŸ”₯ ERRORS πŸ”₯

  • AuBadLength.

just the one. short king. πŸ‘‘


πŸ’– SEE ALSO πŸ’–

  • AuGetDeviceAttributes.
  • audiolib β€” Network Audio System C Language Interface

and that's the whole page, angel! 🧚 this one's from audiolib, the device attributes section, version 1.9.5, and it belongs to the AuListDevices(3) manual page. go forth and list those devices. periodt. πŸ‘‘πŸ’œ

πŸ“¦ where this page comes from