]> git.rkrishnan.org Git - pihpsdr.git/commitdiff
Make sure both receivers have the same sample rate when
authorc vw <dl1ycf@darc.de>
Wed, 19 Jan 2022 14:45:47 +0000 (15:45 +0100)
committerc vw <dl1ycf@darc.de>
Wed, 19 Jan 2022 14:45:47 +0000 (15:45 +0100)
changing from single-RX to dual-RX in P1 (Thanks Rick).

radio.c

diff --git a/radio.c b/radio.c
index 3f88e03b6f500b440cc60daf61006ecaabe8f811..bdd3a3260be8aaad16e7cde5ee9585c8cf7cc2b8 100644 (file)
--- a/radio.c
+++ b/radio.c
@@ -1427,6 +1427,12 @@ g_print("radio_change_receivers: from %d to %d\n",receivers,r);
        gtk_fixed_put(GTK_FIXED(fixed),receiver[1]->panel,0,0);
        set_displaying(receiver[1],1);
        receivers=2;
+       //
+       // Make sure RX1 shares the sample rate  with RX0 when running P1.
+       //
+       if (protocol == ORIGINAL_PROTOCOL && receiver[1]->sample_rate != receiver[0]->sample_rate) {
+           receiver_change_sample_rate(receiver[1],receiver[0]->sample_rate);
+       }
        break;
   }
   reconfigure_radio();