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, andAuFormatLinearUnsigned16LSB. 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, andAuAccessListMask. 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 beNULL, 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 π
AuBadValueAuBadLengthAuBadAlloc
π SEE ALSO π
AuDestroyBucketβ the bucket's villain arcAuSetBucketAttributesAuListBucketsAuFreeBucketAttributesaudiolibβ 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
- 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