getPhaseInversion method

({bool left, bool right}) getPhaseInversion()

Implementation

({bool left, bool right}) getPhaseInversion() {
  if (_engine == ffi.nullptr || _getPhaseInversion == null) return (left: false, right: false);
  final pL = _malloc(ffi.sizeOf<ffi.Int32>()).cast<ffi.Int32>();
  final pR = _malloc(ffi.sizeOf<ffi.Int32>()).cast<ffi.Int32>();
  try {
    _getPhaseInversion(_engine, pL, pR);
    return (left: pL.value != 0, right: pR.value != 0);
  } finally {
    _freePtr(pL.cast<ffi.Void>());
    _freePtr(pR.cast<ffi.Void>());
  }
}