You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When I modify the arduinosound library for my own operation, I found a wired issue.
I read the AmplitudeAnalyzer::update(const void* buffer, size_t size) function play the key role for further operation with I2S reading data. And the easiest way is to modify the rms functions: arm_rms_q31((q31_t*)buffer, size / 4, (q31_t*)&analysis)
But when I simply change the above sentence to
q31_t* tmp = (q31_t*)buffer;
_analysis = *tmp;
There appears zero value buffer occasionally (sometimes correct, but sometimes only shows zeros through serial print. And it will turn to zero and then turn to correct values).
I am not sure what is the problem cause I didn't change other logic in ArudioSound. Is there other magic in the rms functions?
The text was updated successfully, but these errors were encountered:
tachen-cs
changed the title
in I2S reading
zero value buffer occasionally appears in I2S reading
Jul 16, 2020
Hi,
When I modify the arduinosound library for my own operation, I found a wired issue.
I read the AmplitudeAnalyzer::update(const void* buffer, size_t size) function play the key role for further operation with I2S reading data. And the easiest way is to modify the rms functions: arm_rms_q31((q31_t*)buffer, size / 4, (q31_t*)&analysis)
But when I simply change the above sentence to
q31_t* tmp = (q31_t*)buffer;
_analysis = *tmp;
There appears zero value buffer occasionally (sometimes correct, but sometimes only shows zeros through serial print. And it will turn to zero and then turn to correct values).
I am not sure what is the problem cause I didn't change other logic in ArudioSound. Is there other magic in the rms functions?
The text was updated successfully, but these errors were encountered: