AuSoundRecord(3)

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

πŸ’– AuSoundRecord(3) πŸ’–

okay bestie, so this one lives in the Library Functions Manual and it's giving AuSoundRecord β€” the glow-up function that builds you a whole flow just to record audio to literally any destination you want. no cap. πŸŽ€


✨ Name ✨

AuSoundRecord β€” create a flow to record audio to any destination. πŸ’…


🌸 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 */

πŸ¦‹ Arguments πŸ¦‹

  • server β€” the connection to the audio server, your lil hotline to the sound gods πŸ”Œ
  • source β€” which input device we're using, the main character of the recording 🎀
  • gain β€” the gain for the input device, so turn it up (or down, respectfully) 🎚️
  • num_samples β€” how many samples you're recording, literally just the count ✨
  • mode β€” the line mode for the input device. rn the defined line modes are: AuDeviceInputModeNone, AuDeviceInputModeLineIn, AuDeviceInputModeMicrophone πŸŽ›οΈ
  • sound_data β€” the sound information, aka the whole vibe of your audio πŸ“
  • flow β€” if it's non-NULL, it returns the flow ID πŸ†”
  • volume_mult_elem β€” ngl bestie, accord to the comment in the source, this one is not implemented πŸ’€
  • status β€” if it's non-NULL, it flushes the output buffer and returns the status from the server πŸ“‘

πŸ‘‘ Description πŸ‘‘

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 carrying all the necessary info about the audio format plus the data handling function. it's giving organized. it's giving prepared. 🫢


πŸ’€ Errors πŸ’€

AuBadDevice.

that's it, that's the whole error list. short king behavior fr fr.

🌈 See Also 🌈

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

k that's the whole page bestie, go record something iconic πŸ’œ

this was brought to you by soundlib, version 1.9.5 β€” mwah, take care, and don't forget to flush ur buffers πŸŽ€βœ¨

πŸ“¦ where this page comes from