Sound:play: Difference between revisions

From GiderosMobile
No edit summary
No edit summary
Line 1: Line 1:
__NOTOC__
__NOTOC__
'''<translate>Available since</translate>:''' Gideros 2011.6<br/>
'''<translate>Available since</translate>:''' Gideros 2011.6<br/>
'''<translate>Class</translate>:''' [[Special:MyLanguage/Sound|Sound]]<br/>
=== <translate>Description</translate> ===
=== <translate>Description</translate> ===
<translate><br />
<translate><br />
Creates a new [[Special:MyLanguage/SoundChannel|SoundChannel]] object to play the sound. By using the retured [[Special:MyLanguage/SoundChannel|SoundChannel]] object,<br />
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 /></translate>
<br /></translate>
Line 14: Line 15:
'''paused''': (boolean, default = false) <translate></translate> <br/>
'''paused''': (boolean, default = false) <translate></translate> <br/>
=== <translate>Return values</translate> ===
=== <translate>Return values</translate> ===
'''<translate>Returns</translate>''' (SoundChannel) <translate>A [[Special:MyLanguage/SoundChannel|SoundChannel]] object, which you use to control the sound. This function returns [[Special:MyLanguage/nil|nil]] if you run out of available sound channels.</translate><br/>
'''<translate>Returns</translate>''' (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 08:27, 24 August 2018

Available since: Gideros 2011.6
Class: Sound

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.