AuSetDeviceAttributes(3)

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

πŸ’– AuSetDeviceAttributes β€” like, the audiolib glow-up for your device settings ✨

okay bestie, so this is a page from the audiolib manual (section 3, library functions, iykyk) and it's literally all about changing how a device on the Network Audio System behaves. it's giving "makeover montage but for audio hardware" πŸ’…


🌸 NAME 🌸

AuSetDeviceAttributes β€” set device attributes πŸŽ€


✨ SYNOPSIS ✨

#include <audio/audiolib.h>

void AuSetDeviceAttributes(server, device, valuemask, attributes,
status)
    AuServer *server;
    AuDeviceID device;
    AuMask valuemask;
    AuDeviceAttributes *attributes;
    AuStatus *status; /* RETURN */

no cap, that's the whole signature. write it down, it's important 🫢


πŸ¦‹ ARGUMENTS πŸ¦‹

  • server β€” the connection to the audio server. like, your lil hotline to the server, that's what this is.
  • device β€” the ID of the device. yes queen, you gotta say which device.
  • valuemask β€” specifies which values in attributes to used. (yes, the original says "to used", we're keeping it, it's canon πŸ’€) it has to be a bitwise inclusive OR of one or more of these constants:
    • AuCompCommonIDMask
    • AuCompCommonKindMask
    • AuCompCommonUseMask
    • AuCommonFormatMask
    • AuCommonNumTracksMask
    • AuCommonAccessMask
    • AuCommonDescriptionMask
    • AuCompDeviceGainMask
    • AuCompDeviceLineModeMask
  • attributes β€” the structure you're pulling the values from. which values? the ones the value mask told you about, bestie. that's the whole system.
  • status β€” if it's non-NULL, it flushes the output buffer and returns the status from the server. so like, if you actually wanna know how it went, don't pass NULL πŸ™ˆ

🌈 DESCRIPTION 🌈

AuSetDeviceAttributes sets the attributes of device using only those values in attributes specified by valuemask. it does not go rogue. it does not touch extra stuff. it does exactly what the mask says, periodt.

⚠️ real talk though: trying to change attributes that aren't marked as changable will fail with a AuBadValue error. so like, vibe check the device first, okay? 😭

πŸ’€ ERRORS πŸ’€

AuBadDevice, AuBadLength, AuBadValue.

that's the trio. if one of these shows up, that's the universe telling you something.


πŸ‘‘ SEE ALSO πŸ‘‘

AuGetDeviceAttributes β€” the read-only counterpart, for when you just wanna look πŸ‘€

audiolib β€” Network Audio System C Language Interface


and that's the page, bestie! this one's from the audiolib manual, page AuSetDeviceAttributes(3), version 1.9.5, filed under "device attributes" β€” mwah, iconic, go slay your audio setup πŸ’–βœ¨πŸŽ€

πŸ“¦ where this page comes from