AuSoundRecordToBucket(3)
π AuSoundRecordToBucket π
ok so bestie, gather round, because today we're talking about AuSoundRecordToBucket from soundlib β it's a function that lives in the audio library and it is literally the girlboss of recording-to-a-bucket. She creates a flow. She records. She serves. π
It hangs out in the Library Functions Manual section, and yes, she's a C function, and yes, she's iconic. Let's get into it. π¦
β¨ SYNOPSIS β¨
First things first, you gotta invite the right headers to the party:
#include <audio/audiolib.h>
#include <audio/soundlib.h>
and then the main character herself:
AuEventHandlerRec *AuSoundRecordToBucket(server, destination, source,
gain, callback, callback_data, mode, flow, volume_mult_elem, status)
AuServer *server;
AuBucketID destination;
AuDeviceID source;
AuFixedPoint gain;
void (*callback) (AuServer *, AuEventHandlerRec *, AuEvent *,
AuPointer);
AuPointer callback_data;
int mode;
AuFlowID *flow; /* RETURN */
int *volume_mult_elem; /* RETURN */
AuStatus *status; /* RETURN */
no cap, she takes a lot of arguments. she's high maintenance but she delivers. π
πΈ ARGUMENTS πΈ
okay so let's do a vibe check on every single one of these, because we are NOT skipping any:
serverβ the connection to the audio server. your lil hotline to the sound gods. π«Άdestinationβ the bucket you're recording to. that's the target. the goal. the moment.sourceβ the input device you're recording from. your mic, your line-in, whatever's catching the audio. π€gainβ the gain for the input device. turn it up (or down, we don't judge). anAuFixedPoint, so handle with care.callbackβ the procedure to be called for additional event processing. she's the girl you call when more stuff needs handling.callback_dataβ any additional arguments to be passed to that callback. little care package for your callback bestie. πmodeβ the line mode for the input device. currently the following line modes are defined:AuDeviceInputModeNone,AuDeviceInputModeLineIn,AuDeviceInputModeMicrophone. pick your fighter. β¨flowβ if it's non-NULL, it returns the flow ID. so like, if you want to know the flow ID, hand her a pointer and she'll fill it in. if you don't care, passNULLand keep it moving.volume_mult_elemβ okay bestie, according to the comment in the source, not implemented. π that's it. that's the whole lore. don't expect anything from her.statusβ if it's non-NULL, she flushes the output buffer and returns the status from the server. so if you wanna know how it went, give her somewhere to put the tea. π΅
π DESCRIPTION π
AuSoundRecordToBucket creates a flow to record from source into destination, and returns a pointer to the event handler created β or NULL if there was an error. π
so basically: you point her at a source, you point her at a destination bucket, she sets up the whole flow, and she hands you back an AuEventHandlerRec *. if she hands you back NULL, something went wrong and we're sad about it. that's the deal. periodt. π
π¨ ERRORS π¨
if things go sideways, you might catch:
AuBadBucketAuBadDevice
ngl, these are the "bestie that's not a real bucket" and "bestie that's not a real device" moments. π
π₯ SEE ALSO π₯
more reading if you're obsessed (and you should be):
AuSoundRecordAuSoundRecordToDataAuSoundRecordToFileAuSoundRecordToFileNaudiolibβ Network Audio System C Language Interface
mwah π that's the whole page. go record something gorgeous.
this was soundlib version 1.9.5, from AuSoundRecordToBucket(3) β thanks for scrolling all the way down, you're the real main character π«Άβ¨
π¦ 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