AuSoundPlayFromData(3)
π AuSoundPlayFromData(3) β the soundlib bestie that plays straight from memory π
okay so bestie, this one lives in soundlib, which is part of the whole Network Audio System audiolib situation. And it does EXACTLY what the name says: it builds you a whole flow so you can play audio that's justβ¦ chilling in memory. No file. No bucket. Just a pointer and vibes. π
β¨
πΈ NAME πΈ
AuSoundPlayFromData β create a flow to play from memory.
π SYNOPSIS π
#include <audio/audiolib.h>
#include <audio/soundlib.h>
AuEventHandlerRec *AuSoundPlayFromData(server, sound, data, destination,
volume, callback, callback_data, flow, volume_mult_elem,
monitor_element, status)
AuServer *server;
Sound sound;
AuPointer data;
AuDeviceID destination;
AuFixedPoint volume;
void (*callback) (AuServer *, AuEventHandlerRec *, AuEvent *,
AuPointer);
AuPointer callback_data;
AuFlowID *flow; /* RETURN */
int *volume_mult_elem; /* RETURN */
int *monitor_element; /* RETURN */
AuStatus *status; /* RETURN */
π ARGUMENTS π
serverβ the connection to the audio server. your link to the mothership, fr.soundβ the description of the audio data. the lil' metadata moment.dataβ the actual audio data you wanna play. the goods. πdestinationβ the device you're playing this data on. where it's gonna come out of.volumeβ the volume. yes queen, set the level.callbackβ the procedure to be called for extra event processing. your little side quest handler.callback_dataβ any extra arguments you want passed to that callback. tuck them in there.flowβ if it's non-NULL, it returns the flow ID.volume_mult_elemβ if it's non-NULL, it returns the index of the volume multipler element.monitor_elementβ if it's non-NULL, it includes anExportMonitorelement in the flow and returns its index. π watching it.statusβ if it's non-NULL, it flushes the output buffer and returns the status from the server. the receipts.
β¨ DESCRIPTION β¨
So like, AuSoundPlayFromData creates a flow to play data on device and hands you back a pointer to the event handler it made. π«Ά
And if things go sideways? It returns NULL. that's the error signal, no cap. π
ngl, NULL means something went wrong β don't just keep going and pretend you didn't see it.
π ERRORS π
It can hit you with:
AuBadAllocAuBadDevice
π₯ SEE ALSO π₯
AuSoundPlayAuSoundPlayFromBucketAuSoundPlayFromFileAuSoundPlaySynchronousFromFileaudiolibβ Network Audio System C Language Interface
mwah π that's the whole page, bestie. this one's from the soundlib source, version 1.9.5, and yeah β it's AuSoundPlayFromData(3). go play some memory-resident audio, you icon. ππΈβ¨
π¦ where this page comes from
- fedora 43: nas-devel 1.9.5-11.fc41 Β· MIT
- fedora 43: nas-devel 1.9.5-11.fc41 Β· MIT
- fedora 43: nas-devel 1.9.5-14.fc43 Β· MIT
- fedora 43: nas-devel 1.9.5-14.fc43 Β· MIT
- fedora 44: nas-devel 1.9.5-15.fc44 Β· MIT
- fedora 44: nas-devel 1.9.5-15.fc44 Β· MIT
- 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