AuDeviceAttributes(3)
π AuDeviceAttributes β device attributes structure π
okay bestie, welcome to the AuDeviceAttributes page from the Library Functions Manual β yes, that's the same crew that brings you audiolib, the Network Audio System C Language Interface. sit down, grab a strawberry π, and let's get into it.
β¨ Structures β¨
first things first, the header. you gotta pull it in:
#include <audio/audiolib.h>
and here's the struct itself, iconic, mysterious, full of . . .:
typedef struct _AuDeviceAttributes
{
. . .
}AuDeviceAttributes;
π Members π
π¨ NO CAP, IMPORTANT: do not dereference the members of the AuDeviceAttributes structure directly. that's not the vibe. use the access macros instead, bestie. periodt.
so, throughout all of this: da is a pointer to a AuDeviceAttributes structure. keep that in your notes π
AuDeviceValueMask(da)β gets you theAuMaskvalue that says which attributes are actually present. it's a bitwise inclusive OR of these constants:AuCompCommonIDMask,AuCompCommonKindMask,AuCompCommonUseMask,AuCompCommonFormatMask,AuCompCommonNumTracksMask,AuCompCommonAccessMask,AuCompCommonDescriptionMask,AuCompDeviceMinSampleRateMask,AuCompDeviceMaxSampleRateMask,AuCompDeviceLocationMask,AuCompDeviceGainMask,AuCompDeviceLineModeMask, andAuCompDeviceChildrenMask. that's a lot of masks, but we ate πAuDeviceChangableMask(da)β gets you theAuMaskvalue that says which attributes can be changed. also a bitwise inclusive OR of these constants:AuCompCommonIDMask,AuCompCommonKindMask,AuCompCommonUseMask,AuCompCommonFormatMask,AuCompCommonNumTracksMask,AuCompCommonAccessMask,AuCompCommonDescriptionMask,AuCompDeviceMinSampleRateMask,AuCompDeviceMaxSampleRateMask,AuCompDeviceLocationMask,AuCompDeviceGainMask,AuCompDeviceLineModeMask, andAuCompDeviceChildrenMask. yes, same list as above, and yes, that's on purpose π«ΆAuDeviceIdentifier(da)β gets you theAuFlowIDID of the device. its little name tag π·οΈAuDeviceKind(da)β gets you theintvalue saying what kind of component this is. devices are eitherAuComponentKindPhysicalInputorAuComponentKindPhysicalOutput. pick your fighter.AuDeviceUse(da)β gets you theAuMaskvalue saying which uses of the device are permitted. bitwise inclusive OR of:AuComponentUseImportMaskandAuComponentUseExportMask.AuDeviceFormat(da)β gets you theintvalue saying the audio data format the device uses. rn the defined formats are:AuFormatULAW8,AuFormatLinearUnsigned8,AuFormatLinearSigned8,AuFormatLinearSigned16MSB,AuFormatLinearUnsigned16MSB,AuFormatLinearSigned16LSB, andAuFormatLinearUnsigned16LSB. seven formats, all valid, all slaying β¨AuDeviceNumTracks(da)β gets you theintvalue saying how many tracks the device supports. multitrack queen πAuDeviceAccess(da)β gets you theAuMaskvalue saying which kinds of access are allowed. bitwise inclusive OR of:AuAccessImportMask,AuAccessExportMask,AuAccessDestroyMask, andAuAccessListMask.AuDeviceDescription(da)β gets you theAuStringstructure holding a textual description of the device. the bio, basically πAuDeviceMinSampleRate(da)β gets you theunsigned intvalue saying the minimum sample rate the device supports.AuDeviceMaxSampleRate(da)β gets you theunsigned intvalue saying the maximum sample rate the device supports. min and max, a matched set πAuDeviceLocation(da)β gets you theAuMaskvalue saying where the device is located. bitwise inclusive OR of:AuDeviceLocationLeftMask,AuDeviceLocationCenterMask,AuDeviceLocationRightMask,AuDeviceLocationTopMask,AuDeviceLocationMiddleMask,AuDeviceLocationBottomMask,AuDeviceLocationBackMask,AuDeviceLocationFrontMask,AuDeviceLocationInternalMask, andAuDeviceLocationExternalMask. (heads up: no period after that last one in the source, we're keeping it exactly as-is, character for character, iykyk)AuDeviceGain(da)β gets you theAuFixedPointvalue with the current hardware amplification level. turn it up πAuDeviceLineMode(da)β gets you theAuInt32value saying the current line mode. input device only, so don't come for it if you're on output, bestie πAuDeviceNumChildren(da)β gets you theintvalue saying how many subcomponents the device has. it's giving family tree π³AuDeviceChildren(da)β gets you the list ofAuDeviceID's of the subcomponents of the device. the whole friend group π
πΈ Description πΈ
okay so the AuDeviceAttributes structure describes the physical hardware interface. that's it, that's the whole job, and honestly? it does it beautifully. main character energy fr fr π
π¦ See Also π¦
AuGetDeviceAttributesAuListDevicesaudiolibβ Network Audio System C Language Interface
and that's the page, bestie!! this one's from audiolib 1.9.5, and yeah, the footer really does say "audiolib - device attributes stru... 1.9.5" because even the manpage footer got truncated mid-sentence and honestly, relatable π anyway, AuDeviceAttributes(3), Library Functions Manual, that's a wrap. go use your access macros. not the struct directly. never the struct directly. mwah πβ¨
π¦ 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