node-labstreaminglayer
Version:
Node.js bindings for Lab Streaming Layer (LSL)
44 lines • 1.67 kB
TypeScript
import { StreamInfo } from './streamInfo.js';
/**
* A stream inlet receives streaming data from the network.
* Inlets are used to receive data from a specific stream.
*/
export declare class StreamInlet {
private obj;
private channelFormat;
private channelCount;
private doPullSample;
private doPullChunk;
private sampleBuffer;
private chunkBuffers;
constructor(info: StreamInfo, maxBuflen?: number, maxChunklen?: number, recover?: boolean, processingFlags?: number);
private _createSampleBuffer;
/**
* Destroy the inlet and free resources.
* Called automatically when the object is garbage collected.
*/
destroy(): void;
info(timeout?: number): StreamInfo;
openStream(timeout?: number): void;
closeStream(): void;
timeCorrection(timeout?: number): number;
/**
* Pull a single sample from the inlet.
* @param timeout Timeout in seconds (default: FOREVER)
* @param sample Optional array to fill with sample data
* @returns Tuple of [sample, timestamp] or [null, null] if no sample available
*/
pullSample(timeout?: number, sample?: any): [any[], number] | [null, null];
/**
* Pull a chunk of samples from the inlet.
* @param timeout Timeout in seconds (default: 0)
* @param maxSamples Maximum number of samples to pull
* @param destObj Optional destination buffer
* @returns Tuple of [samples, timestamps]
*/
pullChunk(timeout?: number, maxSamples?: number, destObj?: any): [any[][] | null, number[]];
samplesAvailable(): number;
flush(): number;
wasClockReset(): boolean;
}
//# sourceMappingURL=inlet.d.ts.map