streamPushChunk method

LSLPushChunk<NativeType> streamPushChunk(
  1. LSLStreamInfo streamInfo
)

Gets the LSLPushChunk for the given LSLStreamInfo. Throws: LSLException for the undefined format.

Implementation

LSLPushChunk streamPushChunk(LSLStreamInfo streamInfo) {
  final LSLChannelFormat channelFormat = streamInfo.channelFormat;
  final pushChunk = _pushChunkMap[channelFormat];
  if (pushChunk == null) {
    throw LSLException(
      'pushChunk is not supported for $channelFormat streams; '
      'use pushSample instead',
    );
  }
  return pushChunk;
}