From 639d25291801fb8a0c43a49970758f27e8ea4ffb Mon Sep 17 00:00:00 2001 From: zhongjin Date: Wed, 30 Nov 2022 16:34:53 +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 | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/src/Network/fgcom.cxx b/src/Network/fgcom.cxx index 7cd435b..4eb9da7 100644 --- a/src/Network/fgcom.cxx +++ b/src/Network/fgcom.cxx @@ -246,14 +246,15 @@ void FGCom::postinit() app += _version_node->getStringValue(); iaxc_set_callerid( _callsign_node->getStringValue().c_str(), app.c_str() ); - //iaxc_set_formats (IAXC_FORMAT_SPEEX, IAXC_FORMAT_ULAW|IAXC_FORMAT_SPEEX); - iaxc_set_formats (IAXC_FORMAT_GSM, IAXC_FORMAT_ULAW|IAXC_FORMAT_GSM); + iaxc_set_formats (IAXC_FORMAT_SPEEX, IAXC_FORMAT_ULAW|IAXC_FORMAT_SPEEX); + + //iaxc_set_formats (IAXC_FORMAT_GSM, IAXC_FORMAT_ULAW|IAXC_FORMAT_GSM); - //iaxc_set_speex_settings(1, 5, 0, 1, 0, 3); + iaxc_set_speex_settings(1, 5, 0, 1, 0, 3); //iaxc_set_filters(IAXC_FILTER_AGC | IAXC_FILTER_DENOISE); //iaxc_set_silence_threshold(_silenceThd_node->getFloatValue()); @@ -291,6 +292,7 @@ void FGCom::postinit() //FIXME: OpenAL driver use an hard-coded device // so all following is unused finally until someone // implement "multi-device" support in IAX audio driver + SGPropertyNode *node = fgGetNode("/sim/fgcom", 0, true); struct iaxc_audio_device *devs; @@ -338,8 +340,15 @@ void FGCom::postinit() iaxc_millisleep(50); + //zhongjin + iaxc_millisleep(500); + + // Do the first call at start setupCommFrequency(); + + iaxc_millisleep(500); + connectToCommFrequency(); }