Difference between revisions of "SoundChannel:getPosition"
From GiderosMobile
Line 1: | Line 1: | ||
__NOTOC__ | __NOTOC__ | ||
− | + | '''Available since:''' Gideros 2011.6<br/> | |
− | ''' | + | '''Class:''' [[SoundChannel]]<br/> |
− | ''' | + | |
− | === | + | === 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 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. | + | If the sound is not playing (paused or stopped), ''getPosition'' returns the last point that was played. |
− | |||
<source lang="lua"> | <source lang="lua"> | ||
(number) = SoundChannel:getPosition() | (number) = SoundChannel:getPosition() | ||
</source> | </source> | ||
− | === | + | |
− | ''' | + | === Return values === |
+ | '''Returns''' (number) the position of the sound in miliseconds<br/> | ||
{{SoundChannel}} | {{SoundChannel}} |
Revision as of 08:03, 5 September 2021
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
- SoundChannel:getPitch
- SoundChannel:getPosition
- SoundChannel:getStreamId
- SoundChannel:getVolume
- SoundChannel:isLooping
- SoundChannel:isPaused
- SoundChannel:isPlaying
- SoundChannel:setEffect
- SoundChannel:setLooping
- SoundChannel:setPaused
- SoundChannel:setPitch
- SoundChannel:setPosition
- SoundChannel:setVolume
- SoundChannel:setWorldPosition
- SoundChannel:stop