cmScore.c,cmTakeSeqBldr.c,cmTimeLine.c,cmMidiFile.h/c,cmMidiFilePlay.c,cmDspKr.c : Changed order of arg's in call to cmMidiFileOpen().

This commit is contained in:
kevin 2016-02-17 17:14:43 -05:00
parent 5c27c2455f
commit 9df86e1c49
7 changed files with 10 additions and 10 deletions

View File

@ -2424,7 +2424,7 @@ cmScRC_t cmScoreFileFromMidi( cmCtx_t* ctx, const cmChar_t* midiFn, const c
cmErrSetup(&err,&ctx->rpt,"MIDI to Score");
if( cmMidiFileOpen(midiFn, &mfH, ctx ) != kOkMfRC )
if( cmMidiFileOpen(ctx, &mfH, midiFn ) != kOkMfRC )
return cmErrMsg(&err,kMidiFileFailScRC,"Unable to open the MIDI file '%s'.",midiFn);
if( cmCsvInitialize(&csvH,ctx) != kOkCsvRC )
@ -2658,7 +2658,7 @@ void cmScoreFix( cmCtx_t* ctx )
if( cmCsvParseFile(csvH, crfn, 0 ) != kOkCsvRC )
goto errLabel;
if( cmMidiFileOpen(mfn,&mfH,ctx) != kOkMfRC )
if( cmMidiFileOpen(ctx,&mfH,mfn) != kOkMfRC )
goto errLabel;
mn = cmMidiFileMsgCount(mfH);

View File

@ -949,7 +949,7 @@ cmTsbRC_t cmTakeSeqBldrLoadTake( cmTakeSeqBldrH_t h, unsigned tlMarkUid, bool ov
}
// open the MIDI file
if( cmMidiFileOpen( cmMidiFileName(mf->h), &mfH, &p->ctx ) != kOkMfRC )
if( cmMidiFileOpen( &p->ctx, &mfH, cmMidiFileName(mf->h) ) != kOkMfRC )
{
rc = cmErrMsg(&p->err,kInvalidArgTsbRC,"The MIDI file '%s' could not be opened.", cmStringNullGuard(cmMidiFileName(mf->h)));
goto errLabel;

View File

@ -720,7 +720,7 @@ cmTlRC_t _cmTlAllocMidiFileRecd( _cmTl_t* p, const cmChar_t* nameStr, const cmCh
fn = cmFsMakeFn( p->prefixPath, fn, NULL, NULL );
// open the midi file
if( cmMidiFileOpen(fn, &mfH, &p->ctx ) != kOkMfRC )
if( cmMidiFileOpen(&p->ctx, &mfH, fn ) != kOkMfRC )
return cmErrMsg(&p->err,kMidiFileFailTlRC,"The time line midi file '%s' could not be opened.",cmStringNullGuard(fn));
// force the first msg to occurr one quarter note into the file

View File

@ -445,7 +445,7 @@ cmMfRC_t _cmMidiFileClose( _cmMidiFile_t* mfp )
}
cmMfRC_t cmMidiFileOpen( const char* fn, cmMidiFileH_t* hPtr, cmCtx_t* ctx )
cmMfRC_t cmMidiFileOpen( cmCtx_t* ctx, cmMidiFileH_t* hPtr, const char* fn )
{
cmMfRC_t rc = kOkMfRC;
_cmMidiFile_t* mfp = NULL;
@ -1445,7 +1445,7 @@ void cmMidiFilePrintControlNumbers( cmCtx_t* ctx, const char* fn )
cmMidiFileH_t h = cmMidiFileNullHandle;
cmMfRC_t rc;
if((rc = cmMidiFileOpen(fn, &h, ctx )) != kOkMfRC )
if((rc = cmMidiFileOpen(ctx, &h, fn )) != kOkMfRC )
{
cmErrMsg(&ctx->err,rc,"MIDI file open failed on '%s'.",fn);
goto errLabel;
@ -1475,7 +1475,7 @@ void cmMidiFileTest( const char* fn, cmCtx_t* ctx )
cmMfRC_t rc;
cmMidiFileH_t h = cmMidiFileNullHandle;
if((rc = cmMidiFileOpen(fn,&h,ctx)) != kOkMfRC )
if((rc = cmMidiFileOpen(ctx,&h,fn)) != kOkMfRC )
{
printf("Error:%i Unable to open the cmMidi file: %s\n",rc,fn);
return;

View File

@ -106,7 +106,7 @@ extern "C" {
extern cmMidiFileH_t cmMidiFileNullHandle;
cmMfRC_t cmMidiFileOpen( const char* fn, cmMidiFileH_t* hPtr, cmCtx_t* ctx );
cmMfRC_t cmMidiFileOpen( cmCtx_t* ctx, cmMidiFileH_t* hPtr, const char* fn );
cmMfRC_t cmMidiFileClose( cmMidiFileH_t* hp );
cmMfRC_t cmMidiFileWrite( cmMidiFileH_t h, const char* fn );

View File

@ -107,7 +107,7 @@ cmMfpRC_t cmMfpLoadFile( cmMfpH_t h, const char* fn )
cmMfp_t* p = _cmMfpHandleToPtr(h);
cmMidiFileH_t mfH = cmMidiFileNullHandle;
if((rc = cmMidiFileOpen( fn, &mfH, &p->ctx )) != kOkMfRC )
if((rc = cmMidiFileOpen( &p->ctx, &mfH, fn )) != kOkMfRC )
return _cmMfpError(p,kFileOpenFailMfpRC);
if((rc= cmMfpLoadHandle( h, mfH )) == kOkMfpRC )

View File

@ -773,7 +773,7 @@ cmDspRC_t _cmDspMidiFilePlayOpen(cmDspCtx_t* ctx, cmDspInst_t* inst )
if( fn==NULL || strlen(fn)==0 )
return rc;
if( cmMidiFileOpen( fn, &p->mfH, ctx->cmCtx ) != kOkFileRC )
if( cmMidiFileOpen( ctx->cmCtx, &p->mfH, fn ) != kOkFileRC )
rc = cmErrMsg(&inst->classPtr->err, kInstResetFailDspRC, "MIDI file open failed.");
else
{