From fd68c49bef6eeb88e86f6e90029a4e42614ed4d8 Mon Sep 17 00:00:00 2001 From: zhongjin Date: Sun, 29 Oct 2023 13:12:56 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=96=B0=20'utils/fgcom/fgcom=5Fexter?= =?UTF-8?q?nal.cxx'?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- utils/fgcom/fgcom_external.cxx | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/utils/fgcom/fgcom_external.cxx b/utils/fgcom/fgcom_external.cxx index cc9a423..42fe002 100644 --- a/utils/fgcom/fgcom_external.cxx +++ b/utils/fgcom/fgcom_external.cxx @@ -182,7 +182,10 @@ int main(int argc, char** argv) lib_setVolume(1.0, 0.0); } else { SG_LOG( SG_GENERAL, SG_INFO, "[LISTEN] mute mic, unmute speaker" ); - lib_setVolume(0.0, currentData.outputVol); + //lib_setVolume(0.0, currentData.outputVol); + lib_setVolume(0.0, 1.0); + + } } @@ -526,7 +529,7 @@ void lib_setVolume(double input, double output) void lib_setSilenceThreshold(double thd) { SG_CLAMP_RANGE(thd, -60, 0); - SG_LOG(SG_GENERAL, SG_DEBUG, "Set silence threshold=" << thd); + SG_LOG(SG_GENERAL, SG_ALERT, "Set silence threshold=" << thd); iaxc_set_silence_threshold(thd); } @@ -554,12 +557,10 @@ bool lib_init() } iaxc_set_callerid( _callsign.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); // iaxc_set_filters(IAXC_FILTER_AGC | IAXC_FILTER_DENOISE); iaxc_set_event_callback(iaxc_callback); iaxc_start_processing_thread ();