AUMAKEELEMENTIMPORTDEVICE(3nas)

✨ NAME ✨

AuMakeElementImportDevice β€” bestie, this is the one that initializes an ImportDevice element πŸ’– (and yes, it's a page from the Library Functions Manual, we're fancy like that)


πŸŽ€ SYNOPSIS πŸŽ€

#include <audio/audiolib.h>

AuMakeElementImportDevice(element, sample_rate, device, num_samples,
num_actions, actions)
    AuElement *element; /* RETURN */
    unsigned short sample_rate;
    AuDeviceID device;
    AuUint32 num_samples;
    int num_actions;
    AuElementAction *actions;

🌸 ARGUMENTS 🌸

  • element β€” the glow-up happens here, bestie. It returns the initialized element. Main character energy: it's a RETURN value, so that's where the finished product lands πŸ’…
  • sample_rate β€” the sample rate of the audio data. That's it, that's the vibe.
  • device β€” the ID of the device we're reading the audio data from. Like, which device are we pulling from, not pushing to. Important distinction, iykyk.
  • num_samples β€” how many samples to read from the device. And listen: if you want unlimited samples, you pass AuUnlimitedSamples. No cap, literally unlimited πŸ¦‹
  • num_actions β€” the number of actions sitting in actions.
  • actions β€” the list of actions to associate with this element. You can init the entries in this list with AuMakeChangeStateAction, AuMakeSendNotifyAction, and AuMakeNoopAction. Also, it may be NULL β€” so it's optional, she's flexible ✨

πŸ’œ DESCRIPTION πŸ’œ

Okay so here's the tea, bestie β˜•

AuMakeElementImportDevice sets the type member of element to AuElementTypeImportDevice, and then initializes the importdevice member of element using the remaining arguments. Two members, one function call, she's efficient like that 😭

Heads up: AuMakeElementImportDevice is implemented as a macro. So don't come for her expecting a real function, that's just the way she is πŸ’€

🌈 SEE ALSO 🌈

Squad goals, here's the whole friend group:

  • AuMakeElementAddConstant
  • AuMakeElementBundle
  • AuMakeElementExportBucket
  • AuMakeElementExportClient
  • AuMakeElementExportDevice
  • AuMakeElementExportMonitor
  • AuMakeElementImportBucket
  • AuMakeElementImportClient
  • AuMakeElementImportWaveForm
  • AuMakeElementMultiplyConstant
  • AuMakeElementSum

And the mothership herself:

  • audiolib β€” Network Audio System C Language Interface πŸ‘‘

okay that's the whole page, you ate it, go build something iconic 🫢

signing off from the audiolib - element initialization corner of the manual, version 1.9.4 β€” mwah πŸ’‹βœ¨

πŸ“¦ where this page comes from