createStreamInfo static method
Future<LSLStreamInfoWithMetadata>
createStreamInfo({
- String streamName = "DartLSLStream",
- LSLContentType streamType = LSLContentType.eeg,
- int channelCount = 1,
- double sampleRate = 150.0,
- LSLChannelFormat channelFormat = LSLChannelFormat.float32,
- String sourceId = "DartLSL",
Creates a new LSLStreamInfo object.
streamName
is the name of the stream.
streamType
is the LSLContentType of the stream (e.g. EEG, mocap, ...).
channelCount
is the number of channels in the stream.
streamType
is the stream's LSLChannelFormat (e.g. string, int8).
sourceId
is the source ID of the stream which should be unique.
Implementation
static Future<LSLStreamInfoWithMetadata> createStreamInfo({
String streamName = "DartLSLStream",
LSLContentType streamType = LSLContentType.eeg,
int channelCount = 1,
double sampleRate = 150.0,
LSLChannelFormat channelFormat = LSLChannelFormat.float32,
String sourceId = "DartLSL",
}) async {
final streamInfo = LSLStreamInfoWithMetadata(
streamName: streamName,
streamType: streamType,
channelCount: channelCount,
sampleRate: sampleRate,
channelFormat: channelFormat,
sourceId: sourceId,
streamInfo: null, // Will be created in create() method
);
streamInfo.create();
return streamInfo;
}