AuSoundRecord(3)

✨ AuSoundRecord(3) ✨

okay bestie, buckle up πŸ’– this one lives in the Library Functions Manual and it's literally called AuSoundRecord β€” she's a soundlib girlie and she's about to build you a whole flow just to record audio. no cap.


πŸŽ€ NAME πŸŽ€

AuSoundRecord β€” create a flow to record audio to any destination.

like… any destination. she's not picky. she's versatile. πŸ’…


🌸 SYNOPSIS 🌸

#include <audio/audiolib.h>
#include <audio/soundlib.h>

AuEventHandlerRec *AuSoundRecord(server, source, gain, num_samples,
mode, sound_data, flow, volume_mult_elem, status)
    AuServer *server;
    AuDeviceID source;
    AuFixedPoint gain;
    AuUint32 num_samples;
    int mode;
    AuSoundDataPtr sound_data;
    AuFlowID *flow; /* RETURN */
    int *volume_mult_elem; /* RETURN */
    AuStatus *status; /* RETURN */

look at her. nine arguments. she's high maintenance and she earned it. πŸ‘‘


πŸ¦‹ ARGUMENTS πŸ¦‹

  • server β€” the connection to the audio server. your link to the mothership, basically. 🌈
  • source β€” the input device you wanna use. pick your fave. 🎀
  • gain β€” the gain for the input device. turn it up (or down, we don't judge). πŸ”Š
  • num_samples β€” how many samples you're recording. the exact count, bestie, not vibes-based. πŸ”’
  • mode β€” the line mode for the input device. rn the defined line modes are: AuDeviceInputModeNone, AuDeviceInputModeLineIn, AuDeviceInputModeMicrophone. pick one, they're all iconic in their own way. 🎧
  • sound_data β€” the sound information. the whole situation. πŸ“
  • flow β€” if it's non-NULL, returns the flow ID. ooh, receipts. 🧾
  • volume_mult_elem β€” according to the comment in the source, not implemented. yeah. she's listed but she's not showing up to the party. πŸ’€ (still a real argument tho, don't @ me)
  • status β€” if it's non-NULL, it flushes the output buffer and returns the status from the server. so you get the tea straight from the server itself. β˜•

πŸ’œ DESCRIPTION πŸ’œ

so AuSoundRecord creates a flow to record audio from source to any destination, and it returns a pointer to the event handler it created β€” or NULL if there was an error. 😭

the sound_data structure is the one holding all the necessary info about the audio format and the data handling function. she's the brains of the operation, fr fr. 🧠✨


πŸ”₯ ERRORS πŸ”₯

  • AuBadDevice.

that's it. that's the list. one error, and she's dramatic about it. πŸ™ˆ


πŸ‘‘ SEE ALSO πŸ‘‘

  • AuSoundRecordToBucket
  • AuSoundRecordToData
  • AuSoundRecordToFile
  • AuSoundRecordToFileN
  • audiolib β€” Network Audio System C Language Interface

the whole friend group 🫢 go say hi.


okay that's the whole page, you ate that. πŸ’… this was soundlib, version 1.9.4, and honestly? iconic behavior. go record something beautiful, bestie β€” main character energy only βœ¨πŸŽ€πŸ¦‹

πŸ“¦ where this page comes from