Difference between revisions of "SoundChannel:setVolume"
From GiderosMobile
(removed language stuff) |
|||
| Line 1: | Line 1: | ||
__NOTOC__ | __NOTOC__ | ||
| + | '''Available since:''' Gideros 2011.6<br/> | ||
| + | '''Class:''' [[SoundChannel]]<br/> | ||
| − | + | === Description === | |
| − | + | Sets the volume of the sound channel. | |
| − | |||
| − | |||
| − | |||
| − | === | ||
| − | |||
| − | |||
<source lang="lua"> | <source lang="lua"> | ||
| − | + | SoundChannel:setVolume(volume) | |
</source> | </source> | ||
| − | === | + | === Example === |
<source lang="lua"> | <source lang="lua"> | ||
local bulletsnd = Sound.new("audio/shoot.wav") | local bulletsnd = Sound.new("audio/shoot.wav") | ||
| Line 20: | Line 16: | ||
</source> | </source> | ||
| − | === | + | === Parameters === |
| − | '''volume''': (number) | + | '''volume''': (number) the new volume of the sound channel. Valid range of this parameter is between 0.0 and 1.0, where 1.0 is the maximum volume value<br/> |
| − | <br/> | ||
{{SoundChannel}} | {{SoundChannel}} | ||
Revision as of 00:19, 3 September 2021
Available since: Gideros 2011.6
Class: SoundChannel
Description
Sets the volume of the sound channel.
SoundChannel:setVolume(volume)
Example
local bulletsnd = Sound.new("audio/shoot.wav")
local channel = bulletsnd:play()
channel:setVolume(0.5)
Parameters
volume: (number) the new volume of the sound channel. Valid range of this parameter is between 0.0 and 1.0, where 1.0 is the maximum volume value
- SoundChannel:getPitch
- SoundChannel:getPosition
- SoundChannel:getStreamId
- SoundChannel:getVolume
- SoundChannel:isLooping
- SoundChannel:isPaused
- SoundChannel:isPlaying
- SoundChannel:setEffect
- SoundChannel:setLooping
- SoundChannel:setPaused
- SoundChannel:setPitch
- SoundChannel:setPosition
- SoundChannel:setVolume
- SoundChannel:setWorldPosition
- SoundChannel:stop