AuSoundRecordToFileN(3)

πŸ“¦ version 1.9.5, in fedora 43, fedora 44

πŸ’– 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, pass AuUnlimitedSamples. 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 to callback.
  • 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, and AuFormatLinearUnsigned16LSB. 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 🌟

  • AuSoundRecord
  • AuSoundRecordToBucket
  • AuSoundRecordToData
  • AuSoundRecordToFile

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