From 3b050ab640f7b9d3c84b5349f22f606a1590fd80 Mon Sep 17 00:00:00 2001 From: kevin Date: Fri, 11 Nov 2022 11:52:59 -0500 Subject: [PATCH] cwIoMidiRecordPlay.cpp : Fixed bug where sizeof file read was 0 in _am_file_read() --- cwIoMidiRecordPlay.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/cwIoMidiRecordPlay.cpp b/cwIoMidiRecordPlay.cpp index 917ee23..5da0076 100644 --- a/cwIoMidiRecordPlay.cpp +++ b/cwIoMidiRecordPlay.cpp @@ -531,7 +531,7 @@ namespace cw unsigned fileByteN = 0; // count of bytes in the file int version = 0; // version id (always a negative number) bool alloc_fl = false; - bool print_fl = true; + bool print_fl = false; file::handle_t fH; if((rc = file::open(fH,fn,file::kReadFl)) != kOkRC ) @@ -586,6 +586,7 @@ namespace cw } else { + fileByteN = recordN * sizeof(am_midi_msg_t); if((rc = file::read(fH,msgArrayRef,fileByteN)) != kOkRC ) { rc = cwLogError(kReadFailRC,"Data read failed on Audio-MIDI file: '%s'.", fn );