Sound:play: Difference between revisions

From GiderosMobile
Created page with "__NOTOC__ '''Available since:''' Gideros 2011.6<br/> === Description === <br /> Creates a new `SoundChannel` object to play the sound. By using the retured `SoundChannel` obje..."
 
No edit summary
Line 7: Line 7:
<br />
<br />
<source lang="lua">
<source lang="lua">
(SoundChannel), = Sound:play(startTimeloopingpaused,)
(SoundChannel) = Sound:play(startTime,looping,paused)
</source>
</source>
'''startTime:''' (number, default = 0) The initial position in milliseconds at which playback should start. ''''''<br/>
'''startTime''': (number, default = 0) The initial position in milliseconds at which playback should start. ''''''<br/>
'''looping:''' (boolean, default = false)  ''''''<br/>
'''looping''': (boolean, default = false)  ''''''<br/>
'''paused:''' (boolean, default = false)  ''''''<br/>
'''paused''': (boolean, default = false)  ''''''<br/>
'''Returns''' (SoundChannel) A `SoundChannel` object, which you use to control the sound. This function returns `nil` if you run out of available sound channels.<br/>
'''Returns''' (SoundChannel) A `SoundChannel` object, which you use to control the sound. This function returns `nil` if you run out of available sound channels.<br/>

Revision as of 09:17, 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)

'startTime: (number, default = 0) The initial position in milliseconds at which playback should start. '
'looping: (boolean, default = false) '
'paused: (boolean, default = false) '
Returns (SoundChannel) A `SoundChannel` object, which you use to control the sound. This function returns `nil` if you run out of available sound channels.