Return the most recently completed recording buffer; retrieve new results after await stop().
Return the number of capture channels.
Return the speaker position mapping of the capture channels.
Return the current recording device name.
Return the current sample rate in Hz.
Return the first Worker or subclass callback error, or undefined if none.
Return current Worker or subclass callback queue statistics; the native fast path returns undefined.
ProtectedonReceive an independent native buffer; later recordings do not modify a previously returned SoundBuffer.
bufferProtectedonSerially process interleaved 16-bit PCM on the object's owning JS thread; lengths count samples, not frames. Native views are valid only until this synchronous or asynchronous callback ends; false stops capture asynchronously. By default, appends incoming samples to the native accumulator. You may modify samples before calling super; without super, samples are not saved.
samplesProtectedonCalled on the object's owning JS thread before capture begins; supports synchronous or asynchronous returns, with false rejecting capture. By default, clears this session's native PCM accumulator and recording buffer without accessing the microphone.
ProtectedonCalled once on the object's owning JS thread after the device stops and delivered callbacks finish; supports asynchronous completion. Rejection, cancellation, and errors also trigger it. By default, finalizes PCM appended through super into a SoundBuffer.
ProtectedrecorderEnable the queue only for subclasses overriding callbacks; ordinary instances retain the native fast path.
Set the capture channel count; wait for the current asynchronous recording operation to finish before calling.
countAsynchronously switch recording devices and return whether it succeeded. Runs in invocation order; must not be called from subclass callbacks.
nameAsynchronously initialize capture, defaulting to 44100 Hz; return false if already capturing, rejected, or startup fails. Do not restart from subclass callbacks; await stop() externally before starting the next session.
sampleRateAsynchronously stop capture and await remaining samples and onStop. Inside subclass callbacks, await stop() only waits for the device to stop, avoiding a self-wait. Draining continues after the callback exits; await stop() again externally to wait for full completion.
StaticgetReturn the names of currently available recording devices.
StaticgetReturn the default recording device name.
StaticisReturn whether the system supports audio capture.
Recorder that saves captured PCM in a SoundBuffer.