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

Outlet creation is hardcoded to throw when not using default chunk_size, max_buffered #6

Open
pmaanen opened this issue Aug 22, 2023 · 0 comments · May be fixed by #7
Open

Outlet creation is hardcoded to throw when not using default chunk_size, max_buffered #6

pmaanen opened this issue Aug 22, 2023 · 0 comments · May be fixed by #7

Comments

@pmaanen
Copy link

pmaanen commented Aug 22, 2023

I am trying to write an Android application that sends out data via liblsl-Java. I noticed that construction of the stream outlet always fails if I pass the chunk_size and max_buffered.

In LSL.java:330ff the exception is hard coded to always be thrown in the first two constructors:

public StreamOutlet(StreamInfo info, int chunk_size, int max_buffered) throws IOException { obj = inst.lsl_create_outlet(info.handle(), chunk_size, max_buffered); throw new IOException("Unable to open LSL outlet.");}
public StreamOutlet(StreamInfo info, int chunk_size) throws IOException { obj = inst.lsl_create_outlet(info.handle(), chunk_size, 360); throw new IOException("Unable to open LSL outlet.");}
public StreamOutlet(StreamInfo info) throws IOException { obj = inst.lsl_create_outlet(info.handle(), 0, 360); if(obj == null) throw new IOException("Unable to open LSL outlet."); }

It this a known limitation or is the if(obj)==null conditional just missing?

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

Successfully merging a pull request may close this issue.

1 participant