Skip to content
Snippets Groups Projects
Commit 6ddae49b authored by Emmanuel Milou's avatar Emmanuel Milou
Browse files

Clean up, indentation, try to handle latency problems in iax/pulseaudio

parent af54afd3
No related branches found
No related tags found
No related merge requests found
......@@ -452,19 +452,8 @@ AudioRtpRTX::run () {
TimerPort::incTimer(_layerFrameSize); // 'frameSize' ms
}
// _debug("stop stream for audiortp loop\n");
audiolayer->stopStream();
_debug("- ARTP Action: Stop\n");
//} catch(std::exception &e) {
//_start.post();
//_debug("! ARTP: Stop %s\n", e.what());
//throw;
//} catch(...) {
//_start.post();
//_debugException("* ARTP Action: Stop");
//throw;
//}
}
......
......@@ -198,7 +198,7 @@ PulseLayer::getMic(void *buffer, int toCopy)
void
PulseLayer::startStream (void)
{
_micRingBuffer.flush();
flushMic();
_debug("Start stream\n");
pa_threaded_mainloop_lock(m);
pa_stream_cork( record->pulseStream(), NULL, NULL, NULL);
......
......@@ -429,7 +429,6 @@ IAXVoIPLink::answer(const CallID& id)
call->setConnectionState(Call::Connected);
// Start audio
audiolayer->startStream();
audiolayer->flushMic();
return true;
}
......@@ -701,7 +700,6 @@ IAXVoIPLink::iaxHandleCallEvent(iax_event* event, IAXCall* call)
}
Manager::instance().peerAnsweredCall(id);
audiolayer->flushMic();
// start audio here?
} else {
// deja connecté ?
......@@ -805,7 +803,7 @@ IAXVoIPLink::iaxHandleVoiceEvent(iax_event* event, IAXCall* call)
// resample
nbInt16 = converter->upsampleData( spkrDataDecoded , spkrDataConverted , ac->getClockRate() , audiolayer->getSampleRate() , nbSample_);
//audiolayer->playSamples( spkrDataConverted , nbInt16 * sizeof(SFLDataFormat), true);
/* Write the data to the mic ring buffer */
audiolayer->putMain (spkrDataConverted , nbInt16 * sizeof(SFLDataFormat));
} else {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment