public DeviceOutputModes GetOutputModeForDevice(DeviceWrapper device_wrapper) { SetActiveDevice(device_wrapper); uint output_mode_value = _outputModeFeature.GetValue <uint>("MultiplexOutputParameterId"); return((DeviceOutputModes)output_mode_value); }
public void SwitchDirectMode(DeviceWrapper device_wrapper, DirectModeStates requested_direct_mode_enum) { SetActiveDevice(device_wrapper); uint requested_direct_mode = (uint)requested_direct_mode_enum; uint direct_mode_value = _stereoDirectFeature.GetValue <uint>("StereoDirectParameterId"); if (direct_mode_value != requested_direct_mode) { _stereoDirectFeature.SetValue <uint>(requested_direct_mode, "StereoDirectParameterId"); } }
public void SwitchToOutputMode(DeviceWrapper device_wrapper, DeviceOutputModes requested_output_mode_enum) { SetActiveDevice(device_wrapper); uint requested_output_mode = (uint)requested_output_mode_enum; uint output_mode_value = _outputModeFeature.GetValue <uint>("MultiplexOutputParameterId"); if (output_mode_value != requested_output_mode) { _outputModeFeature.SetValue <uint>(requested_output_mode, "MultiplexOutputParameterId"); } }
public void SetActiveDevice(DeviceWrapper device_wrapper) { if (_activeDevice == null || _activeDevice.NativeDevice != device_wrapper.NativeDevice) { _activeDevice = device_wrapper; _outputModeFeature = _deviceEndpointSelectionService.GetAggregatedFeature(device_wrapper.NativeDevice, "MultiplexOutputFeatureId"); _stereoDirectFeature = _deviceEndpointSelectionService.GetAggregatedFeature(device_wrapper.NativeDevice, "StereoDirectFeatureId"); Type value_changed_delegate_type = _sbDevicesDLL.GetType("Creative.Platform.Devices.Selections.EffectParameterValueChangedDelegate"); dynamic value_changed_delegate = Delegate.CreateDelegate(value_changed_delegate_type, this, "OnOutputModeChanged"); // EffectParameterValueChangedHanlder is the "correct" spelling.... Thanks Creative _outputModeFeature.EffectParameterValueChangedHanlder += value_changed_delegate; } }