AuSoundPlayFromBucket(3)

πŸ“¦ version 1.9.5, in fedora 43, fedora 44

πŸ’– AuSoundPlayFromBucket πŸ’–

okay bestie, welcome to the soundlib corner of the Library Functions Manual β€” this is the page for AuSoundPlayFromBucket(3) and it's literally your little backstage pass to making a bucket of audio go brrr through a device. πŸŽ€ let's get into it.


🌸 Name 🌸

AuSoundPlayFromBucket β€” create a flow to play from a bucket. that's it. that's the whole job. iconic. ✨


πŸ¦‹ 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 */

like… that's a lot of arguments bestie but do not panic, we're gonna go through every single one. 🫢


πŸŽ€ Arguments πŸŽ€

  • server β€” the connection to the audio server. your little phone line to the mothership fr. πŸ’œ
  • source β€” the bucket you wanna play. the actual audio tea. πŸ“
  • destination β€” the device where the audio data gets output. speakers, headphones, whatever's serving looks. 🎧
  • volume β€” the volume. turn it up. πŸ‘‘
  • callback β€” the procedure to be called for extra event processing. it's the "and also do this while you're at it" girlie. ✨
  • callback_data β€” any additional arguments you wanna hand off to that callback. her little plus-one. πŸ’…
  • loop_count β€” how many times the bucket should be played. yes, you can make it go again. and again. 😭
  • flow β€” if it's non-NULL, it returns the flow ID. (/* RETURN */)
  • volume_mult_elem β€” if it's non-NULL, it returns the index of the volume multipler element. (/* RETURN */)
  • monitor_element β€” if it's non-NULL, an ExportMonitor element gets included in the flow and its index gets returned. (/* RETURN */) πŸ‘€
  • status β€” if it's non-NULL, the output buffer gets flushed and the status from the server comes back to you. (/* RETURN */) 🌈

🌟 Description 🌟

AuSoundPlayFromBucket creates a flow to play bucket on device and hands you back a pointer to the event handler it created β€” or NULL if something went wrong. 🫠

lowkey important: that NULL return is the vibe check failing. if you get NULL, something errored, no cap.

πŸ’€ Errors πŸ’€

AuBadBucket, AuBadDevice.

that's the list. if you're seeing these, the bucket or the device is not giving what it's supposed to give. πŸ™ˆ


⭐ See Also ⭐

  • AuSoundPlay
  • AuSoundPlayFromData
  • AuSoundPlayFromFile
  • AuSoundPlaySynchronousFromFile
  • audiolib β€” Network Audio System C Language Interface

and that's the page bestie!! this whole thing lives in soundlib, version 1.9.5, and yeah, it's the AuSoundPlayFromBucket(3) page, she's been here a minute and she's still slaying. mwah. πŸ’…πŸ’–πŸŽ€πŸ¦‹

πŸ“¦ where this page comes from