AuListBuckets(3)

πŸ’– AuListBuckets β€” list buckets, bestie πŸ’–

okay so this is a page from the audiolib manual (that's the Library Functions Manual, she's fancy), and today we're learning about AuListBuckets. yes queen, we're listing buckets. let's go πŸŽ€


✨ Name ✨

AuListBuckets β€” list buckets. that's it, that's the whole vibe πŸ’…


✨ Synopsis ✨

#include <audio/audiolib.h>

AuBucketAttributes *AuListBuckets(server, valuemask, attributes,
nbuckets, status)
    AuServer *server;
    AuMask valuemask;
    AuBucketAttributes *attributes;
    int *nbuckets; /* RETURN */
    AuStatus *status; /* RETURN */

so she takes five things and she gives you back a whole list of buckets. main character energy fr fr πŸ‘‘


✨ Arguments ✨

  • server β€” the connection to the audio server. like, your link to the mothership, your group chat with the server, your whole situationship with the audio daemon 🫢
  • valuemask β€” this tells everyone which bucket attributes are actually defined in attributes. it has to be a bitwise inclusive OR of zero or more of these constants, and yes bestie you have to use their exact government names:
    • AuCompCommonIDMask
    • AuCompCommonKindMask
    • AuCompCommonUseMask
    • AuCommonFormatMask
    • AuCommonNumTracksMask
    • AuCommonAccessMask
    • AuCommonDescriptionMask
    • AuCompBucketSampleRateMask
    • AuCompBucketNumSamplesMask
okay important: if valuemask is zero, the attributes get completely ignored and are not referenced. like, she doesn't even look at them. they're in her peripheral vision and she's choosing peace πŸ™ˆ
  • attributes β€” the struct where the values are being pulled from (the ones valuemask told us about). it's giving source material πŸ’œ
  • nbuckets β€” RETURN. she fills this in with the number of buckets in the list she hands back. a little receipt, as a treat 🧾
  • status β€” RETURN. if it's non-NULL, she flushes the output buffer and returns the status from the server. so she's like, "one sec, lemme make sure the server actually said something" ✨

✨ Description ✨

AuListBuckets returns a list of buckets whose attributes match the values in attributes that you specified with valuemask. iconic. we love a filtered list πŸ”₯

but listen β€” if there was an error, she returns NULL and sets nbuckets to 0. so if you get nothing, it's not that she's ghosting you, it's that something went wrong 😭

when you're done with the list, use AuFreeBucketAttributes to free it. free your girl!! she's not gonna clean up after herself, that's on you bestie πŸŽ€

✨ Errors ✨

  • AuBadLength β€” she said "the length is not length-ing" πŸ’€

✨ See Also ✨

  • AuGetBucketAttributes
  • audiolib β€” Network Audio System C Language Interface

okay that's the whole page!! go forth and list your buckets, you absolute legend 🌈⭐

sign-off time: this was from the audiolib bucket attributes manual, version 1.9.4, dated all the way back in AuListBuckets(3) times. mwah πŸ’‹ no cap, you understood all of that. periodt. πŸ¦‹πŸ’–

πŸ“¦ where this page comes from