local soundeffectsutil = require "soundeffectsutil"

function data()
return {
	tracks = {
		{ name = "vehicle/AN2/AN2_idle.wav", refDist = 30.0 },
		{ name = "vehicle/AN2/AN2_power1.wav", refDist = 30.0 },
		{ name = "vehicle/AN2/AN2_distant.wav", refDist = 230.0, hasVelocity = false }
	},
	events = {
		land = { names = { "vehicle/AN2/AN2_land.wav" }, refDist = 30.0, hasVelocity = false },
		openDoors = { names = { "vehicle/AN2/AN2_open_door.wav" }, refDist = 30.0 },
		closeDoors = { names = { "vehicle/AN2/AN2_close_door.wav" }, refDist = 30.0 }
	},

	updateFn = function (input)
		return {
			tracks = {
				{ 
					gain = soundeffectsutil.sampleCurve({ { 0, 1 }, { 1, 0 } }, input.power01),
					pitch = soundeffectsutil.sampleCurve({ { 0, 1 }, { 1.0, 1.4 } }, input.power01)
				},
				{ 
					gain = soundeffectsutil.sampleCurve({ { 0, 0.3 }, { 1.0, 1.0 } }, input.power01),
					pitch = soundeffectsutil.sampleCurve({ { 0, 0.9 }, { 1.0, 1.3} }, input.power01)
				},
				{ 
					gain = soundeffectsutil.sampleCurve({ { 0.5, 0.0 }, { 0.9, 0.7 } }, input.power01),
					pitch = 1.0
				}
			},
			events = {
				land = { gain = 1.0, pitch = 1.0 },
				openDoors = { gain = 1.1, pitch = 1.2 },
				closeDoors = { gain = 1.1, pitch = 1.2 }
			}
		}
	end
}
end
