From 5b7b20aa0ad88fbf7b3d0f5e9d6cad27801920d7 Mon Sep 17 00:00:00 2001 From: zhongjin Date: Tue, 6 Dec 2022 16:34:17 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=96=B0=20'src/Network/fgcom.cxx'?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/Network/fgcom.cxx | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/src/Network/fgcom.cxx b/src/Network/fgcom.cxx index 5ed1d2e..c6b5fa8 100644 --- a/src/Network/fgcom.cxx +++ b/src/Network/fgcom.cxx @@ -646,7 +646,7 @@ void FGCom::valueChanged(SGPropertyNode *prop) _mpTransmitPowerNode->setValue(1.0); SGPath soundpath( globals->get_fg_root() ); - soundpath.append("/Sounds/click.wav"); + soundpath.append("/Sounds/ptt.wav"); SG_LOG(SG_SOUND, SG_ALERT, "FGCom: PTT active: " << soundpath); @@ -669,6 +669,18 @@ void FGCom::valueChanged(SGPropertyNode *prop) // SG_LOG(SG_SOUND, SG_ALERT, "FGCom: PTT release: " << _currentCallFrequency << " vol=" << getCurrentCommVolume()); _mpTransmitFrequencyNode->setValue(0); _mpTransmitPowerNode->setValue(0); + + SGPath soundpath( globals->get_fg_root() ); + soundpath.append("/Sounds/click.wav"); + + SG_LOG(SG_SOUND, SG_ALERT, "FGCom: PTT active: " << soundpath); + + std::string urlcmd = "ffplay -nodisp -autoexit -loglevel quiet -i "; + + urlcmd.append(soundpath.c_str()); + + SG_LOG(SG_SOUND, SG_INFO, "CMD :" << urlcmd ); + system(urlcmd.c_str()); } }