Difference between revisions of "Decoder:decode"

m (grammar)
(New page, seemed to be missing up to this point.)
Line 1: Line 1:
 
{{newin|[[11.0]]|110|type=function}}
 
{{newin|[[11.0]]|110|type=function}}
Decodes the audio and returns a [[SoundData]] object containing the decoded audio data.
+
Sets the currently playing position of the Decoder.
 
== Function ==
 
== Function ==
 
=== Synopsis ===
 
=== Synopsis ===
 
<source lang="lua">
 
<source lang="lua">
soundData = Decoder:decode( )
+
Decoder:seek( offset )
 
</source>
 
</source>
 
=== Arguments ===
 
=== Arguments ===
None.
+
{{param|number|offset|The position to seek to, in seconds.}}
 
=== Returns ===
 
=== Returns ===
{{param|SoundData|soundData|Decoded audio data.}}
+
Nothing.
 
== See Also ==
 
== See Also ==
 
* [[parent::Decoder]]
 
* [[parent::Decoder]]
* [[Constructs::SoundData]]
+
* [[Source:seek]]
* [[Source:queue]]
 
 
[[Category:Functions]]
 
[[Category:Functions]]
{{#set:Description=Decodes a chunk of audio data to a SoundData.}}
+
{{#set:Description=Sets the currently playing position of the Decoder.}}
 
== Other Languages ==
 
== Other Languages ==
{{i18n|Decoder:decode}}
+
{{i18n|Decoder:seek}}

Revision as of 06:08, 8 October 2019

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

Sets the currently playing position of the Decoder.

Function

Synopsis

Decoder:seek( offset )

Arguments

number offset
The position to seek to, in seconds.

Returns

Nothing.

See Also

Other Languages