Machine]‘s audio output (what its speakers
are playing).
Obtain via [Machine.loopback]. Call start() before capturing with
record() or drain(); samples are interleaved f32 in the
requested AudioFormat.
Constructor
Returns
Loopback
Properties
number
required
Number of interleaved channels (1 = mono, 2 = stereo).
number
required
Samples per second per channel (e.g. 44100, 48000).
Methods
drain()
SamplesBuffer.
Typical usage: call start(), do work while audio accumulates in
the background, call stop(), then call drain() to collect
everything that was captured.
Returns
SamplesBuffer
record()
duration_ms and returns the captured audio as
a SamplesBuffer. Useful for streaming fixed-size chunks while
the source is still running.
Parameters
number
required
Returns
SamplesBuffer
start()
record() or drain().
stop()
start(). After
stopping, call drain() to collect remaining buffered samples.
