소스 검색

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

master
kevin 8 년 전
부모
커밋
9df86e1c49
7개의 변경된 파일10개의 추가작업 그리고 10개의 파일을 삭제
  1. 2
    2
      app/cmScore.c
  2. 1
    1
      app/cmTakeSeqBldr.c
  3. 1
    1
      app/cmTimeLine.c
  4. 3
    3
      cmMidiFile.c
  5. 1
    1
      cmMidiFile.h
  6. 1
    1
      cmMidiFilePlay.c
  7. 1
    1
      dsp/cmDspKr.c

+ 2
- 2
app/cmScore.c 파일 보기

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

+ 1
- 1
app/cmTakeSeqBldr.c 파일 보기

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

+ 1
- 1
app/cmTimeLine.c 파일 보기

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

+ 3
- 3
cmMidiFile.c 파일 보기

@@ -445,7 +445,7 @@ cmMfRC_t _cmMidiFileClose( _cmMidiFile_t* mfp )
445 445
 }
446 446
 
447 447
 
448
-cmMfRC_t cmMidiFileOpen( const char* fn, cmMidiFileH_t* hPtr, cmCtx_t* ctx )
448
+cmMfRC_t cmMidiFileOpen( cmCtx_t* ctx, cmMidiFileH_t* hPtr, const char* fn )
449 449
 {
450 450
   cmMfRC_t       rc     = kOkMfRC;
451 451
   _cmMidiFile_t* mfp    = NULL;
@@ -1445,7 +1445,7 @@ void cmMidiFilePrintControlNumbers( cmCtx_t* ctx, const char* fn )
1445 1445
   cmMidiFileH_t h = cmMidiFileNullHandle;
1446 1446
   cmMfRC_t rc;
1447 1447
 
1448
-  if((rc = cmMidiFileOpen(fn, &h, ctx )) != kOkMfRC )
1448
+  if((rc = cmMidiFileOpen(ctx, &h, fn )) != kOkMfRC )
1449 1449
   {
1450 1450
     cmErrMsg(&ctx->err,rc,"MIDI file open failed on '%s'.",fn);
1451 1451
     goto errLabel;
@@ -1475,7 +1475,7 @@ void cmMidiFileTest( const char* fn, cmCtx_t* ctx )
1475 1475
   cmMfRC_t      rc;
1476 1476
   cmMidiFileH_t h = cmMidiFileNullHandle;
1477 1477
 
1478
-  if((rc = cmMidiFileOpen(fn,&h,ctx)) != kOkMfRC )
1478
+  if((rc = cmMidiFileOpen(ctx,&h,fn)) != kOkMfRC )
1479 1479
   {
1480 1480
     printf("Error:%i Unable to open the cmMidi file: %s\n",rc,fn);
1481 1481
     return;

+ 1
- 1
cmMidiFile.h 파일 보기

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

+ 1
- 1
cmMidiFilePlay.c 파일 보기

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

+ 1
- 1
dsp/cmDspKr.c 파일 보기

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

Loading…
취소
저장