AuSoundRecordToFileN(3)
π AuSoundRecordToFileN π
okay bestie, welcome to the soundlib corner of the Network Audio System manual (that's the Library Functions Manual vibe, section 3, iykyk) β¨
πΈ NAME πΈ
AuSoundRecordToFileN β literally the function that records audio straight into a file for you, no cap π
π¦ SYNOPSIS π¦
#include <audio/audiolib.h>
#include <audio/soundlib.h>
AuEventHandlerRec *AuSoundRecordToFileN(server, filename, source, gain,
num_samples, callback, callback_data, mode, file_format, comment, rate,
data_format, flow, volume_mult_elem, status)
AuServer *server;
char *filename;
AuDeviceID source;
AuFixedPoint gain;
AuUint32 num_samples;
void (*callback)(AuServer *, AuEventHandlerRec *, AuEvent *,
AuPointer);
AuPointer callback_data;
int mode;
int file_format;
char * comment;
AuUint32 rate;
int data_format;
AuFlowID *flow;
int *volume_mult_elem;
AuStatus *status;
like. look at all those args. she's got range π
β¨ ARGUMENTS β¨
serverβ the connection to the audio server, aka your whole entire link to the sound world πfilenameβ the name of the file you're recording into. name your baby, bestie πsourceβ which input device you're recording from.gainβ the gain for that input device. turn it up (responsibly) π₯num_samplesβ how many samples to record. and ooooh, if you want infinite samples, passAuUnlimitedSamples. go feral, record forever πcallbackβ the procedure that gets called for extra event processing. your little helper function π«Άcallback_dataβ any extra arguments you wanna hand off tocallback.modeβ the line mode for the input device. rn these line modes are defined:AuDeviceInputModeNone,AuDeviceInputModeLineIn,AuDeviceInputModeMicrophone. pick your vibe π€file_formatβ the file format. currently supported:SoundFileFormatSnd,SoundFileFormatVoc,SoundFileFormatWave,SoundFileFormatAiff,SoundFileFormatSvx. choose wisely, queen πcommentβ a comment to be embedded in the file. leave a little note for future you πrateβ the sample rate you're recording at.data_formatβ the data format. currently defined:AuFormatULAW8,AuFormatLinearUnsigned8,AuFormatLinearSigned8,AuFormatLinearSigned16MSB,AuFormatLinearUnsigned16MSB,AuFormatSignedLinear16LSB, andAuFormatLinearUnsigned16LSB. so many options, so little time βflowβ if it's non-NULL, it returns the flow ID.volume_mult_elemβ according to the comment in the source, this is not implemented. so likeβ¦ she's there, she's just not doing anything πstatusβ if it's non-NULL, it flushes the output buffer and returns the status from the server. the receipts, basically π§
π DESCRIPTION π
AuSoundRecordToFileN creates a flow to record from source into filename, and returns a pointer to the event handler it created β or NULL if there was an error. that's it, that's the whole thing, and honestly? iconic π
π ERRORS π
AuBadDevice.
(yeah. that's the whole list. she said one error and she meant it π)
π SEE ALSO π
AuSoundRecordAuSoundRecordToBucketAuSoundRecordToDataAuSoundRecordToFile
and also:
audiolibβ Network Audio System C Language Interface π¦
okay that's the whole page, you ate it, periodt π
signing off from soundlib version 1.9.5 β this lil manual page for AuSoundRecordToFileN(3) is giving very much its own era, 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