Available since LÖVE 11.0
This function is not supported in earlier versions.

Begins recording audio using this device.



success = RecordingDevice:start( samplecount, samplerate, bitdepth, channels )


number samplecount
The maximum number of samples to store in an internal ring buffer when recording. RecordingDevice:getData clears the internal buffer when called.
number samplerate (8000)
The number of samples per second to store when recording.
number bitdepth (16)
The number of bits per sample.
number channels (1)
Whether to record in mono or stereo. Most microphones don't support more than 1 channel.


boolean success
True if the device successfully began recording using the specified parameters, false if not.


A ring buffer is used internally to store recorded data until RecordingDevice:getData or RecordingDevice:stop are called – the former clears the buffer. If the buffer completely fills up before getData or stop are called, the oldest data that doesn't fit into the buffer will be lost.

See Also

Other Languages