Преглед изворни кода

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
   
2424
   
2425
   cmErrSetup(&err,&ctx->rpt,"MIDI to Score");
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
     return cmErrMsg(&err,kMidiFileFailScRC,"Unable to open the MIDI file '%s'.",midiFn);
2428
     return cmErrMsg(&err,kMidiFileFailScRC,"Unable to open the MIDI file '%s'.",midiFn);
2429
 
2429
 
2430
   if( cmCsvInitialize(&csvH,ctx) != kOkCsvRC )
2430
   if( cmCsvInitialize(&csvH,ctx) != kOkCsvRC )
2658
   if( cmCsvParseFile(csvH, crfn, 0 ) != kOkCsvRC )
2658
   if( cmCsvParseFile(csvH, crfn, 0 ) != kOkCsvRC )
2659
     goto errLabel;
2659
     goto errLabel;
2660
 
2660
 
2661
-  if( cmMidiFileOpen(mfn,&mfH,ctx) != kOkMfRC )
2661
+  if( cmMidiFileOpen(ctx,&mfH,mfn) != kOkMfRC )
2662
     goto errLabel;
2662
     goto errLabel;
2663
 
2663
 
2664
   mn = cmMidiFileMsgCount(mfH);
2664
   mn = cmMidiFileMsgCount(mfH);

+ 1
- 1
app/cmTakeSeqBldr.c Прегледај датотеку

949
   }
949
   }
950
 
950
 
951
   // open the MIDI file
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
     rc = cmErrMsg(&p->err,kInvalidArgTsbRC,"The MIDI file '%s' could not be opened.", cmStringNullGuard(cmMidiFileName(mf->h)));
954
     rc = cmErrMsg(&p->err,kInvalidArgTsbRC,"The MIDI file '%s' could not be opened.", cmStringNullGuard(cmMidiFileName(mf->h)));
955
     goto errLabel;
955
     goto errLabel;

+ 1
- 1
app/cmTimeLine.c Прегледај датотеку

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

+ 3
- 3
cmMidiFile.c Прегледај датотеку

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
   cmMfRC_t       rc     = kOkMfRC;
450
   cmMfRC_t       rc     = kOkMfRC;
451
   _cmMidiFile_t* mfp    = NULL;
451
   _cmMidiFile_t* mfp    = NULL;
1445
   cmMidiFileH_t h = cmMidiFileNullHandle;
1445
   cmMidiFileH_t h = cmMidiFileNullHandle;
1446
   cmMfRC_t rc;
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
     cmErrMsg(&ctx->err,rc,"MIDI file open failed on '%s'.",fn);
1450
     cmErrMsg(&ctx->err,rc,"MIDI file open failed on '%s'.",fn);
1451
     goto errLabel;
1451
     goto errLabel;
1475
   cmMfRC_t      rc;
1475
   cmMfRC_t      rc;
1476
   cmMidiFileH_t h = cmMidiFileNullHandle;
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
     printf("Error:%i Unable to open the cmMidi file: %s\n",rc,fn);
1480
     printf("Error:%i Unable to open the cmMidi file: %s\n",rc,fn);
1481
     return;
1481
     return;

+ 1
- 1
cmMidiFile.h Прегледај датотеку

106
 
106
 
107
   extern cmMidiFileH_t cmMidiFileNullHandle;
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
   cmMfRC_t              cmMidiFileClose( cmMidiFileH_t* hp );
110
   cmMfRC_t              cmMidiFileClose( cmMidiFileH_t* hp );
111
 
111
 
112
   cmMfRC_t              cmMidiFileWrite( cmMidiFileH_t h, const char* fn );
112
   cmMfRC_t              cmMidiFileWrite( cmMidiFileH_t h, const char* fn );

+ 1
- 1
cmMidiFilePlay.c Прегледај датотеку

107
   cmMfp_t*      p    = _cmMfpHandleToPtr(h);
107
   cmMfp_t*      p    = _cmMfpHandleToPtr(h);
108
   cmMidiFileH_t mfH  = cmMidiFileNullHandle;
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
     return _cmMfpError(p,kFileOpenFailMfpRC);
111
     return _cmMfpError(p,kFileOpenFailMfpRC);
112
 
112
 
113
   if((rc= cmMfpLoadHandle( h, mfH )) == kOkMfpRC )
113
   if((rc= cmMfpLoadHandle( h, mfH )) == kOkMfpRC )

+ 1
- 1
dsp/cmDspKr.c Прегледај датотеку

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

Loading…
Откажи
Сачувај