Difference between revisions of "Source:tell"

(Created page with "{{newin|0.8.0}} Gets the currently playing position of the Source. == Function == === Synopsis === <source lang="lua"> pos = Source:tell( unit ) </source> === Arguments === {...")
 
m (grammar)
 
(5 intermediate revisions by 3 users not shown)
Line 1: Line 1:
{{newin|[[0.8.0]]}}
+
{{newin|[[0.8.0]]|080|type=function}}
Gets the currently playing position of the Source.
+
Gets the currently playing position of the Source. With the queueable source type, this method returns a value based only on the currently playing buffer.
 
== Function ==
 
== Function ==
 
=== Synopsis ===
 
=== Synopsis ===
 
<source lang="lua">
 
<source lang="lua">
pos = Source:tell( unit )
+
position = Source:tell( unit )
 
</source>
 
</source>
 
=== Arguments ===
 
=== Arguments ===
 
{{param|TimeUnit|unit ("seconds")|The type of unit for the return value.}}
 
{{param|TimeUnit|unit ("seconds")|The type of unit for the return value.}}
 
=== Returns ===
 
=== Returns ===
The currently playing position of the [[Source]].
+
{{param|number|position|The currently playing position of the [[Source]].}}
 
== See Also ==
 
== See Also ==
 
* [[Source:seek]]
 
* [[Source:seek]]
 +
* [[Source:getDuration]]
 
* [[parent::Source]]
 
* [[parent::Source]]
 
[[Category:Functions]]
 
[[Category:Functions]]

Latest revision as of 13:38, 16 March 2024

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

Gets the currently playing position of the Source. With the queueable source type, this method returns a value based only on the currently playing buffer.

Function

Synopsis

position = Source:tell( unit )

Arguments

TimeUnit unit ("seconds")
The type of unit for the return value.

Returns

number position
The currently playing position of the Source.

See Also

Other Languages