From: Steinar H. Gunderson Date: Sat, 4 May 2013 18:40:22 +0000 (+0200) Subject: Fix sync pulse reference length. X-Git-Url: https://git.sesse.net/?p=c64tapwav;a=commitdiff_plain;h=cfbcf5df46fb64dc16b8a9ece8e1758acb040cff Fix sync pulse reference length. --- diff --git a/decode.cpp b/decode.cpp index e3ec677..20c748e 100644 --- a/decode.cpp +++ b/decode.cpp @@ -15,7 +15,7 @@ #define SYNC_PULSE_START 1000 #define SYNC_PULSE_END 15000 -#define SYNC_PULSE_LENGTH 380.0 +#define SYNC_PULSE_LENGTH 378.0 #define SYNC_TEST_TOLERANCE 1.10 struct tap_header { @@ -174,8 +174,8 @@ int main(int argc, char **argv) } double mean_length = C64_FREQUENCY * sum / (SYNC_PULSE_END - SYNC_PULSE_START); calibration_factor = SYNC_PULSE_LENGTH / mean_length; - fprintf(stderr, "Calibrated sync pulse length: %.2f -> 380.0 (change %+.2f%%)\n", - mean_length, 100.0 * (calibration_factor - 1.0)); + fprintf(stderr, "Calibrated sync pulse length: %.2f -> %.2f (change %+.2f%%)\n", + mean_length, SYNC_PULSE_LENGTH, 100.0 * (calibration_factor - 1.0)); // Check for pulses outside +/- 10% (sign of misdetection). for (int i = SYNC_PULSE_START; i < SYNC_PULSE_END; ++i) {