{{newin|[[11.0]]|110|type=function}}
Begins recording audio using this device.
== Function ==
=== Synopsis ===
<source lang="lua">
success = RecordingDevice:start( samplecount, samplerate, bitdepth, channels )
</source>
=== Arguments ===
{{param|number|samplecount|The maximum number of samples to store in an internal ring buffer when recording. [[RecordingDevice:getData]] clears the internal buffer when called.}}
{{param|number|samplerate (8000)|The number of samples per second to store when recording.}}
{{param|number|bitdepth (16)|The number of bits per sample.}}
{{param|number|channels (1)|Whether to record in mono or stereo. Most microphones don't support more than 1 channel.}}
=== Returns ===
{{param|boolean|success|True if the device successfully began recording using the specified parameters, false if not.}}
== Notes ==
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 ==
* [[parent::RecordingDevice]]
* [[RecordingDevice:getData]]
* [[RecordingDevice:stop]]
[[Category:Functions]]
{{#set:Description=Begins recording audio using this device.}}
== Other Languages ==
{{i18n|RecordingDevice:start}}