|
@@ -4,6 +4,7 @@
|
4
|
4
|
#include "cmErr.h"
|
5
|
5
|
#include "cmCtx.h"
|
6
|
6
|
#include "cmFile.h"
|
|
7
|
+#include "cmRptFile.h"
|
7
|
8
|
#include "cmMem.h"
|
8
|
9
|
#include "cmMallocDebug.h"
|
9
|
10
|
#include "cmLinkedHeap.h"
|
|
@@ -2071,6 +2072,35 @@ cmMfRC_t cmMidiFileGenSvgFile( cmCtx_t* ctx, const cmChar_t* midiFn, const cmCha
|
2071
|
2072
|
return rc;
|
2072
|
2073
|
}
|
2073
|
2074
|
|
|
2075
|
+cmMfRC_t cmMidiFileReport( cmCtx_t* ctx, const cmChar_t* midiFn, const cmChar_t* outTextFn )
|
|
2076
|
+{
|
|
2077
|
+ cmMidiFileH_t mfH = cmMidiFileNullHandle;
|
|
2078
|
+ cmRptFileH_t rptH = cmRptFileNullHandle;
|
|
2079
|
+ cmMfRC_t rc;
|
|
2080
|
+
|
|
2081
|
+ if((rc = cmMidiFileOpen(ctx,&mfH,midiFn)) != kOkMfRC )
|
|
2082
|
+ {
|
|
2083
|
+ rc = cmErrMsg(&ctx->err,rc,"Unable to open the MIDI file: %s\n",cmStringNullGuard(midiFn));
|
|
2084
|
+ goto errLabel;
|
|
2085
|
+ }
|
|
2086
|
+
|
|
2087
|
+ if(( rc = cmRptFileCreate(ctx,&rptH, outTextFn, NULL )) != kOkRfRC )
|
|
2088
|
+ {
|
|
2089
|
+ rc = cmErrMsg(&ctx->err,rc,"Unable to open the report file: %s\n",cmStringNullGuard(outTextFn));
|
|
2090
|
+ goto errLabel;
|
|
2091
|
+
|
|
2092
|
+ }
|
|
2093
|
+
|
|
2094
|
+ cmMidiFilePrintMsgs(mfH, cmRptFileRpt(rptH) );
|
|
2095
|
+
|
|
2096
|
+ errLabel:
|
|
2097
|
+ cmRptFileClose(&rptH);
|
|
2098
|
+ cmMidiFileClose(&mfH);
|
|
2099
|
+
|
|
2100
|
+ return rc;
|
|
2101
|
+}
|
|
2102
|
+
|
|
2103
|
+
|
2074
|
2104
|
void cmMidiFilePrintControlNumbers( cmCtx_t* ctx, const char* fn )
|
2075
|
2105
|
{
|
2076
|
2106
|
cmMidiFileH_t h = cmMidiFileNullHandle;
|