Browse Source

cmDspKr.c : Updated AmSync output format.

master
kpl 11 years ago
parent
commit
35afc5f004
1 changed files with 12 additions and 5 deletions
  1. 12
    5
      dsp/cmDspKr.c

+ 12
- 5
dsp/cmDspKr.c View File

@@ -2014,12 +2014,19 @@ cmDspRC_t _cmDspAmSyncRecv(cmDspCtx_t* ctx, cmDspInst_t* inst, const cmDspEvt_t*
2014 2014
   switch(evt->dstVarId)
2015 2015
   {
2016 2016
     case kSelAmId:    
2017
-      for(i=0; i<p->arrayCnt; ++i)
2018 2017
       {
2019
-        const cmDspAmSyncEntry_t* r = p->array + i;
2020
-        cmRptPrintf(ctx->rpt,"0x%x : %s %i %i - %s %i  %i : %i\n",
2021
-          r->state,r->afn,r->asmp,r->afi,r->mfn,r->mid,r->mfi,r->afi-r->mfi);
2022
-      }   
2018
+        double srate = cmDspSysSampleRate(ctx->dspH);
2019
+        int    fpc   = cmDspSamplesPerCycle(ctx);
2020
+
2021
+        for(i=0; i<p->arrayCnt; ++i)
2022
+        {
2023
+          const cmDspAmSyncEntry_t* r = p->array + i;
2024
+
2025
+          int dframes = r->mfi-r->afi; 
2026
+          cmRptPrintf(ctx->rpt,"0x%x : %s %i %i - %s %i  %i : frm:%i smp:%i sec:%f\n",
2027
+            r->state,r->afn,r->asmp,r->afi,r->mfn,r->mid,r->mfi,dframes,dframes*fpc,dframes*fpc/srate);
2028
+        }   
2029
+      }
2023 2030
       break;
2024 2031
 
2025 2032
     case kAFnAmId:

Loading…
Cancel
Save