createFromPointer method

Future<LSLOutlet> createFromPointer(
  1. lsl_outlet pointer
)

Creates an outlet from an existing lsl_outlet pointer. Parameters:

  • pointer: The existing lsl_outlet pointer. Returns: A LSLOutlet instance wrapping the existing pointer. Throws: LSLException if outlet creation fails or if useIsolates: true.

Implementation

Future<LSLOutlet> createFromPointer(lsl_outlet pointer) async {
  if (created) {
    throw LSLException('Outlet already created');
  }
  if (useIsolates) {
    throw LSLException('Cannot create from pointer in isolated mode');
  }
  _managed = false;
  _outlet = pointer;
  super.create();
  _setupPushBuffer();
  return this;
}