Difference between revisions of "RecordingDevice:getData"

m (updated version from 0.11.0 to 11.0)
(Added dynamic link thing so the function appears as a constructor for SoundData, which is similar to Decoder:decode's article.)
Line 16: Line 16:
 
* [[RecordingDevice:start]]
 
* [[RecordingDevice:start]]
 
* [[RecordingDevice:stop]]
 
* [[RecordingDevice:stop]]
 +
* [[Constructs::SoundData]]
 
[[Category:Functions]]
 
[[Category:Functions]]
 
{{#set:Description=Gets all recorded audio [[SoundData]] stored in the device's internal ring buffer.}}
 
{{#set:Description=Gets all recorded audio [[SoundData]] stored in the device's internal ring buffer.}}
 
== Other Languages ==
 
== Other Languages ==
 
{{i18n|RecordingDevice:getData}}
 
{{i18n|RecordingDevice:getData}}

Revision as of 12:49, 19 December 2018

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

Gets all recorded audio SoundData stored in the device's internal ring buffer.

The internal ring buffer is cleared when this function is called, so calling it again will only get audio recorded after the previous call. If the device's internal ring buffer completely fills up before getData is called, the oldest data that doesn't fit into the buffer will be lost.

Function

Synopsis

data = RecordingDevice:getData( )

Arguments

None.

Returns

SoundData data (nil)
The recorded audio data, or nil if the device isn't recording.

See Also

Other Languages