]> git.rkrishnan.org Git - pihpsdr.git/commitdiff
Do not call cw_audio_write if no local audio active
authorDL1YCF <dl1ycf@darc.de>
Mon, 24 May 2021 08:32:10 +0000 (10:32 +0200)
committerDL1YCF <dl1ycf@darc.de>
Mon, 24 May 2021 08:32:10 +0000 (10:32 +0200)
transmitter.c

index e2a74ac56d9b5a9558e37d53d828ca0526a062b5..374821431b44c60637e737747040e1210a972ca5 100644 (file)
@@ -1422,7 +1422,7 @@ void add_mic_sample(TRANSMITTER *tx,float mic_sample) {
        // side tone
        ramp=cwramp48[cw_shape];
        cwsample=0.00197 * getNextSideToneSample() * cw_keyer_sidetone_volume * ramp;
-       cw_audio_write(active_receiver, cwsample);
+       if(active_receiver->local_audio) cw_audio_write(active_receiver, cwsample);
         cw_shape_buffer48[tx->samples]=ramp;
        //
        // In the new protocol, we MUST maintain a constant flow of audio samples to the radio