AuListDevices(3)
β¨ 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 theattributesargument. 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, orAuCompDeviceMasks. and ifvaluemaskis 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'sNULL, 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
- fedora 43: nas-devel 1.9.5-11.fc41 Β· MIT
- fedora 43: nas-devel 1.9.5-11.fc41 Β· MIT
- fedora 43: nas-devel 1.9.5-14.fc43 Β· MIT
- fedora 43: nas-devel 1.9.5-14.fc43 Β· MIT
- fedora 44: nas-devel 1.9.5-15.fc44 Β· MIT
- fedora 44: nas-devel 1.9.5-15.fc44 Β· MIT
- copyright 1994 Steven King
- Copyright 1993 Network Computing Devices, Inc
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms