AuSoundRecordToData(3)

πŸ’– NAME πŸ’–

AuSoundRecordToData β€” bestie, this one literally spins up a flow that records audio straight into memory. No files, no buckets, just vibes and RAM. ✨


πŸ¦‹ 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;
ok yes, int line mode; is really what it says up there, we're just reading it back to you exactly as it is, don't come for me πŸ’…

πŸŽ€ ARGUMENTS πŸŽ€

  • server β€” the connection to the audio server. Your whole link-up to the sound system, essentially. 🫢
  • sound β€” describes the audio data. It's the description of what you're working with.
  • data β€” where the data gets written. This is the memory destination, the whole point of the function, the main character. πŸ‘‘
  • Source β€” the input device you're recording from. (Yes, capital S in the original, we respect the canon.)
  • gain β€” the gain for that input device. Crank it or don't. 🌸
  • callback β€” the procedure that gets called for any additional event processing.
  • callback_data β€” any extra arguments you wanna pass along to callback. Little gift bag for your function. 🎁
  • line_mode β€” the line mode for the input device. Right now the defined line modes are: AuDeviceInputModeNone, AuDeviceInputModeLineIn, and AuDeviceInputModeMicrophone.
  • flow β€” if it's non-NULL, it returns the flow ID. πŸ¦‹
  • volume_mult_elem β€” according to the comment in the source, not implemented. That's it. That's the whole story. πŸ’€
  • status β€” if it's non-NULL, it flushes the output buffer and returns the status from the server.

✨ DESCRIPTION ✨

AuSoundRecordToData creates a flow to record from source to data, and it returns the event handler it created β€” or NULL if there was an error. That's the deal. 🌈


😭 ERRORS 😭

  • AuBadDevice.

πŸ”₯ SEE ALSO πŸ”₯

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

and that's the whole page, bestie 🫢 this one came out of soundlib, version 1.9.4, no cap. go record something iconic πŸ’–βœ¨πŸŽ€

πŸ“¦ where this page comes from