Difference between revisions of "Sound:play"

From GiderosMobile
(removed language stuff)
Line 1: Line 1:
 
__NOTOC__
 
__NOTOC__
<languages />
+
'''Available since:''' Gideros 2011.6<br/>
'''<translate>Available since</translate>:''' Gideros 2011.6<br/>
+
'''Class:''' [[Sound]]<br/>
'''<translate>Class</translate>:''' [[Special:MyLanguage/Sound|Sound]]<br/>
+
 
=== <translate>Description</translate> ===
+
=== Description ===
<translate><br />
+
Creates a new '''SoundChannel''' object to play the sound. By using the returned '''SoundChannel''' object, you can stop the sound and monitor the position.
Creates a new [[Special:MyLanguage/SoundChannel|SoundChannel]] object to play the sound. By using the retured [[Special:MyLanguage/SoundChannel|SoundChannel]] object,<br />
 
you can stop the sound and monitor the position.<br />
 
<br /></translate>
 
 
<source lang="lua">
 
<source lang="lua">
 
(SoundChannel) = Sound:play(startTime,looping,paused)
 
(SoundChannel) = Sound:play(startTime,looping,paused)
 
</source>
 
</source>
=== <translate>Parameters</translate> ===
+
 
'''startTime''': (number, default = 0) <translate>The initial position in milliseconds at which playback should start.</translate> <br/>
+
=== Parameters ===
'''looping''': (boolean, default = false) <translate></translate> <br/>
+
'''startTime''': (number, default = 0) the initial position in milliseconds at which playback should start<br/>
'''paused''': (boolean, default = false) <translate></translate> <br/>
+
'''looping''': (boolean, default = false) <br/>
=== <translate>Return values</translate> ===
+
'''paused''': (boolean, default = false) <br/>
'''<translate>Returns</translate>''' (SoundChannel) <translate>A [[Special:MyLanguage/SoundChannel|SoundChannel]] object, which you use to control the sound. This function returns ''nil'' if you run out of available sound channels.</translate><br/>
+
 
 +
=== 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<br/>
  
 
{{Sound}}
 
{{Sound}}

Revision as of 07:58, 29 May 2021

Available since: Gideros 2011.6
Class: Sound

Description

Creates a new SoundChannel object to play the sound. By using the returned 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