]> git.rkrishnan.org Git - pihpsdr.git/commitdiff
fixed tune bug when sample rate not 48000
authorJohn Melton - G0ORX/N6LYT <john.d.melton@googlemail.com>
Wed, 6 Jul 2016 21:44:04 +0000 (21:44 +0000)
committerJohn Melton - G0ORX/N6LYT <john.d.melton@googlemail.com>
Wed, 6 Jul 2016 21:44:04 +0000 (21:44 +0000)
old_protocol.c
pihpsdr
release/pihpsdr.tar
release/pihpsdr/pihpsdr

index 8ded04d9678feb4b0d29eb16f00d511ffd666e7b..a199e39696cb7e92de69e95e2b085f030e3ea26e 100644 (file)
@@ -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 1124f087fce2ca04ac533c6224ceaf4bc1ad11ff..58afba1a1048b844ea32e2b1cbfad1319756a119 100755 (executable)
Binary files a/pihpsdr and b/pihpsdr differ
index 971c69aba4432a2d93803e5c362f763691c10925..724f9fafecdb035a01981e28426041c2e6943017 100644 (file)
Binary files a/release/pihpsdr.tar and b/release/pihpsdr.tar differ
index 1124f087fce2ca04ac533c6224ceaf4bc1ad11ff..58afba1a1048b844ea32e2b1cbfad1319756a119 100755 (executable)
Binary files a/release/pihpsdr/pihpsdr and b/release/pihpsdr/pihpsdr differ