From eca3eb8c7854a30c6532a16a1cd36981b028742b Mon Sep 17 00:00:00 2001 From: sorgelig Date: Fri, 10 Aug 2018 11:34:48 +0800 Subject: [PATCH] Assume CDT format is the same as TZX, skip initial pause block. --- tzx2wav.cpp | 2 +- user_io.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/tzx2wav.cpp b/tzx2wav.cpp index 2bda290..9848b49 100644 --- a/tzx2wav.cpp +++ b/tzx2wav.cpp @@ -204,7 +204,7 @@ void PauseWave(unsigned int pause_ms) // Waits for "pause" milliseconds int p; - if ((!skippause) || (curr != (numblocks - 1))) + if (curr && ((!skippause) || (curr != (numblocks - 1)))) { p = (unsigned int)((((float)pause_ms)*freq) / 1000.0); PlayWave(p); diff --git a/user_io.cpp b/user_io.cpp index 1f81904..d246550 100644 --- a/user_io.cpp +++ b/user_io.cpp @@ -920,7 +920,7 @@ int user_io_file_tx(char* name, unsigned char index, char opensave, char mute) spi8(0xff); DisableFpga(); - if (strlen(f.name) > 4 && !strcasecmp(f.name + strlen(f.name) - 4, ".tzx")) + if (strlen(f.name) > 4 && (!strcasecmp(f.name + strlen(f.name) - 4, ".tzx") || !strcasecmp(f.name + strlen(f.name) - 4, ".cdt"))) { printf("Processing TZX...\n");