diff --git a/app/cmXScore.c b/app/cmXScore.c index f40435a..c56f16e 100644 --- a/app/cmXScore.c +++ b/app/cmXScore.c @@ -1719,7 +1719,7 @@ cmXsRC_t cmXScoreWriteMidi( cmXsH_t h, const cmChar_t* fn ) } } -cmXsRC_t cmXScoreTest( cmCtx_t* ctx, const cmChar_t* xmlFn, const cmChar_t* midiFn ) +cmXsRC_t cmXScoreTest( cmCtx_t* ctx, const cmChar_t* xmlFn, const cmChar_t* midiFn, const cmChar_t* outFn ) { cmXsRC_t rc; cmXsH_t h = cmXsNullHandle; @@ -1727,7 +1727,8 @@ cmXsRC_t cmXScoreTest( cmCtx_t* ctx, const cmChar_t* xmlFn, const cmChar_t* midi if((rc = cmXScoreInitialize( ctx, &h, xmlFn, midiFn)) != kOkXsRC ) return cmErrMsg(&ctx->err,rc,"XScore alloc failed."); - cmXScoreWriteCsv(h,"/Users/kevin/temp/a0.csv"); + if( outFn != NULL ) + cmXScoreWriteCsv(h,outFn); cmXScoreReport(h,&ctx->rpt,true); return cmXScoreFinalize(&h); diff --git a/app/cmXScore.h b/app/cmXScore.h index d5c538f..cbe0c83 100644 --- a/app/cmXScore.h +++ b/app/cmXScore.h @@ -62,7 +62,7 @@ extern "C" { void cmXScoreReport( cmXsH_t h, cmRpt_t* rpt, bool sortFl ); - cmXsRC_t cmXScoreTest( cmCtx_t* ctx, const cmChar_t* xmlFn, const cmChar_t* midiFn ); + cmXsRC_t cmXScoreTest( cmCtx_t* ctx, const cmChar_t* xmlFn, const cmChar_t* midiFn, const cmChar_t* outFn ); #ifdef __cplusplus }