![](/media/cache/profiles/d3b154a6afe99c7d4f2b3fa23962a134.jpg.50x50_q85.png)
Renamed
Diff: send_pc1403.cpp
- Revision:
- 2:dff96be9617e
- Parent:
- 1:9289febf4ae9
- Child:
- 5:062962db7a48
--- a/send_pc1403.cpp Fri Feb 18 11:07:34 2022 +0000 +++ b/send_pc1403.cpp Mon Feb 21 16:18:10 2022 +0000 @@ -616,7 +616,7 @@ int WriteFooterToNewWav (FileInfo* ptrFile) { - int error ; + int error ; do { ptrFile->count = 0 ; /* no checksum writing from here until the end */ @@ -638,21 +638,18 @@ debug_printf(" (%02X)", (uchar) ptrFile->sum); /* there are 2bits more HIGH at the end of transmission (at least for PC-1402) M. NOSSWITZ */ - /* Needed ??? - error = WriteBitToWav (1, ptrFile) ; + error = WriteBitToWav (1, ptrFile) ; if (error != ERR_OK) break ; error = WriteBitToWav (1, ptrFile) ; if (error != ERR_OK) break ; -*/ - + /* This puts 2 bits of silence (or 2 HIGH bits alternatively) to the end of the wave file. */ /* CLOAD does not accept any sound, that could be interpreted as a start bit, */ /* during post-processing. Original CSAVE switches the signal low ms after the */ /* end of transmission, before the motor of the cassette recorder is switched off. */ /* This level out is visible in the CSAVE audio signal after the last bit. T. Muecker */ - - /* REMOVED FROM HERE - handeled in the bit sending routine at stream end + /* not needed for the MBed direct-write version error = WriteBitToWav (3, ptrFile) ; 125us High , if (error != ERR_OK) break ; error = WriteBitToWav (2, ptrFile) ; 1 ms Midsignal @@ -665,7 +662,7 @@ int WriteFooterToMemoWav (FileInfo* ptrFile) { - int error ; + int error ; do { error = WriteByteToWav(ptrFile->sum, ORDER_STD, ptrFile->mode, ptrFile) ; @@ -681,12 +678,13 @@ if (error != ERR_OK) break ; /* This puts 2 bits of silence (or 2 HIGH bits alternatively) to the end of the wave file. */ - + /* not needed for the MBed send version error = WriteBitToWav (3, ptrFile) ; if (error != ERR_OK) break ; error = WriteBitToWav (2, ptrFile) ; if (error != ERR_OK) break ; + */ } while (0) ; return (error); @@ -887,7 +885,7 @@ if (error != ERR_OK) break ; } if (error != ERR_OK) break ; - if ( (ptrFile->debug & 0x0040) > 0 ) debug_printf("DEBUG ii %u\n\r", ii); + if ( (ptrFile->debug & 0x0040) > 0 ) debug_printf("\n\rDEBUG ii %u\n\r", ii); inVal = FileStream[ii] ; // fgetc (srcFd) ; /* Read the last byte before EOF mark */ if (inVal == EOF) break ; @@ -908,7 +906,7 @@ } /* Write the END code */ - if ( (ptrFile->debug & 0x0040) > 0 ) debug_printf("DEBUG WriteFooterToNewWav prima\n\r"); + if ( (ptrFile->debug & 0x0040) > 0 ) debug_printf("DEBUG WriteFooterToNewWav\n\r"); error = WriteFooterToNewWav (ptrFile) ; break ; // IDENT_NEW_BAS, IDENT_EXT_BAS @@ -955,7 +953,7 @@ break; } - if ( (ptrFile->debug & 0x0040) > 0 ) debug_printf("DEBUG FileSend error %d\n\r", error); + if ( (ptrFile->debug & 0x0040) > 0 ) debug_printf("\n\rDEBUG FileSend error %d\n\r", error); return (error); } \ No newline at end of file