Difference between revisions of "SoundChannel:getPosition"

From GiderosMobile
(Created page with "__NOTOC__ '''Available since:''' Gideros 2011.6<br/> === Description === <br /> If the sound is playing, `getPosition` returns the position of the current playback, measured i...")
 
m (Text replacement - "</source>" to "</syntaxhighlight>")
 
(12 intermediate revisions by 2 users not shown)
Line 1: Line 1:
 
__NOTOC__
 
__NOTOC__
 
'''Available since:''' Gideros 2011.6<br/>
 
'''Available since:''' Gideros 2011.6<br/>
 +
'''Class:''' [[SoundChannel]]<br/>
 +
 
=== Description ===
 
=== Description ===
<br />
+
If the sound is playing, ''getPosition'' returns the position of the current playback, measured in miliseconds from the start of the sound.
If the sound is playing, `getPosition` returns the position of the current playback, measured in miliseconds from the start of the sound.<br />
+
 
If the sound is not playing (paused or stopped), `getPosition` returns the last point that was played.<br />
+
If the sound is not playing (paused or stopped), ''getPosition'' returns the last point that was played.
<br />
+
<syntaxhighlight lang="lua">
<source lang="lua">
+
(number) = SoundChannel:getPosition()
(number), = SoundChannel:getPosition()
+
</syntaxhighlight>
</source>
+
 
'''Returns''' (number) The position of the sound in miliseconds.<br/>
+
=== Return values ===
 +
'''Returns''' (number) the position of the sound in miliseconds<br/>
 +
 
 +
{{SoundChannel}}

Latest revision as of 14:32, 13 July 2023

Available since: Gideros 2011.6
Class: SoundChannel

Description

If the sound is playing, getPosition returns the position of the current playback, measured in miliseconds from the start of the sound.

If the sound is not playing (paused or stopped), getPosition returns the last point that was played.

(number) = SoundChannel:getPosition()

Return values

Returns (number) the position of the sound in miliseconds