Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

int32 value type incorrect on Windows #84

Open
matthiasdold opened this issue Jul 17, 2024 · 0 comments
Open

int32 value type incorrect on Windows #84

matthiasdold opened this issue Jul 17, 2024 · 0 comments

Comments

@matthiasdold
Copy link

I encountered an incorrect value type when using int32 values on Window (tested with python 3.11 and 3.12, pip 24.0, pylsl 1.16.1). The minimum example below correctly prints <class 'ctypes.c_int'> both on Linux (current Arch) and MacOS (Darwin, M1).

But on Window 11 it prints <class 'ctypes.c_long'> which would be int64 data type. Also the data transfer fails if you pull the data into an numpy.int32 buffer.

Minimum example:

import pylsl

feature_info = pylsl.StreamInfo(
    name="test",
    type="EEG",
    channel_count=1,
    nominal_srate=1,
    channel_format=pylsl.cf_int32,
    source_id="testid",
)
outlet = pylsl.StreamOutlet(feature_info)

streams = pylsl.resolve_byprop("name", "test", timeout=1)
inlet = pylsl.StreamInlet(streams[0])

print(inlet.value_type)

I also checked the other data types from pylsl.string2fmt on all three OSs and all others works correctly.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant