From 8cd54208c05fb6f1e7145966fc7de4eb9606bba9 Mon Sep 17 00:00:00 2001 From: Tarald Date: Tue, 4 Aug 2020 11:57:11 +0200 Subject: [PATCH] udp socket audio buffer / 8 --- handlers/udpsockethandler.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/handlers/udpsockethandler.cpp b/handlers/udpsockethandler.cpp index 474e1b7..901d05e 100644 --- a/handlers/udpsockethandler.cpp +++ b/handlers/udpsockethandler.cpp @@ -84,13 +84,13 @@ void UdpSocketHandler::readPendingDatagrams() mInputStreamHandler->mAudioMutexVector[index]->lock(); mInputStreamHandler->mAudioBufferVector[index]->append(data); mInputStreamHandler->mAudioMutexVector[index]->unlock(); - if(!mInputStreamHandler->mAudioPlaybackStartedVector[index] && mInputStreamHandler->mAudioBufferVector[index]->size() >= mBufferSize) + if(!mInputStreamHandler->mAudioPlaybackStartedVector[index] && mInputStreamHandler->mAudioBufferVector[index]->size() >= mBufferSize/8) { *mInputStreamHandler->mAudioFutures.at(index) = QtConcurrent::run(mInputStreamHandler->mAudioPlaybackHandlerVector[index], &AudioPlaybackHandler::start); qDebug() << "Starting AudioPlaybackHandler for streamId: " << streamId; mInputStreamHandler->mAudioPlaybackStartedVector[index] = true; } - // qDebug() << "audio buffer size " << mAudioBufferVector[index].size() << "after signal: " << signalCount; + //qDebug() << "audio buffer size " << mInputStreamHandler->mAudioBufferVector[index]->size() << "after signal: " << signalCount; } else if (audioOrVideoInt == 1) { @@ -106,7 +106,7 @@ void UdpSocketHandler::readPendingDatagrams() qDebug() << "STARTING VIDEOPLAYBACKHANDLER!!!"; mInputStreamHandler->mVideoPlaybackStartedVector[index] = true; } - qDebug() << "video buffer size " << mInputStreamHandler->mVideoBufferVector[index]->size() << "after signal: " << signalCount; + //qDebug() << "video buffer size " << mInputStreamHandler->mVideoBufferVector[index]->size() << "after signal: " << signalCount; } else {