]> git.sesse.net Git - c64tapwav/blobdiff - decode.cpp
Remove an unused #include.
[c64tapwav] / decode.cpp
index 99776bc29a07e15eb54d57c1cd5d2fa8986f4822..0e88f9d85d73d55d5e5a55262c5f68f1b99acfcf 100644 (file)
@@ -1,7 +1,6 @@
 #include <stdio.h>
 #include <string.h>
 #include <math.h>
-#include <unistd.h>
 #include <assert.h>
 #include <limits.h>
 #include <vector>
@@ -42,7 +41,7 @@ double find_zerocrossing(const std::vector<short> &pcm, int x)
 
        double upper = x;
        double lower = x + 1;
-       while (upper - lower > 1e-6) {
+       while (lower - upper > 1e-3) {
                double mid = 0.5f * (upper + lower);
                if (lanczos_interpolate(pcm, mid) > 0) {
                        upper = mid;