fix for ADC analog
the "wait until I2S buffer fills" trick does not work for ADC sources, as the I2S sampling does not run in background for ADC.
This commit is contained in:
parent
7d5ce994ab
commit
1ae0dd574d
@ -411,8 +411,11 @@ void FFTcode(void * parameter)
|
|||||||
// run peak detection
|
// run peak detection
|
||||||
autoResetPeak();
|
autoResetPeak();
|
||||||
detectSamplePeak();
|
detectSamplePeak();
|
||||||
|
|
||||||
vTaskDelayUntil( &xLastWakeTime, xFrequency); // release CPU, and let I2S fill its buffers
|
#if !defined(I2S_GRAB_ADC1_COMPLETELY)
|
||||||
|
if ((audioSource == nullptr) || (audioSource->getType() != AudioSource::Type_I2SAdc)) // the "delay trick" does not help for analog ADC
|
||||||
|
#endif
|
||||||
|
vTaskDelayUntil( &xLastWakeTime, xFrequency); // release CPU, and let I2S fill its buffers
|
||||||
|
|
||||||
} // for(;;)ever
|
} // for(;;)ever
|
||||||
} // FFTcode() task end
|
} // FFTcode() task end
|
||||||
|
Loading…
Reference in New Issue
Block a user