Difference between revisions of "Decoder:decode"

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

Latest revision as of 06:16, 8 October 2019

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

Decodes the audio and returns a SoundData object containing the decoded audio data.

Function

Synopsis

soundData = Decoder:decode( )

Arguments

None.

Returns

SoundData soundData
Decoded audio data.

See Also

Other Languages