AuSoundRecordToFileN(3)
π AuSoundRecordToFileN(3) π
okay bestie, welcome to the Library Functions Manual, section 3 β this is the one and only AuSoundRecordToFileN page and it's gonna record audio straight into a file, no cap. π sit down, grab a strawberry, we're doing this. π
β¨ Name β¨
AuSoundRecordToFileN β the girlies' fave way to record sound from the audio server straight into a file. π¦
β¨ 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;
β¨ Arguments β¨
okay so she takes a LOT of arguments, but like, we go through them one by one, we don't skip. π
serverβ the connection to the audio server. like, your link to the whole situation. πfilenameβ the name of the file we're recording into. yes, an actual name. β¨sourceβ the input device we're recording from. where the sound comes in, bestie. π€gainβ the gain for the input device. turning it up (or down, respectfully). πnum_samplesβ the number of samples to record. and if you want no limit at all, passAuUnlimitedSamplesand she just keeps going. βΎοΈcallbackβ the procedure that gets called for additional event processing. your little helper function. π«Άcallback_dataβ any additional arguments that get passed along tocallback. the lil goodie bag. πmodeβ the line mode for the input device. currently the following line modes are defined:AuDeviceInputModeNone,AuDeviceInputModeLineIn,AuDeviceInputModeMicrophone. pick your vibe. πfile_formatβ the file format. currently, the following file formats are supported:SoundFileFormatSnd,SoundFileFormatVoc,SoundFileFormatWave,SoundFileFormatAiff,SoundFileFormatSvx. so many options, iconic honestly. πcommentβ a comment to be embedded in the file. cute little note-to-self energy. πrateβ the sample rate to record at. β±οΈdata_formatβ the data format. currently, the following data formats are defined:AuFormatULAW8,AuFormatLinearUnsigned8,AuFormatLinearSigned8,AuFormatLinearSigned16MSB,AuFormatLinearUnsigned16MSB,AuFormatSignedLinear16LSB, andAuFormatLinearUnsigned16LSB. that's seven. we counted. πflowβ if non-NULL, returns the flow ID. πvolume_mult_elemβ accord to the comment in the source, not implemented. yeah. she said what she said. πstatusβ if non-NULL, flush the output buffer and return the status from the server. π§
β¨ Description β¨
AuSoundRecordToFileN creates a flow to record from source into filename and returns a pointer to the event handler created, or NULL if there was an error.
that's it, that's the whole thing. she builds the flow, she does the recording, she hands you back a handler pointer β or NULL if it went sideways. main character behaviour fr fr. π₯
β¨ Errors β¨
AuBadDevice.
bestie if you get this one it's giving "that device? never heard of her." π
β¨ See Also β¨
AuSoundRecordAuSoundRecordToBucketAuSoundRecordToDataAuSoundRecordToFile
audiolib β Network Audio System C Language Interface πΈ
and that's the whole page, periodt. π this one's from soundlib, version 1.9.4, so go forth and record something gorgeous. mwah. πβ¨π
π¦ 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 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