cmMidiFilePlay.c : _cmMfpCb() now generates a zeroed timestamp.

This commit is contained in:
kevin 2013-12-15 18:19:27 -05:00
parent 2aa2938957
commit 45361cd535

View File

@ -7,6 +7,7 @@
#include "cmMem.h" #include "cmMem.h"
#include "cmMallocDebug.h" #include "cmMallocDebug.h"
#include "cmFile.h" #include "cmFile.h"
#include "cmTime.h"
#include "cmMidi.h" #include "cmMidi.h"
#include "cmMidiPort.h" #include "cmMidiPort.h"
#include "cmMidiFile.h" #include "cmMidiFile.h"
@ -410,7 +411,8 @@ void _cmMfpCb( void* userCbPtr, unsigned dmicros, const cmMidiTrackMsg_t* msgPtr
cmMidiMsg msg; cmMidiMsg msg;
_cmMfpTest2CbData_t* d = (_cmMfpTest2CbData_t*)userCbPtr; _cmMfpTest2CbData_t* d = (_cmMfpTest2CbData_t*)userCbPtr;
msg.deltaUs = dmicros; msg.timeStamp.tv_sec = 0;
msg.timeStamp.tv_nsec = 0;
msg.status = msgPtr->status + msgPtr->u.chMsgPtr->ch; msg.status = msgPtr->status + msgPtr->u.chMsgPtr->ch;
msg.d0 = msgPtr->u.chMsgPtr->d0; msg.d0 = msgPtr->u.chMsgPtr->d0;
msg.d1 = msgPtr->u.chMsgPtr->d1; msg.d1 = msgPtr->u.chMsgPtr->d1;
@ -535,10 +537,8 @@ cmRC_t cmMfpTest2( const char* midiFn, const char* audioFn, cmCtx_t* ctx )
cmErrMsg(&err,kProcObjFailMfptRC,"Audio file write failed."); cmErrMsg(&err,kProcObjFailMfptRC,"Audio file write failed.");
goto errLabel; goto errLabel;
} }
} }
errLabel: errLabel:
if( cmMidiSynthFree(&msp) != cmOkRC ) if( cmMidiSynthFree(&msp) != cmOkRC )
cmErrMsg(&err,kProcObjFailMfptRC,"MIDI synth. free failed."); cmErrMsg(&err,kProcObjFailMfptRC,"MIDI synth. free failed.");