diff options
author | 2019-04-21 12:11:20 -0400 | |
---|---|---|
committer | 2019-04-21 12:11:20 -0400 | |
commit | f9f5fc63fec57ef332c4e7ad3ff829014beddb95 (patch) | |
tree | e88f4f6bd470c755c6af36f6cf8a6551f1291151 /src | |
parent | b806be41b2feea66852e04e1ac8222c63256a474 (diff) | |
parent | ae3915fd5335ea5b00b418ae286ffd73bc447e1a (diff) |
Merge pull request #4911 from AmatCoder/AmatCoder-tzx_cas-1
tzx_cas.cpp: Apply 1ms pause only on data blocks
Diffstat (limited to 'src')
-rw-r--r-- | src/lib/formats/tzx_cas.cpp | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/src/lib/formats/tzx_cas.cpp b/src/lib/formats/tzx_cas.cpp index ddfe21b81dc..29897dc49b4 100644 --- a/src/lib/formats/tzx_cas.cpp +++ b/src/lib/formats/tzx_cas.cpp @@ -282,11 +282,13 @@ 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 (data_size > 0) + { + int start_pause_samples = millisec_to_samplecount(1); + tzx_output_wave(buffer, start_pause_samples); + size += start_pause_samples; + } if (pause > 0) { int rest_pause_samples = millisec_to_samplecount(pause - 1); |