local carSounds = nil
function update(dt)
  if car.index == 0 then
    if not carSounds then
      carSounds = ui.MediaPlayer()
      carSounds:setSource('./sound/Clutchsound.wav'):setAutoPlay(true):setLooping(true)
    end
    local volume = math.clamp((1 - car.clutch - 0.1) / 0.8, 0, 1)
    if ac.isInteriorView() then
      volume = volume * 1.0
    end
    volume = volume * math.clamp((car.rpm - 50) / 500, 0, 1)
    carSounds:setVolume(ac.getAudioVolume('main') * volume * 1)
    ac.debug('volume', volume)
  end
end