AuSetDeviceAttributes(3)
β¨ AuSetDeviceAttributes β¨
okay bestie, so this is a page from the Library Functions Manual for AuSetDeviceAttributes(3) β yes the whole name is giving very much "I have a long government name but you can call me by my function" π
and honestly? iconic.
πΈ Name πΈ
AuSetDeviceAttributes β set device attributes. that's it. that's the whole job. she sets the attributes. no cap. π
π¦ Synopsis π¦
#include <audio/audiolib.h>
void AuSetDeviceAttributes(server, device, valuemask, attributes, status)
AuServer *server;
AuDeviceID device;
AuMask valuemask;
AuDeviceAttributes *attributes;
AuStatus *status; /* RETURN */
like, look at her. five arguments. a void return. absolutely no drama, all business. periodt. π
π Arguments π
serverβ the connection to the audio server. your lil hotline to the server, basically. she needs to know who she's talking to fr fr.deviceβ the ID of the device. which one are we messing with? give her the ID, bestie. π«Άvaluemaskβ this one is the main character ngl. it says which values insideattributesare actually gonna get used. and listen β it must be a bitwise inclusive OR of one or more of these constants, no substitutes allowed:AuCompCommonIDMaskAuCompCommonKindMaskAuCompCommonUseMaskAuCommonFormatMaskAuCommonNumTracksMaskAuCommonAccessMaskAuCommonDescriptionMaskAuCompDeviceGainMaskAuCompDeviceLineModeMask
pick at least one. OR them together. that's the vibe check. β¨
attributesβ the structure where the values come from. and which values? only the onesvaluemaskpointed at. it's giving very "we only take what's on the list" energy. πstatusβ if this isn'tNULL, she flushes the output buffer and returns the status straight from the server. if it isNULL? nothing comes back. your call, bestie./* RETURN */btw, in case the comment didn't already scream it. π
π Description π
so AuSetDeviceAttributes sets the attributes of device, and the way it does that is only using the values in attributes that valuemask told her to use. surgical. selective. lowkey perfect. πΈ
β οΈ but here's the thing β if you try to change attributes that are not marked as changable, it will fail with a AuBadValue error. so likeβ¦ don't do that. she will not be flexible about it. not even a little. π
π Errors π
AuBadDeviceAuBadLengthAuBadValue
three ways to ruin her day. avoid them. π
π See Also π
AuGetDeviceAttributesβ the other half of the duo. she sets, that one gets. balance. π§audiolibβ Network Audio System C Language Interface. the whole universe this function lives in. π
and that's the page, bestie!! this one shipped as part of audiolib - device attributes, version 1.9.4, and she's filed under AuSetDeviceAttributes(3). go forth and set those attributes responsibly, mwah ππβ¨
π¦ where this page comes from
- debian bookworm: libaudio-dev 1.9.4-7
- debian trixie: libaudio-dev 1.9.4-9
- ubuntu jammy: libaudio-dev 1.9.4-7build1
- ubuntu noble: libaudio-dev 1.9.4-8
- ubuntu questing: libaudio-dev 1.9.4-9
- ubuntu resolute: libaudio-dev 1.9.4-9.2
- ubuntu stonking: libaudio-dev 1.9.4-9.2
- 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