cmDspKr.c : Post test updates to cmDspSyncRecd().

This commit is contained in:
kevin 2013-12-17 08:55:44 -05:00
parent e11e660e52
commit c4a0bceaec

View File

@ -3050,6 +3050,8 @@ cmDspRC_t _cmDspSyncRecdExec(cmDspCtx_t* ctx, cmDspInst_t* inst, const cmDspEvt_
if( cmSyncRecdAudioWrite( p->srH, &ctx->ctx->iTimeStamp, p->smpIdx, x, p->chCnt, n ) != kOkSrRC ) if( cmSyncRecdAudioWrite( p->srH, &ctx->ctx->iTimeStamp, p->smpIdx, x, p->chCnt, n ) != kOkSrRC )
return cmDspInstErr(ctx,&p->inst,kSubSysFailDspRC,"Sync-recd audio update failed."); return cmDspInstErr(ctx,&p->inst,kSubSysFailDspRC,"Sync-recd audio update failed.");
p->smpIdx += n;
return rc; return rc;
} }
@ -3063,7 +3065,7 @@ cmDspRC_t _cmDspSyncRecdRecv(cmDspCtx_t* ctx, cmDspInst_t* inst, const cmDspEvt_
switch( evt->dstVarId ) switch( evt->dstVarId )
{ {
case kStatusSrId: case kStatusSrId:
if(cmMidiIsChStatus( evt->dstVarId ) ) if(cmMidiIsChStatus( cmDspUInt(inst,kStatusSrId) ) )
{ {
cmTimeSpec_t ts; cmTimeSpec_t ts;
ts.tv_sec = cmDspUInt(inst,kSecSrId); ts.tv_sec = cmDspUInt(inst,kSecSrId);
@ -3083,8 +3085,12 @@ cmDspRC_t _cmDspSyncRecdRecv(cmDspCtx_t* ctx, cmDspInst_t* inst, const cmDspEvt_
if( cmdId == p->openSymId ) if( cmdId == p->openSymId )
rc = _cmDspSyncRecdCreateFile(ctx,inst); rc = _cmDspSyncRecdCreateFile(ctx,inst);
else else
if( cmdId == p->closeSymId ) if( cmdId == p->closeSymId && cmSyncRecdIsValid(p->srH))
{
cmSyncRecdFinal(&p->srH); cmSyncRecdFinal(&p->srH);
//cmSyncRecdTest(ctx->cmCtx);
}
} }
break; break;