]> git.rkrishnan.org Git - pihpsdr.git/commitdiff
"block" audio_write() if transmitting in CW
authorDL1YCF <dl1ycf@darc.de>
Tue, 1 Jun 2021 15:02:01 +0000 (17:02 +0200)
committerDL1YCF <dl1ycf@darc.de>
Tue, 1 Jun 2021 15:02:01 +0000 (17:02 +0200)
pulseaudio.c

index 3ea44574f5bce70b9e94d617fd39eddb49259896..59a7449ccddbe52c3ef27527c255b02b1861d44e 100644 (file)
@@ -10,6 +10,7 @@
 #include "mode.h"
 #include "new_protocol.h"
 #include "old_protocol.h"
+#include "vfo.h"
 #ifdef SOAPYSDR
 #include "soapy_protocol.h"
 #endif
@@ -368,6 +369,11 @@ int audio_write(RECEIVER *rx,float left_sample,float right_sample) {
   int result=0;
   int rc;
   int err;
+  int txmode=get_tx_mode();
+
+  if (rx == active_receiver && isTransmitting() && (txmode==modeCWU || txmode==modeCWL)) {
+    return 0;
+  }
 
   g_mutex_lock(&rx->local_audio_mutex);