diff --git a/MumbleCommunicator.cpp b/MumbleCommunicator.cpp index 0e2a05c..bfdc480 100644 --- a/MumbleCommunicator.cpp +++ b/MumbleCommunicator.cpp @@ -112,7 +112,7 @@ mumble::MumbleCommunicator::~MumbleCommunicator() { void mumble::MumbleCommunicator::loop() { - senderThread.reset(new std::thread(&MumbleCommunicator::senderThreadFunction, this)); + //senderThread.reset(new std::thread(&MumbleCommunicator::senderThreadFunction, this)); while (!quit) { int status = mumble_tick(mumble); diff --git a/PjsuaCommunicator.cpp b/PjsuaCommunicator.cpp index d3a19eb..ef1756c 100644 --- a/PjsuaCommunicator.cpp +++ b/PjsuaCommunicator.cpp @@ -194,7 +194,10 @@ pj_status_t sip::PjsuaCommunicator::mediaPortGetFrame(pjmedia_frame *frame) { if (availableSamples < count) { callbackLogger.debug("Requested %d samples, available %d, filling remaining with zeros.", count, availableSamples); - std::memset(&(samples[availableSamples]), 0, sizeof(pj_int16_t) * (count - availableSamples)); + + for (int i = samplesToRead; i < count; ++i) { + samples[i] = 0; + } } return PJ_SUCCESS; diff --git a/main.cpp b/main.cpp index 48e4118..729dc7e 100644 --- a/main.cpp +++ b/main.cpp @@ -18,7 +18,7 @@ int main(int argc, char *argv[]) { log4cpp::Appender *appender1 = new log4cpp::OstreamAppender("console", &std::cout); appender1->setLayout(new log4cpp::BasicLayout()); log4cpp::Category &logger = log4cpp::Category::getRoot(); - logger.setPriority(log4cpp::Priority::NOTICE); + logger.setPriority(log4cpp::Priority::INFO); logger.addAppender(appender1);