From: John Melton - G0ORX/N6LYT <john.d.melton@googlemail.com>
Date: Wed, 6 Jul 2016 21:44:04 +0000 (+0000)
Subject: fixed tune bug when sample rate not 48000
X-Git-Url: https://git.rkrishnan.org/pf/components/nxhtml.html?a=commitdiff_plain;h=3d8c4686854043471a07d26e1ce0977c202221b2;p=pihpsdr.git

fixed tune bug when sample rate not 48000
---

diff --git a/old_protocol.c b/old_protocol.c
index 8ded04d..a199e39 100644
--- a/old_protocol.c
+++ b/old_protocol.c
@@ -185,7 +185,7 @@ void schedule_frequency_changed() {
 }
 
 static float sineWave(double* buf, int samples, float phase, float freq) {
-    float phase_step = 2 * PI * freq / 48000.0F;
+    float phase_step = 2 * PI * freq / sample_rate;
     int i;
     for (i = 0; i < samples; i++) {
         buf[i*2] = (double) sin(phase);
diff --git a/pihpsdr b/pihpsdr
index 1124f08..58afba1 100755
Binary files a/pihpsdr and b/pihpsdr differ
diff --git a/release/pihpsdr.tar b/release/pihpsdr.tar
index 971c69a..724f9fa 100644
Binary files a/release/pihpsdr.tar and b/release/pihpsdr.tar differ
diff --git a/release/pihpsdr/pihpsdr b/release/pihpsdr/pihpsdr
index 1124f08..58afba1 100755
Binary files a/release/pihpsdr/pihpsdr and b/release/pihpsdr/pihpsdr differ