AuSoundRecordToData(3)

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

πŸ’– AuSoundRecordToData β€” bestie, we're recording STRAIGHT INTO MEMORY πŸ’–

okay so this one lives in the soundlib manual, section 3 (library functions, the fun ones). It's giving "I make a whole flow just so your audio lands in RAM." No cap.


✨ NAME ✨

AuSoundRecordToData β€” create a flow to record to memory.

Like. The whole personality? A flow. To memory. That's it, that's the job. πŸŽ€


πŸ¦‹ SYNOPSIS πŸ¦‹

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

AuEventHandlerRec *AuSoundRecordToData(server, sound, data, source,
gain, callback, callback_data, line_mode, flow, volume_mult_elem,
status)
    AuServer *server;
    Sound sound;
    AuPointer data;
    AuDeviceID source;
    AuFixedPoint gain;
    void (*callback) (AuServer *, AuEventHandlerRec *, AuEvent *,
AuPointer);
    AuPointer callback_data;
    int line mode;
    AuFlowID *flow;
    int *volume_mult_elem;
    AuStatus *status;

she returns an AuEventHandlerRec * btw. main character return type fr fr. πŸ‘‘


🌸 ARGUMENTS 🌸

  • server β€” the connection to the audio server. your little link to the mothership. 🌈
  • sound β€” the description if the audio data. (yes, "if", that's what the page says, i'm not touching it πŸ’€). it's describing the audio data, bestie.
  • data β€” where to write the data. the destination. the moment. ✨
  • Source β€” the input device you're recording from. (capital S on the page, we respect it πŸ’…)
  • gain β€” the gain for the input device. turn it up, turn it down, your call.
  • callback β€” the procedure to be called for additional event processing. like, "hey bestie, something happened, handle it." πŸ“ž
  • callback_data β€” any additional arguments to be passed to callback. lil gift basket for your callback. 🎁
  • line_mode β€” the line mode for the input device. currently the following line modes are defined: AuDeviceInputModeNone, AuDeviceInputModeLineIn, AuDeviceInputModeMicrophone. pick your vibe: nothing, line-in, or mic. 🎀
  • flow β€” if non-NULL, returns the flow ID. she'll hand you the receipts. 🧾
  • volume_mult_elem β€” accord to the comment in the source, not implemented. 😭 that's it. that's the whole lore. it is NOT implemented. we do not know more than that and we will not pretend to.
  • status β€” if non-NULL, flush the output buffer and return the status from the server. so if you wanna know how it went, pass a status and she'll spill. πŸ’œ

πŸ’… DESCRIPTION πŸ’…

AuSoundRecordToData creates a flow to record from source to data and returns the event handler created, or NULL if there was an error.

so: flow = made, handler = returned, and if it all goes sideways you get NULL. that's the tea. πŸ“


πŸ’€ ERRORS πŸ’€

  • AuBadDevice.

yep. that's the list. one (1) error. iconic honestly.


🫢 SEE ALSO 🫢

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

go read those too, the whole friend group is valid. 🌟


mwah πŸ’‹ this page came to you from soundlib, version 1.9.5, and it's the AuSoundRecordToData(3) page, dated right there in the footer. love that for us. now go record something into memory, bestie. πŸŽ€βœ¨

πŸ“¦ where this page comes from