AuSoundPlayFromFile(3)
β¨ AuSoundPlayFromFile β like, the manual page π
okay bestie, so this is AuSoundPlayFromFile(3) from the Library Functions Manual. it lives in soundlib (Network Audio System C Language Interface, iykyk) and it is literally the "play me a whole file" button. let's go π
πΈ NAME πΈ
AuSoundPlayFromFile β create a flow to play a file. that's it, that's the whole vibe. π¦
β¨ SYNOPSIS β¨
#include <audio/audiolib.h>
#include <audio/soundlib.h>
AuEventHandlerRec *AuSoundPlayFromFile(server, filename, destination,
volume, callback, callback_data, flow ,volume_mult_elem,
monitor_element, status)
AuServer *server;
char *filename;
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 */
like, that's a lot of arguments babe, but every single one of them is doing her job and we respect her for it π
π«Ά ARGUMENTS π«Ά
serverβ the connection to the audio server. your lil phone line to the sound gods, basically βοΈfilenameβ the name of the file you wanna play. yes the actual name, don't be cute with it π΅destinationβ the device that the audio data gets output to. where the noise comes out πvolumeβ the volume. loudness level, no notes β¨callbackβ the procedure that gets called for additional event processing. she gets a lil ping when there's more to handle πcallback_dataβ any additional arguments to be passed to the callback. lil care package for your callback πflowβ if non-NULL, returns the flow ID. if you're NULL, she stays quiet, periodt.volume_mult_elemβ if non-NULL, returns the index of the volume multipler element. (yes, "multipler", that's how it's spelled in the source, we don't fix other people's typos, we honor them π)monitor_elementβ if non-NULL, include an ExportMonitor element in the flow and return its index. two jobs, one argument, she's booked and busy π₯statusβ if non-NULL, flush the output buffer and return the status from the server. get that receipt bestie π§Ύ
π DESCRIPTION π
AuSoundPlayFromFile creates a flow to play filename on destination and returns a pointer to the event handler created, or NULL if there was an error.
that's the whole plot. flow created, file played, handler pointer returned. and if something went sideways? NULL. not me getting a NULL and having to check it π β always check it, bestie, fr fr.
π ERRORS π
AuBadDevice.
that's the one and only error listed here. if your device is bad, she will simply tell you. no cap.
π SEE ALSO π
AuSoundPlayAuSoundPlayFromBucketAuSoundPlayFromDataAuSoundPlaySynchronousFromFileaudiolibβ Network Audio System C Language Interface
go read those too, they're the rest of the girlies in this friend group π¦β¨
and that's the page!! this came out of soundlib, version 1.9.5 β the copyright/version line at the bottom of the original, which we are lovingly shouting out right here at the end instead. mwah π
ππΈ
π¦ 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