setVolumePitchCT
Definition
-- @/=[C]:-1
function setVolumePitchCT(...)
Callers
@/lua/ge/extensions/core/audioRibbon.lua
end
sfxEmitterOnAxis.emitter:setVolumePitchCT(
sfxEmitterOnAxis.vol,
@/lua/vehicle/sounds.lua
self.lastTexture = texture
obj:setVolumePitchCT(self.obj, vol, pitch, color, texture)
return true
@/lua/vehicle/wheels.lua
if wd.tirePunctureLoop then
obj:setVolumePitchCT(wd.tirePunctureLoop, punctureVolume, puncturePitch, punctureColor, 1)
end
@/lua/vehicle/powertrain/combustionEngine.lua
if device.engineMiscSounds.starterSoundEngine then
obj:setVolumePitchCT(device.engineMiscSounds.starterSoundEngine, device.engineMiscSounds.starterVolume, 1, params.main_gain, 0)
end
if device.engineMiscSounds.shutOffSoundEngine then
obj:setVolumePitchCT(device.engineMiscSounds.shutOffSoundEngine, device.engineMiscSounds.shutOffVolumeEngine, 1, params.main_gain, 0)
end
if device.engineMiscSounds.starterSoundExhaust then
obj:setVolumePitchCT(device.engineMiscSounds.starterSoundExhaust, device.engineMiscSounds.starterVolumeExhaust, 1, params.main_gain, 0)
end
if device.engineMiscSounds.shutOffSoundExhaust then
obj:setVolumePitchCT(device.engineMiscSounds.shutOffSoundExhaust, device.engineMiscSounds.shutOffVolumeExhaust, 1, params.main_gain, 0)
end
@/lua/vehicle/controller/sound/linearMovement.lua
local function updateMovementSound(positionSensorBeamLength, movementVelocity, movementDirection, volume, pitch, dt)
obj:setVolumePitchCT(movementSound, volume, pitch, movementDirection, 0)
@/lua/vehicle/powertrain/turbocharger.lua
bovSound = bovSound or obj:createSFXSource2(turbo.bovSoundFileName or "event:>Vehicle>Forced_Induction>Turbo_01>turbo_bov", "AudioDefaultLoop3D", "Bov", assignedEngine.engineNodeID, 0)
obj:setVolumePitchCT(bovSound, relativePressure * turboSizeCoef, 1, bovSoundVolumeCoef, 0)
obj:cutSFX(bovSound)
flutterSound = flutterSound or obj:createSFXSource2(turbo.flutterSoundFileName or "event:>Vehicle>Forced_Induction>Turbo_02>turbo_bov", "AudioDefaultLoop3D", "Flutter", assignedEngine.engineNodeID, 0)
obj:setVolumePitchCT(flutterSound, relativePressure * turboSizeCoef, 1, flutterSoundVolumeCoef, 0)
obj:cutSFX(flutterSound)
@/lua/vehicle/controller/sound/AVAS.lua
local speedCoef = linearScale(speed, 0, maxSpeed, 0, 1)
obj:setVolumePitchCT(forwardSound, warningVolume, 1, speedCoef, 0)
obj:setVolumePitchCT(reverseSound, warningVolume, 1, speedCoef, 0)
obj:setVolumePitchCT(forwardSound, warningVolume, 1, speedCoef, 0)
obj:setVolumePitchCT(reverseSound, warningVolume, 1, speedCoef, 0)
end
@/lua/vehicle/powertrain/compressor.lua
local color = 1 - device.deloadCoef
obj:setVolumePitchCT(device.compressorSound, volume, pitch, color, 0)
--guihooks.graph({"Pressure", device.accumulatorPressure, 55000000, ""}, {"Flow", device.pumpedAirFlow, 0.005, ""}, {"Volume Coef", volumeFlowCoef, 1, ""}, {"Volume", volume, 1, ""}, {"Pitch", pitch, 1, ""})
obj:playSFX(device.compressorSound)
obj:setVolumePitchCT(device.compressorSound, 0, 0, 0, 0)
@/lua/vehicle/powertrain/hydraulicPump.lua
local isLowFlow = device.pumpFlowRate < 0.000005
obj:setVolumePitchCT(device.pumpSound, volume, pitch, normalizedPressure, device.pumpLoopStartStopEnabled and (isLowFlow and 0 or 1) or 0.5)
device.pumpSound = obj:createSFXSource2(pumpLoopEvent, "AudioDefaultLoop3D", "pumpSound", pumpLoopNodeId, 1)
obj:setVolumePitchCT(device.pumpSound, 0, 0, 0, 0)
obj:playSFX(device.pumpSound)
@/lua/vehicle/powertrain/hydraulicCylinder.lua
local volume = linearScale(absVelocitySmooth, cylinder.movementLoopVolumeMinVelocity, cylinder.movementLoopVolumeMaxVelocity, cylinder.movementLoopVolumeMin, cylinder.movementLoopVolumeMax)
obj:setVolumePitchCT(cylinder.movementSound, volume, 1, 0, 0)
cylinder.movementSound = obj:createSFXSource2(cylinderMovementEvent, "AudioDefaultLoop3D", "movementSound", movementLoopNodeId, 1)
obj:setVolumePitchCT(cylinder.movementSound, 0, 0, 0, 0)
obj:playSFX(cylinder.movementSound)