Sound:play: Difference between revisions
From GiderosMobile
No edit summary |
No edit summary |
||
| Line 2: | Line 2: | ||
'''Available since:''' Gideros 2011.6<br/> | '''Available since:''' Gideros 2011.6<br/> | ||
=== Description === | === Description === | ||
<br /> | <translate><br /> | ||
Creates a new | Creates a new [[[SoundChannel` object to play the sound. By using the retured `SoundChannel]]] object,<br /> | ||
you can stop the sound and monitor the position.<br /> | you can stop the sound and monitor the position.<br /> | ||
<br /> | <br /></translate> | ||
<source lang="lua"> | <source lang="lua"> | ||
(SoundChannel) = Sound:play(startTime,looping,paused) | (SoundChannel) = Sound:play(startTime,looping,paused) | ||
</source> | </source> | ||
=== Parameters === | === Parameters === | ||
'''startTime''': (number, default = 0) The initial position in milliseconds at which playback should start. <br/> | '''startTime''': (number, default = 0) <translate>The initial position in milliseconds at which playback should start.</translate> <br/> | ||
'''looping''': (boolean, default = false) | '''looping''': (boolean, default = false) <translate></translate> <br/> | ||
'''paused''': (boolean, default = false) | '''paused''': (boolean, default = false) <translate></translate> <br/> | ||
=== Return values === | === Return values === | ||
'''Returns''' (SoundChannel) A | '''Returns''' (SoundChannel) <translate>A [[[SoundChannel` object, which you use to control the sound. This function returns `nil]]] if you run out of available sound channels.</translate><br/> | ||
Revision as of 12:33, 23 August 2018
Available since: Gideros 2011.6
Description
Creates a new [[[SoundChannel` object to play the sound. By using the retured `SoundChannel]]] object,
you can stop the sound and monitor the position.
(SoundChannel) = Sound:play(startTime,looping,paused)
Parameters
startTime: (number, default = 0) The initial position in milliseconds at which playback should start.
looping: (boolean, default = false)
paused: (boolean, default = false)
Return values
Returns (SoundChannel) A [[[SoundChannel` object, which you use to control the sound. This function returns `nil]]] if you run out of available sound channels.