AuSoundPlay(3)
π AuSoundPlay(3) β Library Functions Manual π
okay bestie, gather round, because we're about to talk about AuSoundPlay from the Library Functions Manual and honestly? she's iconic. no cap.
β¨ Name β¨
AuSoundPlay β create a flow to play audio from any source. it's giving "audio, but make it a whole flow." π
πΈ Synopsis πΈ
#include <audio/audiolib.h>
#include <audio/soundlib.h>
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 */
like look at all those params. she's high maintenance but she delivers π
π¦ Arguments π¦
serverβ the connection to the audio server. your lil hotline to the server, basically π«Άdestinationβ the device where the audio data gets output. that's where the sound goes, periodt.volumeβ specifies the volume. turn it up, bestie πmodeβ specifies the line mode for the output device. rn the defined line modes are:AuDeviceOutputModeNone,AuDeviceOutputModeSpeaker,AuDeviceOutputModeHeadphone,AuDeviceOutputModeLineOut. pick your vibe πsound_dataβ specifies the sound information. all the deets about your audio live in here.flowβ if it's non-NULL, returns the flow ID. it's a RETURN param, so she's handing you info back πvolume_mult_elemβ if it's non-NULL, returns the index of the volume multipler element. (yes, "multipler" β that's literally how it's spelled, i don't make the rules π)monitor_elementβ if it's non-NULL, include anExportMonitorelement in the flow and return it's index. so you're not just playing, you're also monitoring πstatusβ if it's non-NULL, flush the output buffer and return the status from the server. very "tell me what happened" energy π
π Description π
so what does she actually do? AuSoundPlay creates a flow to play audio from any source on the device, and it returns a pointer to the event handler that was created β or NULL if something went wrong. π
and the sound_data structure? she's the main character here, because she holds all the necessary info about the audio format AND the data handling function. everything you need to know about your audio, all in one struct. ate. π₯
π Errors π
AuBadDevice.
that's it. that's the list. if the device is bad, she will let you know. no notes.
π See Also π
AuSoundPlayFromBucketAuSoundPlayFromDataAuSoundPlayFromFileAuSoundPlaySynchronousFromFile
and also, the whole audiolib β Network Audio System C Language Interface. go read it, iykyk π
k bye bestie, that's the whole page!! this one's from soundlib, version 1.9.4, and it's literally the AuSoundPlay(3) manual page. go play some audio, you've earned it β¨π¦π
π¦ 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 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