The is the C# interface to the lab streaming layer. To use it, you need to include the file LSL.cs in your project, and make sure that the appropriate lsl library (e.g. lsl.dll) is findable (e.g., in your application's root directory or in a system path). If LSL.cs fails to find the lsl shared library for your target platform, edit LSL.cs and update the libname line with the library name for your target platform. As of liblsl 1.14, this should be the same for all targets: const string libname = "lsl";
liblsl
target and choose Add > Existing Item ...
.Add
dropdown button to Add as Link
and change the file types/extensions to all files (*.*)
. Browse to where you have lsl.dll (previously downloaded from here) and select it.From now on, whenever a target in the solution is built, lsl.dll will be copied into the build directory.
The examples folder contains example C# code for sending and receiving data streams. The examples are described in details in the online documentation.
These example applications can be debugged from within the IDE (i.e. Visual Studio). However, the built products are DLL files, not EXE files. The DLL files can be run at console with dotnet my_application
(from within same folder as my_application.DLL). This will work anywhere the .NET Core Runtime works. To make a self-contained but platform-dependent product, use dotnet publish -C Debug -r win10-x64
(or Release
instead of Debug
) and this will generate an EXE file.
Please see the separate README-Unity.