pullSampleIntoSync method

LSLSamplePointer<T> pullSampleIntoSync(
  1. Pointer<T> buffer,
  2. lsl_inlet inlet,
  3. int channels,
  4. double timeout,
  5. Pointer<Int32> ec,
)

Implementation

LSLSamplePointer<T> pullSampleIntoSync(
  Pointer<T> buffer,
  lsl_inlet inlet,
  int channels,
  double timeout,
  Pointer<Int32> ec,
) {
  final double timestamp = _pullFn(inlet, buffer, channels, timeout, ec);
  final int errorCode = ec.value;
  if (LSLObj.error(errorCode)) {
    return LSLSamplePointer<T>(timestamp, errorCode, 0);
  }
  return LSLSamplePointer<T>(timestamp, errorCode, buffer.address);
}