diff options
author | Robert <Robbbert@users.noreply.github.com> | 2018-09-16 17:02:40 +1000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-09-16 17:02:40 +1000 |
commit | ec16bdc44e8d00d9ddb0d8ac95a1b37aa5c97786 (patch) | |
tree | 6f34c91a970d7f8c6b0766b4d037a9cbfe76c7c7 | |
parent | dfe49d34569c26490d484bd47d4dbe1055f58d01 (diff) | |
parent | 745e8c0f0f13af338e215d0ce6d6a8c446074670 (diff) |
Merge pull request #4005 from AmatCoder/AmatCoder-fix-tzx
tzx_cass.cpp: 1ms pause is always required
-rw-r--r-- | src/lib/formats/tzx_cas.cpp | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/src/lib/formats/tzx_cas.cpp b/src/lib/formats/tzx_cas.cpp index d950419361e..fe12640e773 100644 --- a/src/lib/formats/tzx_cas.cpp +++ b/src/lib/formats/tzx_cas.cpp @@ -282,13 +282,15 @@ static int tzx_cas_handle_block( int16_t **buffer, const uint8_t *bytes, int pau } } /* pause */ + int start_pause_samples = millisec_to_samplecount(1); + + tzx_output_wave(buffer, start_pause_samples); + size += start_pause_samples; + if (pause > 0) - { - int start_pause_samples = millisec_to_samplecount(1); + { int rest_pause_samples = millisec_to_samplecount(pause - 1); - - tzx_output_wave(buffer, start_pause_samples); - size += start_pause_samples; + wave_data = WAVE_LOW; tzx_output_wave(buffer, rest_pause_samples); size += rest_pause_samples; |