更新 'src/Network/fgcom.cxx'

This commit is contained in:
2022-12-02 15:47:03 +08:00
parent f678d44ac7
commit 7d48865d7b
+12 -12
View File
@@ -41,7 +41,7 @@
#include <iaxclient.h> #include <iaxclient.h>
#define NUM_CALLS 1 #define NUM_CALLS 4
#define MAX_GND_RANGE 10.0 #define MAX_GND_RANGE 10.0
#define MAX_TWR_RANGE 50.0 #define MAX_TWR_RANGE 50.0
#define MAX_RANGE 100.0 #define MAX_RANGE 100.0
@@ -264,15 +264,15 @@ void FGCom::postinit()
//iaxc_set_callerid("guest","FGCOM"); //iaxc_set_callerid("guest","FGCOM");
//iaxc_set_formats (IAXC_FORMAT_SPEEX, IAXC_FORMAT_ULAW|IAXC_FORMAT_SPEEX); 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_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_speex_settings(1,-1,-1,0,8000,3); iaxc_set_speex_settings(1,-1,-1,0,8000,3);
/* /*
void iaxc_set_speex_settings(int decode_enhance, float quality, void iaxc_set_speex_settings(int decode_enhance, float quality,
@@ -280,8 +280,8 @@ void FGCom::postinit()
*/ */
//iaxc_set_filters(IAXC_FILTER_AGC | IAXC_FILTER_DENOISE); iaxc_set_filters(IAXC_FILTER_AGC | IAXC_FILTER_DENOISE);
//iaxc_set_silence_threshold(_silenceThd_node->getFloatValue()); iaxc_set_silence_threshold(_silenceThd_node->getFloatValue());
iaxc_start_processing_thread (); iaxc_start_processing_thread ();
@@ -373,11 +373,11 @@ void FGCom::postinit()
// Do the first call at start // Do the first call at start
//setupCommFrequency(); setupCommFrequency();
//connectToCommFrequency(); connectToCommFrequency();
iaxc_call("guest:guest@fgcom.jingweiht.com/01118300"); //iaxc_call("guest:guest@fgcom.jingweiht.com/01118300");
SG_LOG(SG_SOUND, SG_ALERT, "FGCom: postinit 初始化完成"); SG_LOG(SG_SOUND, SG_ALERT, "FGCom: postinit 初始化完成");
@@ -386,7 +386,7 @@ void FGCom::postinit()
} }
double FGCom::getCurrentCommVolume() const { double FGCom::getCurrentCommVolume() const {
double rv = 0.4; double rv = 0.8;
if (_speakerLevel_node) { if (_speakerLevel_node) {
rv = rv * _speakerLevel_node->getFloatValue(); rv = rv * _speakerLevel_node->getFloatValue();
@@ -562,7 +562,7 @@ void FGCom::update(double dt)
return; return;
} }
//updateCall(); updateCall();
} }
@@ -591,7 +591,7 @@ void FGCom::shutdown()
void FGCom::valueChanged(SGPropertyNode *prop) void FGCom::valueChanged(SGPropertyNode *prop)
{ {
return; //return;
if (prop == _enabled_node) { if (prop == _enabled_node) {
bool isEnabled = prop->getBoolValue(); bool isEnabled = prop->getBoolValue();
if (_enabled == isEnabled) { if (_enabled == isEnabled) {