Skip to content

Error in counting samples #1

@VladimirR46

Description

@VladimirR46

Hey, everybody!
I think I found a bug in the example code that causes incorrect reading of EEG values.
I have a NeoRec cap 21 device.

The error is in line 251
const size_t sampleCount = CHECK(itemCount(nb2GetData(id, data.data(), uint32_t(data.size() * sizeof(int32_t))), sampleSize));

Should be corrected to
const size_t sampleCount = CHECK(itemCount(nb2GetData(id, data.data(), uint32_t(data.size() * sizeof(int32_t))), sampleSize * sizeof(int32_t))));

Could you please check this line of code!

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