Open
Description
This could be a misunderstanding on my part in terms of the intention of the code, but in the LslStreamOutlet
example, I think there should be an await in front of the instance variable generation like this:
import { LslStreamOutlet } from '@neurodevs/node-lsl'
// await added here makes the example code work
const instance = await LslStreamOutlet.Create({
name: 'Muse S (2nd gen)',
type: 'EEG',
channelNames: ['TP9', 'AF7', 'AF8', 'TP10', 'AUX'],
sampleRate: 256,
channelFormat: 'float32',
sourceId: 'muse-s-eeg',
manufacturer: 'Interaxon Inc.',
unit: 'microvolt',
chunkSize: 12,
maxBuffered: 360,
})
// Must be in async function
await instance.pushSample(...)
I kept getting the error pushSample
is not a function, but then I realized that the instance variable had never been fully initialized. It's minor and very possibly just my own issue, but it may save someone a bit of time in the future. All in all, thank you so much for making a JS LSL package. It's massively helpful!
Metadata
Metadata
Assignees
Labels
No labels
Activity