private void AutoSelectNew(C_MMDevice tmpDevice) { ActualSession = null; ActualDevice = tmpDevice; _SelectedSession = AutoSessionMarker; _SelectedDevice = ActualDevice.ID; ChangeVolumeDisplay(0); UC_AI_Left.Value = 0; UC_AI_Right.Value = 0; }
private static string GetDeviceName(C_MMDevice Device) { if (Device != null) { for (var _x_ = 0; _x_ < Device.Properties.Count; _x_++) { if (Device.Properties[_x_].Key == C_PKEY.PKEY_Device_DeviceDesc) { return(Device.Properties[_x_].Value.ToString()); } } } return(string.Empty); }
private static C_AudioSessionControl2 Search4SessionID(C_MMDevice Device, string SessionIdentifier) { using (var _Manager_ = Device.AudioSessionManager2) { using (var _Sessions_ = _Manager_.Sessions) { for (var _j_ = 0; _j_ < _Sessions_.Count; _j_++) { if (SessionIdentifier == _Sessions_[_j_].GetSessionIdentifier) { return(_Sessions_[_j_]); } _Sessions_[_j_].Dispose(); } } } return(null); }