Difference between revisions of "SoundChannel"
| Line 2: | Line 2: | ||
| <languages /> | <languages /> | ||
| <!-- GIDEROSOBJ:SoundChannel --> | <!-- GIDEROSOBJ:SoundChannel --> | ||
| − | '''<translate>Supported platforms</translate>:''' [[File:Platform android.png]][[File:Platform ios.png]][[File:Platform mac.png]][[File:Platform pc.png]][[File:Platform html5.png]][[File:Platform winrt.png]][[File:Platform win32.png]] | + | '''<translate>Supported platforms</translate>:''' [[File:Platform android.png]][[File:Platform ios.png]][[File:Platform mac.png]][[File:Platform pc.png]][[File:Platform html5.png]][[File:Platform winrt.png]][[File:Platform win32.png]]<br/> | 
| − | <br/> | + | '''<translate>Available since</translate>:''' Gideros 2011.6<br/> | 
| − | '''<translate>Available since</translate>:''' Gideros 2011.6 | + | '''<translate>Inherits from</translate>:''' [[Special:MyLanguage/Object|Object]]<br/> | 
| − | <br/> | ||
| − | '''<translate>Inherits from</translate>:''' [[Special:MyLanguage/Object|Object]] | ||
| − | <br/> | ||
| ===<translate>Description</translate>=== | ===<translate>Description</translate>=== | ||
| − | |||
| The '''SoundChannel''' class is used to control and monitor a playing sound. | The '''SoundChannel''' class is used to control and monitor a playing sound. | ||
| − | |||
| − | |||
| − | |||
| ===<translate>SoundChannel Events</translate>=== | ===<translate>SoundChannel Events</translate>=== | ||
| <ul> | <ul> | ||
| − | <li><translate>''Event.COMPLETE = "complete"''  | + | <li><translate>''Event.COMPLETE = "complete"'' When the sound channel has finished playing, [[Special:MyLanguage/Event.COMPLETE|Event.COMPLETE]] event is dispatched.</translate></li> | 
| </ul> | </ul> | ||
| − | |||
| ===<translate>Example</translate>=== | ===<translate>Example</translate>=== | ||
| Line 32: | Line 24: | ||
| end) | end) | ||
| </source> | </source> | ||
| − | |||
| {|- | {|- | ||
| Line 50: | Line 41: | ||
| [[Special:MyLanguage/SoundChannel:setWorldPosition|SoundChannel:setWorldPosition]] <br/><!-- GIDEROSMTD:SoundChannel:setWorldPosition(x,y,z,vx,vy,vz)  --> | [[Special:MyLanguage/SoundChannel:setWorldPosition|SoundChannel:setWorldPosition]] <br/><!-- GIDEROSMTD:SoundChannel:setWorldPosition(x,y,z,vx,vy,vz)  --> | ||
| [[Special:MyLanguage/SoundChannel:stop|SoundChannel:stop]] ''<translate>stops the sound playing in the channel</translate>''<br/><!-- GIDEROSMTD:SoundChannel:stop() stops the sound playing in the channel --> | [[Special:MyLanguage/SoundChannel:stop|SoundChannel:stop]] ''<translate>stops the sound playing in the channel</translate>''<br/><!-- GIDEROSMTD:SoundChannel:stop() stops the sound playing in the channel --> | ||
| + | |||
| | style="width: 50%; vertical-align:top;"| | | style="width: 50%; vertical-align:top;"| | ||
| === <translate>Events</translate> === | === <translate>Events</translate> === | ||
| Line 55: | Line 47: | ||
| === <translate>Constants</translate> === | === <translate>Constants</translate> === | ||
| |} | |} | ||
| − | |||
| − | |||
Revision as of 00:08, 10 December 2019
Supported platforms: 






Available since: Gideros 2011.6
Inherits from: Object
Description
The SoundChannel class is used to control and monitor a playing sound.
SoundChannel Events
- Event.COMPLETE = "complete" When the sound channel has finished playing, Event.COMPLETE event is dispatched.
Example
local sound1 = Sound.new("audio/sound1.ogg")
local audio1 = sound1:play()
audio1:addEventListener(Event.COMPLETE, function()
	-- play a second audio when the first one is complete
	local sound2 = Sound.new("audio/sound2.ogg")
	local audio2 = sound2:play()
end)
| MethodsSoundChannel:getPitch returns the current pitch of the sound channel | EventsConstants | 
