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...")
 
Line 7: Line 7:
 
<br />
 
<br />
 
<source lang="lua">
 
<source lang="lua">
(number), = SoundChannel:getPosition()
+
(number) = SoundChannel:getPosition()
 
</source>
 
</source>
 
'''Returns''' (number) The position of the sound in miliseconds.<br/>
 
'''Returns''' (number) The position of the sound in miliseconds.<br/>

Revision as of 10:18, 23 August 2018

Available since: Gideros 2011.6

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()

Returns (number) The position of the sound in miliseconds.