SoundChannel:setVolume

From GiderosMobile
The printable version is no longer supported and may have rendering errors. Please update your browser bookmarks and please use the default browser print function instead.

Available since: Gideros 2011.6
Class: SoundChannel

Description

Sets the volume of the sound channel.

SoundChannel:setVolume(volume,balance)

Parameters

volume: (number) the sound channel new volume. Valid range of this parameter is between 0.0 and 1.0, where 1.0 is the maximum volume value
balance: (number) the sound channel new balance (new Gideros 2022.6)

Example

local bulletsnd = Sound.new("audio/shoot.wav")
local channel = bulletsnd:play()
channel:setVolume(0.5)