From b6b40ac70aefd3d697675b840610c2856304786e Mon Sep 17 00:00:00 2001 From: Daniil Gentili Date: Thu, 3 Aug 2017 16:41:38 +0200 Subject: [PATCH] Changed opus signal type to music, increased size of outgoing packet buffer --- OpusEncoder.cpp | 2 +- VoIPController.cpp | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/OpusEncoder.cpp b/OpusEncoder.cpp index 494e715..e1f5ac4 100644 --- a/OpusEncoder.cpp +++ b/OpusEncoder.cpp @@ -16,7 +16,7 @@ tgvoip::OpusEncoder::OpusEncoder(MediaStreamItf *source):queue(11), bufferPool(9 opus_encoder_ctl(enc, OPUS_SET_COMPLEXITY(10)); opus_encoder_ctl(enc, OPUS_SET_PACKET_LOSS_PERC(15)); opus_encoder_ctl(enc, OPUS_SET_INBAND_FEC(1)); - opus_encoder_ctl(enc, OPUS_SET_SIGNAL(OPUS_SIGNAL_VOICE)); + opus_encoder_ctl(enc, OPUS_SET_SIGNAL(OPUS_SIGNAL_MUSIC)); opus_encoder_ctl(enc, OPUS_SET_BANDWIDTH(OPUS_BANDWIDTH_FULLBAND)); requestedBitrate=32000; currentBitrate=0; diff --git a/VoIPController.cpp b/VoIPController.cpp index 436824d..6ae5f8e 100644 --- a/VoIPController.cpp +++ b/VoIPController.cpp @@ -161,7 +161,7 @@ VoIPController::VoIPController() : activeNetItfName(""), proxyAddress(""), proxyUsername(""), proxyPassword(""), - outgoingPacketsBufferPool(1024, 20){ + outgoingPacketsBufferPool(1024, 64){ seq=1; lastRemoteSeq=0; state=STATE_WAIT_INIT; @@ -276,6 +276,7 @@ VoIPController::~VoIPController(){ sendQueue->Put(PendingOutgoingPacket{0}); if(openingTcpSocket) openingTcpSocket->Close(); + LOGD("before join sendThread"); join_thread(sendThread); LOGD("before join recvThread");