setVolume
Definition
-- @/=[C]:-1
function setVolume(...)
Callers
@/lua/vehicle/controller/pneumatics.lua
if pressureDiff > 0 then
obj:setVolume(groupData.soundLoopUp, groupData.volumeUp)
obj:cutSFX(groupData.soundLoopUp)
elseif pressureDiff < 0 then
obj:setVolume(groupData.soundLoopDown, groupData.volumeDown)
obj:cutSFX(groupData.soundLoopDown)
if enabled and not groupData.isPlayingUp then
obj:setVolume(groupData.soundLoopUp, groupData.volumeUp)
obj:cutSFX(groupData.soundLoopUp)
if enabled and not groupData.isPlayingDown then
obj:setVolume(groupData.soundLoopDown, groupData.volumeDown)
obj:cutSFX(groupData.soundLoopDown)
if g.soundLoopUp then
obj:setVolume(g.soundLoopUp, 0)
g.isPlayingUp = false
if g.soundLoopDown then
obj:setVolume(g.soundLoopDown, 0)
g.isPlayingDown = false
@/lua/ge/extensions/campaign/comics.lua
if name ~= 'AudioChannelGui' and name ~= 'AudioChannelMaster' and name ~= 'AudioChannelOther' then
audio:setVolume(0)
end
@/lua/vehicle/controller/sound/reverseWarn.lua
beepLoop = beepLoop or obj:createSFXSource2(beepLoopName, "AudioDefaultLoop3D", "reverseBeep", soundNode, 0)
obj:setVolume(beepLoop, beepVolume)
obj:cutSFX(beepLoop)
@/lua/vehicle/electrics.lua
if val then
obj:setVolume(snd, 1)
obj:playSFX(snd)
if hornSound2 then
obj:setVolume(hornSound2, 0)
end
end
obj:setVolume(hornSound1, 1)
obj:playSFX(hornSound1)
@/lua/ge/ge_utils.lua
local AudioChannel = scenetree[k]
if AudioChannel then AudioChannel:setVolume(v) end
end
@/lua/vehicle/controller/pneumatics/lowAirPressureWarning.lua
lowAirWarningSoundEvent = obj:createSFXSource2(warningSoundEventName, "AudioDefaultLoop3D", "lowAirWarning", warningSoundNode, 0)
obj:setVolume(lowAirWarningSoundEvent, lowAirWarningSoundVolume)
end
@/lua/vehicle/controller/pneumatics/actuators.lua
if g.isPlayingIncrease then
obj:setVolume(g.soundLoopIncrease, g.volumeIncrease * volumeCoef)
end
if g.isPlayingDecrease then
obj:setVolume(g.soundLoopDecrease, g.volumeDecrease * volumeCoef)
end
obj:cutSFX(g.soundLoopIncrease)
obj:setVolume(g.soundLoopIncrease, g.volumeIncrease * volumeCoef)
obj:playSFX(g.soundLoopIncrease)
obj:cutSFX(g.soundLoopDecrease)
obj:setVolume(g.soundLoopDecrease, g.volumeDecrease * volumeCoef)
obj:playSFX(g.soundLoopDecrease)
if g.soundLoopIncrease then
obj:setVolume(g.soundLoopIncrease, 0)
g.isPlayingIncrease = false
if g.soundLoopDecrease then
obj:setVolume(g.soundLoopDecrease, 0)
g.isPlayingDecrease = false
@/lua/vehicle/powertrain/nitrousOxideInjection.lua
purgeSounds[k] = purgeSounds[k] or obj:createSFXSource2(purgeEvent, "AudioDefaultLoop3D", "nitrousPurge", v.cid1, 0)
obj:setVolume(purgeSounds[k], purgeVolume)
obj:cutSFX(purgeSounds[k])
@/lua/vehicle/controller/jato.lua
if thrusterLoops2 and thrusterLoops2[i] then
obj:setVolume(thrusterLoops2[i], 0)
end
thrusterLoops1[i] = thrusterLoops1[i] or obj:createSFXSource2(thrusterLoopName, "AudioDefaultLoop3D", "jatoThrusterLoop", thrusterNodes[i][1], 0)
obj:setVolume(thrusterLoops1[i], jatoInput)
obj:playSFX(thrusterLoops1[i])
@/lua/vehicle/powertrain/combustionEngine.lua
}
obj:setVolume(device.engineMiscSounds.starterSoundEngine, device.engineMiscSounds.starterVolume)
device.engineMiscSounds.starterSoundExhaust = obj:createSFXSource2(jbeamData.starterSampleExhaust, "AudioDefaultLoop3D", "", starterExhaustNode, 0)
obj:setVolume(device.engineMiscSounds.starterSoundExhaust, device.engineMiscSounds.starterVolumeExhaust)
end
device.engineMiscSounds.shutOffSoundEngine = obj:createSFXSource2(jbeamData.shutOffSampleEngine, "AudioDefaultLoop3D", "", shutOffEngineNode, 0)
obj:setVolume(device.engineMiscSounds.shutOffSoundEngine, device.engineMiscSounds.shutOffVolumeEngine)
end
device.engineMiscSounds.shutOffSoundExhaust = obj:createSFXSource2(jbeamData.shutOffSampleExhaust, "AudioDefaultLoop3D", "", shutOffExhaustNode, 0)
obj:setVolume(device.engineMiscSounds.shutOffSoundExhaust, device.engineMiscSounds.shutOffVolumeExhaust)
end
@/lua/vehicle/sounds.lua
if sound then
obj:setVolume(sound, volume)
obj:cutSFX(sound)
@/lua/ge/extensions/freeroam/bigMapMode.lua
sound:play(-1)
sound:setVolume(1)
sound:setTransform(getCameraTransform())
sound:stop(-1)
sound:setVolume(1)
sound:setTransform(getCameraTransform())