labstreaminglayer / pylsl

Python bindings (pylsl) for liblsl
MIT License
142 stars 58 forks source link

Fix pull_chunk size overflow error #61

Closed florin-pop closed 1 year ago

florin-pop commented 1 year ago

An overflow might happen when the value of max_samples is too big causing liblsl to raise an exception when checking if it is a multiple of n_channels.

In our case max_samples was 2280000000 which was passed as a negative value to the lib.

This PR fixes the problem by casting it to the correct type: size_t.