diff --git a/src/modules/audio_processing/ns/main/source/ns_core.c b/src/modules/audio_processing/ns/main/source/ns_core.c index 20425e74d9..10a1b831f7 100644 --- a/src/modules/audio_processing/ns/main/source/ns_core.c +++ b/src/modules/audio_processing/ns/main/source/ns_core.c @@ -872,8 +872,6 @@ int WebRtcNs_ProcessCore(NSinst_t *inst, deltaGainHB = deltaBweHB; } // - inst->blockInd++; - // updateParsFlag = inst->modelUpdatePars[0]; // @@ -980,6 +978,8 @@ int WebRtcNs_ProcessCore(NSinst_t *inst, return 0; } + // + inst->blockInd++; // Update the block index only when we process a block. // FFT rdft(inst->anaLen, 1, winData, inst->ip, inst->wfft); diff --git a/src/modules/audio_processing/ns/main/source/nsx_core.c b/src/modules/audio_processing/ns/main/source/nsx_core.c index 6c62d64e64..01d3e54080 100644 --- a/src/modules/audio_processing/ns/main/source/nsx_core.c +++ b/src/modules/audio_processing/ns/main/source/nsx_core.c @@ -1897,10 +1897,6 @@ int WebRtcNsx_ProcessCore(NsxInst_t *inst, short *speechFrame, short *speechFram return -1; } - // Update block index - inst->blockIndex++; - // - // Store speechFrame and transform to frequency domain WebRtcNsx_DataAnalysis(inst, speechFrame, magnU16); @@ -1924,6 +1920,10 @@ int WebRtcNsx_ProcessCore(NsxInst_t *inst, short *speechFrame, short *speechFram return 0; } + // Update block index when we have something to process + inst->blockIndex++; + // + // Norm of magn qMagn = inst->normData - inst->stages;