AUSOUNDCREATEBUCKETFROMDATA(3nas)

πŸ’– NAME πŸ’–

ok so bestie, gather round β€” AuSoundCreateBucketFromData is the girl who creates a bucket and initializes its contents at the same time. two jobs, one function, she's literally doing the most and slaying while she does it πŸ’…

this page lives in the Library Functions Manual, section 3, and the vibes are immaculate ✨


🌸 SYNOPSIS 🌸

#include <audio/audiolib.h>
#include <audio/soundlib.h>

AuBucketID AuSoundCreateBucketFromData(server, sound, data, access,
    attributes, status)
    AuServer *server;
    Sound sound;
    AuPointer data;
    AuUint32 access;
    AuBucketAttributes **attributes; /* RETURN */
    AuStatus *status; /* RETURN */

like yes she takes six whole arguments, she's high maintenance but in a main character way, no cap πŸŽ€


πŸ¦‹ ARGUMENTS πŸ¦‹

okay bestie let's go through the cast of characters one by one:

  • server β€” the connection to the audio server. your link to the mothership fr fr πŸ›Έ
  • sound β€” the audio data description. it's giving "tell me what this sound is" ✨
  • data β€” the actual audio data for the bucket. the whole point of the whole thing, the moment, the girlies πŸ’–
  • access β€” the access restrictions the bucket should have. boundaries!! we love a queen who knows her boundaries 🚧
  • attributes β€” if it's non-NULL, it returns the attributes of the created bucket. so like, if you wanna know what you just made, this is your girl πŸ”
  • status β€” if it's non-NULL, it flushes the output buffer and returns the status from the server. a little check-in with the server, very demure, very mindful πŸ’…

🌈 DESCRIPTION 🌈

so AuSoundCreateBucketFromData creates a bucket, initializing the contents with the audio data from data, and then she hands you back the bucket ID 🫢

and if something went wrong? she returns AuNone. no bucket, no vibes, just a little tragedy 😭 periodt.


πŸ’€ ERRORS πŸ’€

she can hit you with any of these:

  • AuBadValue
  • AuBadLength
  • AuBadAlloc

not me manifesting none of these for you though, fingers crossed bestie πŸ™ˆβœ¨


πŸ‘‘ SEE ALSO πŸ‘‘

  • AuSoundCreateBucketFromFile β€” the sister function, also iconic 🧚
  • audiolib β€” Network Audio System C Language Interface. the whole universe this girl lives in 🌌

okay that's the whole page, you ate it up, go forth and make buckets πŸ“

sending you off with love from soundlib, version 1.9.4 β€” and yes, this is AuSoundCreateBucketFromData(3), she said what she said πŸ’œ

πŸ“¦ where this page comes from