AuSoundPlay(3)
π NAME π
AuSoundPlay β the girlboss function that creates a flow to play audio from any source. no cap, literally any source. π
π¦ SYNOPSIS π¦
okay so first you gotta invite the headers to the party:
#include <audio/audiolib.h>
#include <audio/soundlib.h>
and then the actual function, bestie:
AuEventHandlerRec *AuSoundPlay(server, destination, volume, mode,
sound_data, flow ,volume_mult_elem, monitor_element, status)
AuServer *server;
AuDeviceID destination;
AuFixedPoint volume;
int mode;
AuSoundDataPtr sound_data;
AuFlowID *flow; /* RETURN */
int *volume_mult_elem; /* RETURN */
int *monitor_element; /* RETURN */
AuStatus *status; /* RETURN */
πΈ ARGUMENTS πΈ
here's the rundown, one by one, no skipping, we do not skip in this house:
serverβ the connection to the audio server. your lil phone line to the server, basically. π«Άdestinationβ the device where the audio data gets output. where the sound is gonna live, bestie.volumeβ the volume. iconic concept. πmodeβ the line mode for the output device. right now the defined line modes are:AuDeviceOutputModeNone,AuDeviceOutputModeSpeaker,AuDeviceOutputModeHeadphone,AuDeviceOutputModeLineOut. pick your vibe, it's giving options. β¨sound_dataβ the sound information. all the deets about your audio.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. (yes, "multipler", that's how the original spells it, i'm not gonna gaslight the manpage. π)monitor_elementβ if it's non-NULL, it includes an ExportMonitor element in the flow and returns its index.statusβ if it's non-NULL, it flushes the output buffer and returns the status from the server. flushing, but make it β¨functionalβ¨.
π DESCRIPTION π
AuSoundPlay creates a flow to play audio from any source on device, and it returns a pointer to the event handler that got created β or NULL if there was an error. π
the sound_data structure is where all the important stuff lives: it holds the necessary information about the audio format and the data handling function. so like, the format AND the whole personality of your audio. that's the structure's job. π
π ERRORS π
AuBadDevice.
that's it. that's the list. one single error and it ate. don't fight it. π
β SEE ALSO β
go read these next, they're the whole friend group:
AuSoundPlayFromBucketAuSoundPlayFromDataAuSoundPlayFromFileAuSoundPlaySynchronousFromFile
and also:
audiolibβ Network Audio System C Language Interface. the mothership. π
okay bestie that's the whole page, you're officially fluent in AuSoundPlay and i'm so proud of you, go make a flow and slay. mwah. π
β¨
this was soundlib, version 1.9.5, serving you the AuSoundPlay(3) manual page. periodt. π«Ά
π¦ 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 1995 Yoav Eilat
- 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