Difference between revisions of "SoundChannel:getPosition"

From GiderosMobile
m (Text replacement - "<source" to "<syntaxhighlight")
Line 7: Line 7:
  
 
If the sound is not playing (paused or stopped), ''getPosition'' returns the last point that was played.
 
If the sound is not playing (paused or stopped), ''getPosition'' returns the last point that was played.
<source lang="lua">
+
<syntaxhighlight lang="lua">
 
(number) = SoundChannel:getPosition()
 
(number) = SoundChannel:getPosition()
 
</source>
 
</source>

Revision as of 14:30, 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. <syntaxhighlight lang="lua"> (number) = SoundChannel:getPosition() </source>

Return values

Returns (number) the position of the sound in miliseconds