From 856d3e24359f28b503ae9435f45b1488617e5fb5 Mon Sep 17 00:00:00 2001 From: bruceperens Date: Fri, 25 Apr 2014 22:02:31 +0000 Subject: [PATCH] Now that ALSA output drain works correctly, start accumulating the input audio samples for the first frame before keying the transmitter. git-svn-id: https://svn.code.sf.net/p/freetel/code@1571 01035d8c-6547-0410-b346-abe4f91aad63 --- freedv-server/source/run.cpp | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/freedv-server/source/run.cpp b/freedv-server/source/run.cpp index 9ebf636a..b9b4a9c4 100644 --- a/freedv-server/source/run.cpp +++ b/freedv-server/source/run.cpp @@ -422,13 +422,12 @@ namespace FreeDV { // Flush all of the FIFO data. reset(); + // Start accumulating the audio samples for the first codec frame + // before we've finished keying the transmitter. + i->microphone->start(); + i->keying_output->key(1); - // We could really start the microphone before we finish keying the - // transmitter, but at this writing ALSA snd_pcm_wait() doesn't - // really wait until the end of playback, and thus we hear the echo - // of the receiver if we start the microphone too early. - i->microphone->start(); if ( ptt_digital ) state = TransmitDigital; -- 2.25.1