From: bruceperens Date: Fri, 25 Apr 2014 22:02:31 +0000 (+0000) Subject: Now that ALSA output drain works correctly, start accumulating the input X-Git-Url: http://git.whiteaudio.com/gitweb/?a=commitdiff_plain;h=856d3e24359f28b503ae9435f45b1488617e5fb5;p=freetel-svn-tracking.git 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 --- 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;