public uhsclErrorCode_t ThrowOnError(uhsclErrorCode_t errorCode) { if (errorCode == uhsclErrorCode_t.NoError) { return(errorCode); } else { var originalStackTraceMsg = "\n" + GetOriginalStackTrace(); switch (errorCode) { case uhsclErrorCode_t.UninitialisedSensationCore: throw new Exception("SensationCore not initialised" + originalStackTraceMsg); case uhsclErrorCode_t.InvalidHandle: throw new ArgumentException("Invalid handle" + originalStackTraceMsg); case uhsclErrorCode_t.InvalidArgument: throw new ArgumentException("Invalid argument" + originalStackTraceMsg); case uhsclErrorCode_t.InvalidOperation: throw new InvalidOperationException("Invalid operation" + originalStackTraceMsg); case uhsclErrorCode_t.HardwareError: throw new IOException("Hardware Error" + originalStackTraceMsg); default: throw new Exception("Unknown error: " + (int)errorCode + originalStackTraceMsg); } } }
public uhsclErrorCode_t uhsclSetEvaluationHistorySizeOnCurrentPlaybackDevice( IntPtr sensationCoreInstancePtr, UInt32 size ) { uhsclErrorCode_t error = Native.uhsclSetEvaluationHistorySizeOnCurrentPlaybackDevice(sensationCoreInstancePtr, size); return(error); }
public uhsclErrorCode_t uhsclEmitterFirmwareVersionStringLength( IntPtr sensationCoreInstancePtr, out size_t length ) { size_t len = 0; uhsclErrorCode_t error = Native.uhsclEmitterFirmwareVersionStringLength(sensationCoreInstancePtr, ref len); length = len; return(error); }
public uhsclErrorCode_t uhsclGetConnectedDevicesStringLength( IntPtr sensationCoreInstancePtr, out size_t count ) { size_t returnedCount = 0; uhsclErrorCode_t error = Native.uhsclGetConnectedDevicesStringLength(sensationCoreInstancePtr, ref returnedCount); count = returnedCount; return(error); }
public uhsclErrorCode_t uhsclGetCurrentlyPlayingInstance( IntPtr sensationCoreInstancePtr, out uhsclHandle currentlyPlayingInstance ) { NativeUhsclHandle_t currentlyPlayingInstanceReturned = 0; uhsclErrorCode_t error = Native.uhsclGetCurrentlyPlayingInstance(sensationCoreInstancePtr, ref currentlyPlayingInstanceReturned); currentlyPlayingInstance = new uhsclHandle(currentlyPlayingInstanceReturned); return(error); }
public uhsclErrorCode_t uhsclIsCurrentlyPlaying( IntPtr sensationCoreInstancePtr, out bool isPlaying ) { Int32 isPlayingReturned = 0; uhsclErrorCode_t error = Native.uhsclIsCurrentlyPlaying(sensationCoreInstancePtr, ref isPlayingReturned); isPlaying = Convert.ToBoolean(isPlayingReturned); return(error); }
public uhsclErrorCode_t uhsclGetBlockCount( IntPtr sensationCoreInstancePtr, out size_t blockCount ) { size_t count = 0; uhsclErrorCode_t error = Native.uhsclGetBlockCount(sensationCoreInstancePtr, ref count); blockCount = count; return(error); }
public uhsclErrorCode_t uhsclOutputCount( IntPtr sensationCoreInstancePtr, uhsclHandle handle, out size_t count ) { size_t returnedCount = 0; uhsclErrorCode_t error = Native.uhsclOutputCount(sensationCoreInstancePtr, handle.Value, ref returnedCount); count = returnedCount; return(error); }
public uhsclErrorCode_t uhsclCreateInputSource( IntPtr sensationCoreInstancePtr, uhsclHandle blockHandle, out uhsclHandle inputSourceHandle ) { NativeUhsclHandle_t returnedInputSourceHandle = 0; uhsclErrorCode_t error = Native.uhsclCreateInputSource(sensationCoreInstancePtr, blockHandle.Value, ref returnedInputSourceHandle); inputSourceHandle = new uhsclHandle(returnedInputSourceHandle); return(error); }
public uhsclErrorCode_t uhsclCreateBlock( IntPtr sensationCoreInstancePtr, string identifier, out uhsclHandle handle ) { NativeUhsclHandle_t returnedHandle = 0; uhsclErrorCode_t error = Native.uhsclCreateBlock(sensationCoreInstancePtr, identifier, ref returnedHandle); handle = new uhsclHandle(returnedHandle); return(error); }
public uhsclErrorCode_t uhsclGetEvaluationHistoryOnCurrentPlaybackDevice( IntPtr sensationCoreInstancePtr, [In, Out] uhsclVector4_t[] evaluationHistory, out UInt32 size ) { uint returnedSize = 0; uhsclErrorCode_t error = Native.uhsclGetEvaluationHistoryOnCurrentPlaybackDevice(sensationCoreInstancePtr, evaluationHistory, ref returnedSize); size = returnedSize; return(error); }
public uhsclErrorCode_t uhsclGetBlockHandleAtIndex( IntPtr sensationCoreInstancePtr, size_t index, out uhsclHandle handle ) { NativeUhsclHandle_t returnedHandle = 0; uhsclErrorCode_t error = Native.uhsclGetBlockHandleAtIndex(sensationCoreInstancePtr, index, ref returnedHandle); handle = new uhsclHandle(returnedHandle); return(error); }
public uhsclErrorCode_t uhsclGetInputAsUhsclVector3ByIndex( IntPtr sensationCoreInstancePtr, uhsclHandle handle, Int32 idx, out uhsclVector3_t value ) { var returnedValue = new uhsclVector3_t(); uhsclErrorCode_t error = Native.uhsclGetInputAsUhsclVector3ByIndex(sensationCoreInstancePtr, handle.Value, idx, ref returnedValue); value = returnedValue; return(error); }
public uhsclErrorCode_t uhsclStart( IntPtr sensationCoreInstancePtr, uhsclHandle outputHandle, uhsclHandle inputSourceHandle, out uhsclHandle playbackInstanceHandle ) { NativeUhsclHandle_t returnedPlaybackInstanceHandle = 0; uhsclErrorCode_t error = Native.uhsclStart(sensationCoreInstancePtr, outputHandle.Value, inputSourceHandle.Value, ref returnedPlaybackInstanceHandle); playbackInstanceHandle = new uhsclHandle(returnedPlaybackInstanceHandle); return(error); }
public uhsclErrorCode_t uhsclGetMetaDataStringLength( IntPtr sensationCoreInstancePtr, uhsclHandle handle, string identifier, out size_t count ) { size_t returnedCount = 0; uhsclErrorCode_t error = Native.uhsclGetMetaDataStringLength(sensationCoreInstancePtr, handle.Value, identifier, ref returnedCount); count = returnedCount; return(error); }
public uhsclErrorCode_t uhsclGetMetaDataBool( IntPtr sensationCoreInstancePtr, uhsclHandle handle, string identifier, out bool metadataValue ) { Int32 returnedMetadataValue = 0; uhsclErrorCode_t error = Native.uhsclGetMetaDataBool(sensationCoreInstancePtr, handle.Value, identifier, ref returnedMetadataValue); metadataValue = Convert.ToBoolean(returnedMetadataValue); return(error); }
public uhsclErrorCode_t uhsclGetInputByName( IntPtr sensationCoreInstancePtr, uhsclHandle blockDefinitionHandle, string inputName, out uhsclHandle blockInputHandle ) { NativeUhsclHandle_t returnedInputHandle = 0; uhsclErrorCode_t error = Native.uhsclGetInputByName(sensationCoreInstancePtr, blockDefinitionHandle.Value, inputName, ref returnedInputHandle); blockInputHandle = new uhsclHandle(returnedInputHandle); return(error); }
public uhsclErrorCode_t uhsclGetOutputAtIndex( IntPtr sensationCoreInstancePtr, uhsclHandle handle, Int32 idx, out uhsclHandle outputHandle ) { NativeUhsclHandle_t returnedOutputHandle = 0; uhsclErrorCode_t error = Native.uhsclGetOutputAtIndex(sensationCoreInstancePtr, handle.Value, idx, ref returnedOutputHandle); outputHandle = new uhsclHandle(returnedOutputHandle); return(error); }