Skip to content
Snippets Groups Projects
Commit 4e26ed73 authored by Alexandre Savard's avatar Alexandre Savard
Browse files

make thread sleep during 5 ms insead of 20 (#1143)

parent cf2b8d50
No related branches found
No related tags found
No related merge requests found
...@@ -574,7 +574,8 @@ AudioRtpRTX::run () { ...@@ -574,7 +574,8 @@ AudioRtpRTX::run () {
int timestamp = 0; // for mic int timestamp = 0; // for mic
int countTime = 0; // for receive int countTime = 0; // for receive
TimerPort::setTimer(_layerFrameSize); // TimerPort::setTimer(_layerFrameSize);
TimerPort::setTimer(5);
audiolayer->startStream(); audiolayer->startStream();
_start.post(); _start.post();
...@@ -605,15 +606,18 @@ AudioRtpRTX::run () { ...@@ -605,15 +606,18 @@ AudioRtpRTX::run () {
if(sessionWaiting == 1){ if(sessionWaiting == 1){
// _debug("Record TWO buffer \n"); // _debug("Record TWO buffer \n");
_ca->recAudio.recData(spkrDataConverted,micData,_nSamplesSpkr,_nSamplesMic); _ca->recAudio.recData(spkrDataDecoded,micData,_nSamplesSpkr,_nSamplesMic);
} }
else { else {
// _debug("Record ONE buffer \n"); // _debug("Record ONE buffer \n");
_ca->recAudio.recData(micData,_nSamplesMic); _ca->recAudio.recData(micData,_nSamplesMic);
} }
// Thread::sleep(TimerPort::getTimer());
// TimerPort::incTimer(_layerFrameSize); // 'frameSize' ms
Thread::sleep(TimerPort::getTimer()); Thread::sleep(TimerPort::getTimer());
TimerPort::incTimer(_layerFrameSize); // 'frameSize' ms TimerPort::incTimer(5); // 'frameSize' ms
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment