From 191749bf7b5019a0b66e84422a5127443188469e Mon Sep 17 00:00:00 2001 From: zhongjin Date: Sat, 22 Oct 2022 15:22:38 +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 | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) diff --git a/src/Network/fgcom.cxx b/src/Network/fgcom.cxx index e82e8fa..1a00f4a 100644 --- a/src/Network/fgcom.cxx +++ b/src/Network/fgcom.cxx @@ -406,8 +406,6 @@ void FGCom::setupCommFrequency(int channel) { void FGCom::connectToCommFrequency() { - SG_LOG(SG_IO, SG_INFO, "FGCom: connectToCommFrequency" ); - // ensure that the current comm is still in range if ((_currentCallFrequency > 0.0) && !isInRange(_currentCallFrequency)) { SG_LOG(SG_IO, SG_WARN, "FGCom: call out of range of: " << _currentCallFrequency); @@ -589,6 +587,9 @@ void FGCom::valueChanged(SGPropertyNode *prop) //FIXME: not implemented in IAX audio driver (audio_openal.c) if (prop == _micBoost_node && _initialized) { + + SG_LOG(SG_IO, SG_INFO, "FGCom: prop = _micBoost_node" ); + int micBoost = prop->getIntValue(); SG_CLAMP_RANGE( micBoost, 0, 1 ); iaxc_mic_boost_set( micBoost ) ; // 0 = enabled , 1 = disabled @@ -597,6 +598,9 @@ void FGCom::valueChanged(SGPropertyNode *prop) //FIXME: not implemented in IAX audio driver (audio_openal.c) if ((prop == _selectedInput_node || prop == _selectedOutput_node) && _initialized) { + + SG_LOG(SG_IO, SG_INFO, "FGCom: prop = _selectedInput_node _selectedOutput_node" ); + int selectedInput = _selectedInput_node->getIntValue(); int selectedOutput = _selectedOutput_node->getIntValue(); iaxc_audio_devices_set(selectedInput, selectedOutput, 0); @@ -609,13 +613,20 @@ void FGCom::valueChanged(SGPropertyNode *prop) _listener_active++; if (prop == _speakerLevel_node && _enabled) { + + SG_LOG(SG_IO, SG_INFO, "FGCom: prop = _speakerLevel_node" ); + float speakerLevel = prop->getFloatValue(); SG_CLAMP_RANGE( speakerLevel, 0.0, 1.0 ); _speakerLevel_node->setFloatValue(speakerLevel); - iaxc_output_level_set(speakerLevel); + //iaxc_output_level_set(speakerLevel); + SG_LOG(SG_IO, SG_INFO, "FGCom: speakerLevel " << speakerLevel ); } if (prop == _micLevel_node && _enabled) { + + SG_LOG(SG_IO, SG_INFO, "FGCom: prop = _micLevel_node" ); + float micLevel = prop->getFloatValue(); SG_CLAMP_RANGE( micLevel, 0.0, 1.0 ); _micLevel_node->setFloatValue(micLevel);