Thanks to visit codestin.com
Credit goes to github.com

Skip to content

zero value buffer occasionally appears in I2S reading #26

Open
@tachen-cs

Description

@tachen-cs

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?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions