dofile ("./Sounds/events_id.lua")

function getMessageDuration(event)
	if event == wsRepGroundServiceCopy then
		return 1.0
	elseif 	event == wsRepWingmenCopy or
			event == wsRepWingmenNegative or
			(event >= wsRepWingmenRoger and event <= wsRepWingmenUnable) then
		return 1.5
	elseif event >= wsRepGroundServiceNegative and event <= wsRepGroundServiceMaximum then
		return 2.4		
	elseif (event >= wsRepHumanHel_LoadMin and event <= wsRepHumanHel_Setup_NVG) or
			(event >= wsRepHuman_Refueling_Start and event <= wsRepHuman_Refueling_End) then
		return 2.0
	elseif 	(event >= wsRepWingmenIamHit and event <= wsRepWingmenEngagingTarget) or
		(event >= wsRepWingmenTakingPosition and event <= wsRepWingmenOnPosition) or
		(event >= wsRepWingmenTargetDestroyed and event <= wsRepWingmenRockets) or
		(event >= wsRepWingmenBugout and event <= wsRepWingmenBanditDestroyed) or
		(event >= wsRepWingmenRadarOff and event <= wsRepWingmenMusicOn) or
		(event >= wsRepWingmenRolling and event <= wsRepWingmenCheckSix) or
		event == wsRepWingmenEngagingBandit or
		(event >= wsRepTankerClearedPreContact and event <= wsRepTankerBreakawayBreakaway) or
		event == wsRepAWACSClean or
		event == wsRepAWACSMerged or
		event == wsRepAWACSMaximum or
		event == wsRepATCNull or
		event == wsRepATCTaxiDenied or
		event == wsRepATCHoldPosition or
		event == wsRepATCTakeoffDenied or
		event == wsRepATCTrafficBearing or
		(event >= wsRepBettyNull and event <= wsRepBettyRightEngineFire) or
		(event >= wsRepBettyGearUp and event <= wsRepBettyMaximum) or
		(event >= wsRepHumanHel_Use_Turbo_Gear and event <= wsRepHumanGroundElecPowerOff) or
		(event >= wsRepATCYouAreAboveGlidePath and event <= wsRepATCHoldForTraffic) then
		return 3.0
	elseif (event >= wsRepHumanVectorToNearestBandit and event <= wsRepHumanDeclare) then
		return 3.0
	elseif (event >= wsRepHumanEngageMyTarget and event <= wsRepHumanRequestTakeOff) and
			(event >= wsRepHumanHelGoHeavy and event <= wsRepHumanHelGoFloat) then
		return 4.5
	elseif 	(event >= wsRepWingmenProcessTargetDesignation and event <= wsRepWingmenProcessTargetDesignationComplete) or
			(event >= wsRepWingmenRequestPermissionToAttack and event <= wsRepWingmenSplashMyBandit) or
			event == wsRepWingmenContactBearingForMiles or
			(event >= wsRepWingmenGoingSeed and event <= wsRepWingmenAttackingPrimary) or
			event == wsRepWingmenFollowScanMode or
			(event >= wsRepWingmenHelReconEndFound and event <= wsRepWingmenHelLaunchAbortTask) or
			event == wsRepAWACSContactIsFriendly or
			event == wsRepAWACSContactIsHostile or
			event == wsRepAWACSNoTankerAvailable or
			(event >= wsRepHumanEngageMyTarget and event <= wsRepHumanHelGoFloat) or
			event == wsRepHumanRequestControlHover or
			event == wsRepATCControlHoverDenied or
			(event >= wsRepRequestEnginesLaunch and event <= wsRepHumanRequestLanding) or
			(event >= wsRepALMAZ_Null and event <= wsRepALMAZ_Maximum) or
			(event >= wsRepA10_VMU_Null and event <= wsRepA10_VMU_Maximum) or
			(event >= wsRepHumanEngageDlinkTarget and event <= wsRepHumanHold) or
			(event >= wsRepBettyMaximumAOA and event <= wsRepBettyGearDown) or
			event == wsRepATCClearedForVisual or
			event == wsRepATCOrbitForSpacing or			
			event == wsRepATCAzimuth or
			event == wsRepGoSecondary or 
			event == wsRepWingmenReconBearing then
		return 5.0
	elseif 	event == wsRepHumanInbound or			
			event == wsRepATCClearedToTaxiRunWay or
			event == wsRepATCCheckLandingGear or
			event == wsRepATCClearedForEngineStartUp then
		return 7.0
	elseif 	event == wsRepWingmenHelReconBearing or
			(event >= wsRepHumanHelReconnaissance_01 and event <= wsRepHumanHelReconnaissance_10)  or
			event == wsRepAWACSHomeBearing or
			event == wsRepAWACSTankerBearing or			
		    event == wsRepATCClearedControlHover or
			event == wsRepATCYouAreClearedForLanding then
		return 9.0
	elseif 	event == wsRepATCYouAreClearedForTO or	
			event == wsRepAWACSVectorToNearestBandit then
		return 12.0
	elseif 	event == wsRepAWACSBanditBearingForMiles or
			event == wsRepAWACSPopUpGroup then
		return 14.0
	elseif event == wsRepATCFlyHeading then
		return 17.0
	end
end

messageDuration = {}

for i = wsRepNull, wsRepMaximum do
	messageDuration[i] = getMessageDuration(i)
end
