AuDeviceAttributes(3)
π NAME π
AuDeviceAttributes β bestie, it's the device attributes structure. the whole lil' bundle of info about a piece of audio hardware. that's it, that's the vibe. β¨
π STRUCTURES π
okay so first you gotta pull in the header, no cap:
#include <audio/audiolib.h>
and here's the struct itself β yes it's got mystery . . . energy in the middle and that's on purpose:
typedef struct _AuDeviceAttributes
{
. . .
} AuDeviceAttributes;
πΈ MEMBERS πΈ
π¨ NOT ME FORGETTING TO SAY THIS: do not dereference the members of the AuDeviceAttributes structure directly, okay?? like, hands off. use the access macros instead. that's the whole point of them. periodt.
so throughout this whole section, da is a pointer to a AuDeviceAttributes structure. got it? good. π«Ά
AuDeviceValueMask(da)β grabs theAuMaskvalue that tells you 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. iconic lineup honestly πAuDeviceChangableMask(da)β grabs theAuMaskvalue that says which attributes can be changed. also a bitwise inclusive OR of:AuCompCommonIDMask,AuCompCommonKindMask,AuCompCommonUseMask,AuCompCommonFormatMask,AuCompCommonNumTracksMask,AuCompCommonAccessMask,AuCompCommonDescriptionMask,AuCompDeviceMinSampleRateMask,AuCompDeviceMaxSampleRateMask,AuCompDeviceLocationMask,AuCompDeviceGainMask,AuCompDeviceLineModeMask, andAuCompDeviceChildrenMask. yes bestie it's the same list, i'm not playing, that's literally what it says πAuDeviceIdentifier(da)β grabs theAuFlowIDID of the device. its little name tag π·οΈAuDeviceKind(da)β grabs theintvalue that tells you what kind of component this is. devices are eitherAuComponentKindPhysicalInputorAuComponentKindPhysicalOutput. in or out, pick a lane πAuDeviceUse(da)β grabs theAuMaskvalue for what uses of the device are permitted. bitwise inclusive OR of:AuComponentUseImportMaskandAuComponentUseExportMask.AuDeviceFormat(da)β grabs theintvalue for the audio data format the device uses. right now these formats are defined:AuFormatULAW8,AuFormatLinearUnsigned8,AuFormatLinearSigned8,AuFormatLinearSigned16MSB,AuFormatLinearUnsigned16MSB,AuFormatLinearSigned16LSB, andAuFormatLinearUnsigned16LSB. that's the whole roster, no extras.AuDeviceNumTracks(da)β grabs theintvalue for how many tracks the device supports. multitrack queen πAuDeviceAccess(da)β grabs theAuMaskvalue for what kinds of access are allowed. bitwise inclusive OR of:AuAccessImportMask,AuAccessExportMask,AuAccessDestroyMask, andAuAccessListMask.AuDeviceDescription(da)β grabs theAuStringstructure holding a textual description of the device. words! about your hardware! so cute πAuDeviceMinSampleRate(da)β grabs theunsigned intvalue for the minimum sample rate the device supports. the floor, literally.AuDeviceMaxSampleRate(da)β grabs theunsigned intvalue for the maximum sample rate the device supports. the ceiling, also literally.AuDeviceLocation(da)β grabs theAuMaskvalue for where the device is. bitwise inclusive OR of:AuDeviceLocationLeftMask,AuDeviceLocationCenterMask,AuDeviceLocationRightMask,AuDeviceLocationTopMask,AuDeviceLocationMiddleMask,AuDeviceLocationBottomMask,AuDeviceLocationBackMask,AuDeviceLocationFrontMask,AuDeviceLocationInternalMask, andAuDeviceLocationExternalMask. it's giving surround sound, it's giving 3D chess π§AuDeviceGain(da)β grabs theAuFixedPointvalue with the current hardware amplification level. turn it up πAuDeviceLineMode(da)β grabs theAuInt32value for the current line mode. heads up: this is input device only, so don't come for it on an output device πAuDeviceNumChildren(da)β grabs theintvalue for how many subcomponents the device has. it has kids!! πAuDeviceChildren(da)β grabs the list ofAuDeviceID's of the subcomponents of the device. the whole family tree, slay.
π¦ DESCRIPTION π¦
so like, the AuDeviceAttributes structure describes the physical hardware interface. that's the main character summary. the hardware. the physical stuff. the real ones. π
β SEE ALSO β
AuGetDeviceAttributes,AuListDevices.audiolibβ Network Audio System C Language Interface
okay that's the whole page bestie, you ate it up, no crumbs π β¨
this was the audiolib device attributes structure page, version 1.9.4, from the Library Functions Manual β mwah, go read AuGetDeviceAttributes next, ily π«Άππ
π¦ 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