Skip to content

C++ examples with persistent inlet or outlet? #34

@GoogleCodeExporter

Description

@GoogleCodeExporter
I'm trying to do something that requires greater knowledge of C++ than I 
currently have.

I am trying to create an Unreal Engine 4 plugin. The engine handles its own 
threading and when to call the Tick functions of each object in the scene. I am 
building a SceneComponent object and I want to use its TickComponent function 
to call inlet.pull_sample. But I don't want to recreate the inlet on every tick 
(75 Hz).

So I thought I'd have the inlet as a member variable in my component class. 
This requires the inlet to be created explicitly upon component instantiation 
because lsl::stream_inlet has no default constructor. I tried constructing it 
with my_inlet(lsl::stream_info("NotAName", "NotAType", 0)), and, though it 
compiles, attempting to add my component to the scene causes a bunch of errors.

So how do I make a placeholder inlet on instantiation? Or is there a better 
solution?

I will try to use the C API instead, but I would really prefer to use the C++ 
API.

Original issue reported on code.google.com by chadwick...@gmail.com on 11 Mar 2015 at 2:26

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions