更新 'src/Network/fgcom.cxx'
This commit is contained in:
parent
7c77efe229
commit
fdcdc4d6b4
@ -244,7 +244,7 @@ void FGCom::postinit()
|
||||
}
|
||||
|
||||
//WARNING: this _must_ be executed after sound system is totally initialized !
|
||||
if( iaxc_initialize(NUM_CALLS) ) {
|
||||
if( iaxc_initialize(4) ) {
|
||||
SG_LOG(SG_IO, SG_ALERT, "FGCom: cannot initialize iaxclient");
|
||||
_enabled = false;
|
||||
return;
|
||||
@ -262,14 +262,14 @@ void FGCom::postinit()
|
||||
|
||||
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_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);
|
||||
|
||||
/*
|
||||
void iaxc_set_speex_settings(int decode_enhance, float quality,
|
||||
@ -277,8 +277,8 @@ void FGCom::postinit()
|
||||
|
||||
*/
|
||||
|
||||
iaxc_set_filters(IAXC_FILTER_AGC | IAXC_FILTER_DENOISE);
|
||||
iaxc_set_silence_threshold(_silenceThd_node->getFloatValue());
|
||||
//iaxc_set_filters(IAXC_FILTER_AGC | IAXC_FILTER_DENOISE);
|
||||
//iaxc_set_silence_threshold(_silenceThd_node->getFloatValue());
|
||||
|
||||
iaxc_start_processing_thread ();
|
||||
|
||||
@ -315,6 +315,7 @@ void FGCom::postinit()
|
||||
// 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;
|
||||
@ -360,28 +361,21 @@ void FGCom::postinit()
|
||||
if( devs[i].capabilities & IAXC_AD_OUTPUT_DEFAULT )
|
||||
_selectedOutput_node->setIntValue(devs[i].devID);
|
||||
}
|
||||
*/
|
||||
|
||||
// Mute the mic and set speaker at start
|
||||
iaxc_input_level_set( 0.0 );
|
||||
//iaxc_output_level_set(getCurrentCommVolume());
|
||||
iaxc_input_level_set(0.0);
|
||||
iaxc_output_level_set(1.0);
|
||||
|
||||
|
||||
iaxc_millisleep(50);
|
||||
iaxc_millisleep(300);
|
||||
|
||||
|
||||
// Do the first call at start
|
||||
setupCommFrequency();
|
||||
|
||||
iaxc_millisleep(500);
|
||||
|
||||
connectToCommFrequency();
|
||||
|
||||
SG_LOG(SG_SOUND, SG_INFO, "FGCom: postinit 初始化完成");
|
||||
|
||||
iaxc_millisleep(500);
|
||||
|
||||
iaxc_output_level_set(1.0);
|
||||
|
||||
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user