Difference between revisions of "Sound"
From GiderosMobile
Line 13: | Line 13: | ||
=== <translate>Examples</translate> === | === <translate>Examples</translate> === | ||
'''Example'''<br/> | '''Example'''<br/> | ||
− | <source lang="lua">local sound = Sound.new( | + | <source lang="lua">local sound = Sound.new("music.mp3") |
local channel = sound:play() | local channel = sound:play() |
Revision as of 22:15, 26 October 2018
Supported platforms:
Available since: Gideros 2011.6
Inherits from: Object
Description
The Sound class lets you load and play WAV, MP3, MOD, XM, S3M and IT sound files.
Control of the playing sound is performed through the SoundChannel
object.
Examples
Example
local sound = Sound.new("music.mp3")
local channel = sound:play()
-- after some time --
channel:stop()
MethodsSound.new creates a new Sound object |
EventsConstants |