class

MinAudio::CaptureDevice

Inherits Reference < Object

Constructors

new(device_id : Bytes | Nil = nil, sample_rate : Int32 = 16000, channels : Int32 = 1, backends : Array(Int32) | Nil = nil)

device_id is an opaque ma_device_id blob from Context.devices (DeviceInfo#id); nil = the default capture device.

Source

Instance methods

channels
Source
close

Stop (if running) and free the device. Idempotent.

Source
closed?
Source
drain

Bytes accumulated since the last drain, s16le PCM (empty slice when nothing new). Never blocks — safe on the UI frame thread.

Source
finalize
Source
pending

Bytes waiting right now (level meters, tests).

Source
sample_rate
Source
start
Source
stop
Source