From e58a06465c8d6d0e2aadf2206c9282881577c9ec Mon Sep 17 00:00:00 2001 From: James Turner Date: Mon, 2 Aug 2021 09:21:07 +0100 Subject: [PATCH] AI ATC: only use audio if enabled in the dialog Patch by Stefan Frank, check the dialog checkbox setting before sending messages to audio rather than text output. --- src/ATC/trafficcontrol.cxx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/ATC/trafficcontrol.cxx b/src/ATC/trafficcontrol.cxx index c2e723320..7326e1b61 100644 --- a/src/ATC/trafficcontrol.cxx +++ b/src/ATC/trafficcontrol.cxx @@ -812,7 +812,8 @@ void FGATCController::transmit(FGTrafficRecord * rec, FGAirportDynamics *parent, break; } - if (audible) { + const bool atcAudioEnabled = fgGetBool("/sim/sound/atc/enabled", false); + if (audible && atcAudioEnabled) { double onBoardRadioFreq0 = fgGetDouble("/instrumentation/comm[0]/frequencies/selected-mhz"); double onBoardRadioFreq1 =