diff --git a/cmAudioSys.c b/cmAudioSys.c index 8b1d1ce..28c3761 100644 --- a/cmAudioSys.c +++ b/cmAudioSys.c @@ -6,6 +6,7 @@ #include "cmCtx.h" #include "cmMem.h" #include "cmMallocDebug.h" +#include "cmTime.h" #include "cmAudioPort.h" #include "cmAudioNrtDev.h" #include "cmAudioPortFile.h" @@ -276,7 +277,8 @@ void _cmAsDspExecCallback( _cmAsCfg_t* cp ) // 1) Buffers associated with disabled input/output channels will be set to NULL in iChArray[]/oChArray[]. // 2) Buffers associated with channels marked for pass-through will be set to NULL in oChArray[]. // 3) All samples returned in oChArray[] buffers will be set to zero. - cmApBufGetIO(cp->ss.args.inDevIdx, cp->ctx.iChArray, cp->ctx.iChCnt, cp->ss.args.outDevIdx, cp->ctx.oChArray, cp->ctx.oChCnt ); + cmApBufGetIO(cp->ss.args.inDevIdx, cp->ctx.iChArray, cp->ctx.iChCnt, &cp->ctx.iTimeStamp, + cp->ss.args.outDevIdx, cp->ctx.oChArray, cp->ctx.oChCnt, &cp->ctx.oTimeStamp ); // call the application provided DSP process cp->ctx.audioRateFl = true; @@ -554,6 +556,9 @@ cmAsRC_t _cmAudioSysEnable( cmAs_t* p, bool enableFl ) { _cmAsCfg_t* cp = p->ssArray + i; + cmApBufOnPortEnable(cp->ss.args.inDevIdx,enableFl); + cmApBufOnPortEnable(cp->ss.args.outDevIdx,enableFl); + if( enableFl ) { diff --git a/cmAudioSys.h b/cmAudioSys.h index 799e02f..f125e00 100644 --- a/cmAudioSys.h +++ b/cmAudioSys.h @@ -179,10 +179,12 @@ extern "C" { // output (playback) buffers cmSample_t** oChArray; // each ele is a ptr to buffer with cfg.dspFramesPerCycle samples unsigned oChCnt; // count of output channels (ele's in oChArray[]) + cmTimeSpec_t oTimeStamp; // input (recording) buffers cmSample_t** iChArray; // each ele is a ptr to buffer with cfg.dspFramesPerCycle samples unsigned iChCnt; // count of input channels (ele's in iChArray[]) + cmTimeSpec_t iTimeStamp; } cmAudioSysCtx_t;