Copyright (C) Kevin Larke 2009-2020

This file is part of libcm.

libcm is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

libcm is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

See the GNU General Public License distributed with the libcm package or look here: .


cmDspCtx : Dataflow global context interface.

typedef cmHandle_t cmDspSysH_t;
typedef cmHandle_t cmDspStoreH_t;


struct cmAudioSysCtx_str;
struct cmDspGlobalVar_str;

// DSP system context passed to many DSP instance functions
typedef struct
{
  cmDspSysH_t               dspH;
  cmRpt_t*                  rpt;
  cmCtx_t*                  cmCtx;      // global pgm context
  struct cmCtx_str*         cmProcCtx;  // context used by cmProc objects
  struct cmAudioSysCtx_str* ctx;        // audio sub-system context this DSP program is executing within 
  cmLHeapH_t                lhH;
  cmJsonH_t                 jsH;
  cmSymTblH_t               stH;
  cmDspStoreH_t             dsH;
  cmJsonH_t                 rsrcJsH;
  unsigned                  cycleCnt;   // count of DSP execution cycles (multiply by cmDspSamplesPerCycle() to get time since start of DSP system in samples)
  
  
  unsigned _disableSymId;
  unsigned _enableSymId;
  
  unsigned execDurUsecs;
} cmDspCtx_t;