AuCreateBucket(3)

πŸŽ€ NAME πŸŽ€

AuCreateBucket β€” create a bucket πŸ’…

like yes bestie, an actual bucket, in the Network Audio System sense. this page lives in the Library Functions Manual, which is giving very "audio library lore" energy, and we're gonna go through the whole thing together 🫢


✨ SYNOPSIS ✨

#include <audio/audiolib.h>

AuBucketID AuCreateBucket(server, format, tracks, access, sample_rate,
nsamples, description, status)
    AuServer *server;
    AuUint32 format;
    AuUint32 tracks;
    AuUint32 access;
    AuUint32 sample_rate;
    AuUint32 num_samples;
    AuString *description;
    AuStatus *status; /* RETURN */

tiny heads up bestie: the synopsis line spells it nsamples and the arguments list below spells it num_samples. both spellings are straight from the original, so no, that's not me fumbling the keyboard, that's just how it is 😭


πŸ¦‹ ARGUMENTS πŸ¦‹

  • server β€” the connection to the audio server. your lil phone line to the server, basically πŸ“ž
  • format β€” the data format of the audio data. rn the formats that are actually defined are: AuFormatULAW8, AuFormatLinearUnsigned8, AuFormatLinearSigned8, AuFormatLinearSigned16MSB, AuFormatLinearUnsigned16MSB, AuFormatSignedLinear16LSB, and AuFormatLinearUnsigned16LSB. pick your fighter ⭐
  • tracks β€” how many tracks of audio data. the track count. the number of tracks. (i said it three ways so it sticks πŸ’œ)
  • access β€” the types of operations permitted on this bucket. this has to be a bitwise inclusive OR of zero or more of these constants: AuAccessImportMask, AuAccessExportMask, AuAccessDestroyMask, and AuAccessListMask. zero or more!! so an empty set is valid, bestie, don't come for me 🌸
  • sample_rate β€” the sample rate of the audio data 🎡
  • num_samples β€” the number of samples the bucket will contain. how much stuff fits in the bucket, fr fr πŸͺ£
  • description β€” a textual description of the bucket. this may be NULL, so if you have nothing cute to say, that's allowed πŸ’€
  • status β€” if it's non-NULL, this flushes the output buffer and returns the status from the server. note the /* RETURN */ in the synopsis β€” it's a return-y boi, not an input πŸ“€

πŸ’– DESCRIPTION πŸ’–

AuCreateBucket creates a bucket with the specified attributes, and hands you back the bucket ID. that's it, that's the whole vibe, she's iconic πŸ‘‘

if something goes wrong, you get AuNone back instead of an ID.

⚠️ okay real talk for one sec: the initial contents of the bucket are undefined. undefined!! so don't go reading from it like it's gonna be zeros, bestie, because it is NOT guaranteed to be zeros. lowkey a jumpscare but we move πŸ™ˆ

😭 ERRORS 😭

  • AuBadValue
  • AuBadLength
  • AuBadAlloc

🌈 SEE ALSO 🌈

  • AuDestroyBucket β€” the bucket's villain arc
  • AuSetBucketAttributes
  • AuListBuckets
  • AuFreeBucketAttributes
  • audiolib β€” Network Audio System C Language Interface

and that's the whole page, bestie, you ate that 🫢 this was audiolib β€” bucket existence, version 1.9.4, dated AuCreateBucket(3) β€” mwah, go make some buckets πŸ’–βœ¨πŸŽ€

πŸ“¦ where this page comes from