AuSoundPlayFromBucket(3)
β¨ AuSoundPlayFromBucket(3) β¨
okay bestie, so this one lives in the Library Functions Manual and it's called AuSoundPlayFromBucket(3) β and no cap, it's giving "make the bucket go brrr on the device". let's get into it π
πΈ NAME πΈ
AuSoundPlayFromBucket β create a flow to play from a bucket. that's it, that's the whole vibe π
π¦ SYNOPSIS π¦
#include <audio/audiolib.h>
#include <audio/soundlib.h>
AuEventHandlerRec *AuSoundPlayFromBucket(server, source, destination,
volume, callback, callback_data, loop_count, flow, volume_mult_elem,
monitor_element, status)
AuServer *server;
AuBucketID source;
AuDeviceID destination;
AuFixedPoint volume;
void (*callback) (AuServer *, AuEventHandlerRec *, AuEvent *,
AuPointer);
AuPointer callback_data;
int loop_count;
AuFlowID *flow; /* RETURN */
int *volume_mult_elem; /* RETURN */
int *monitor_element; /* RETURN */
AuStatus *status; /* RETURN */
look at all those params. it's a lot. she's high maintenance but she's worth it π
π ARGUMENTS π
serverβ the connection to the audio server. your lil hotline to the audio gods fr.sourceβ the bucket to play. the actual bop material πdestinationβ the device to output the audio data. where the sound gets to live its main character moment.volumeβ the volume. self-explanatory bestie, turn it up.callbackβ the procedure to be called for additional event processing. your girl for the extra events, iykyk.callback_dataβ any additional arguments to be passed to the callback. lil goodie bag for the callback πloop_countβ how many time the bucket should be played. (yes it says "time", singular, we're not fixing it, we're just noting it π«Ά) so like... how many loops. on repeat. periodt.flowβ if non-NULL, returns the flow ID. otherwise it just minds its business.volume_mult_elemβ if non-NULL, returns the index of the volume multipler element. (that's "multipler" exactly as written, iconic typo, we stan β¨)monitor_elementβ if non-NULL, include anExportMonitorelement in the flow and return it's index. yes, it's getsExportMonitortreatment now πstatusβ if non-NULL, flush the output buffer and return the status from the server. the receipts, basically π§Ύ
π DESCRIPTION π
AuSoundPlayFromBucket creates a flow to play bucket on device and returns a pointer to the event handler created, or NULL if there was an error. π
that's the whole plot. flow gets made, bucket gets played on device, you get a pointer back β or you get NULL and a bad day. keep an eye on that return value bestie, fr fr.
π ERRORS π
AuBadBucketAuBadDevice
two ways to fumble. not me getting an AuBadBucket... π
π SEE ALSO π
AuSoundPlayAuSoundPlayFromDataAuSoundPlayFromFileAuSoundPlaySynchronousFromFileaudiolibβ Network Audio System C Language Interface
the whole friend group honestly π«Ά go read them too.
okay that's the page!! this one is from soundlib, version 1.9.4, and it's AuSoundPlayFromBucket(3) β go play some buckets, you ate πβ¨ππ¦
π¦ 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