Difference between revisions of "RecordingDevice:start"

m
m (Notes: before → until (jp: この場合のbeforeは副詞で「その時まで」を意味するが、安物の辞書には載っていないため修正))
 
(One intermediate revision by one other user not shown)
Line 1: Line 1:
{{newin|[[0.11.0]]|110|type=function}}
+
{{newin|[[11.0]]|110|type=function}}
 
Begins recording audio using this device.
 
Begins recording audio using this device.
 
== Function ==
 
== Function ==
Line 14: Line 14:
 
{{param|boolean|success|True if the device successfully began recording using the specified parameters, false if not.}}
 
{{param|boolean|success|True if the device successfully began recording using the specified parameters, false if not.}}
 
== Notes ==
 
== Notes ==
A ring buffer is used internally to store recorded data before [[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.
+
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 ==
 
== See Also ==
 
* [[parent::RecordingDevice]]
 
* [[parent::RecordingDevice]]

Latest revision as of 03:01, 2 December 2019

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

Begins recording audio using this device.

Function

Synopsis

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

Arguments

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.

Returns

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

Other Languages