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 the AuMask value 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, and AuCompDeviceChildrenMask. iconic lineup honestly πŸ’…
  • AuDeviceChangableMask(da) β€” grabs the AuMask value 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, and AuCompDeviceChildrenMask. yes bestie it's the same list, i'm not playing, that's literally what it says 😭
  • AuDeviceIdentifier(da) β€” grabs the AuFlowID ID of the device. its little name tag 🏷️
  • AuDeviceKind(da) β€” grabs the int value that tells you what kind of component this is. devices are either AuComponentKindPhysicalInput or AuComponentKindPhysicalOutput. in or out, pick a lane πŸ’€
  • AuDeviceUse(da) β€” grabs the AuMask value for what uses of the device are permitted. bitwise inclusive OR of: AuComponentUseImportMask and AuComponentUseExportMask.
  • AuDeviceFormat(da) β€” grabs the int value for the audio data format the device uses. right now these formats are defined: AuFormatULAW8, AuFormatLinearUnsigned8, AuFormatLinearSigned8, AuFormatLinearSigned16MSB, AuFormatLinearUnsigned16MSB, AuFormatLinearSigned16LSB, and AuFormatLinearUnsigned16LSB. that's the whole roster, no extras.
  • AuDeviceNumTracks(da) β€” grabs the int value for how many tracks the device supports. multitrack queen πŸ‘‘
  • AuDeviceAccess(da) β€” grabs the AuMask value for what kinds of access are allowed. bitwise inclusive OR of: AuAccessImportMask, AuAccessExportMask, AuAccessDestroyMask, and AuAccessListMask.
  • AuDeviceDescription(da) β€” grabs the AuString structure holding a textual description of the device. words! about your hardware! so cute πŸŽ€
  • AuDeviceMinSampleRate(da) β€” grabs the unsigned int value for the minimum sample rate the device supports. the floor, literally.
  • AuDeviceMaxSampleRate(da) β€” grabs the unsigned int value for the maximum sample rate the device supports. the ceiling, also literally.
  • AuDeviceLocation(da) β€” grabs the AuMask value for where the device is. bitwise inclusive OR of: AuDeviceLocationLeftMask, AuDeviceLocationCenterMask, AuDeviceLocationRightMask, AuDeviceLocationTopMask, AuDeviceLocationMiddleMask, AuDeviceLocationBottomMask, AuDeviceLocationBackMask, AuDeviceLocationFrontMask, AuDeviceLocationInternalMask, and AuDeviceLocationExternalMask. it's giving surround sound, it's giving 3D chess 🧚
  • AuDeviceGain(da) β€” grabs the AuFixedPoint value with the current hardware amplification level. turn it up πŸ”Š
  • AuDeviceLineMode(da) β€” grabs the AuInt32 value 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 the int value for how many subcomponents the device has. it has kids!! 🌈
  • AuDeviceChildren(da) β€” grabs the list of AuDeviceID'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