public static void ChangeStandardSoundDevice(CoreAudioDevice device) { CoreAudioController Controller = new CoreAudioController(); //Controller.SetDefaultDevice(device); //Controller.SetDefaultCommunicationsDevice(device); //Controller.DefaultPlaybackDevice.SetAsDefault(); device.SetAsDefault(); device.SetAsDefaultCommunications(); }
public bool SetAudioDefaultComms(Guid guid) { CoreAudioDevice device = GetDeviceByGuid(guid, null); if (device == null) { return(false); } return(device.SetAsDefaultCommunications()); }
bool SetDefaultDeviceByObject(CoreAudioDevice coreAudioDevice) { bool isDefDeviceSet = coreAudioDevice.SetAsDefault(); if (isDefDeviceSet) { coreAudioDevice.SetAsDefaultCommunications(); } if (isDefDeviceSet) { SetToolTip(coreAudioDevice.InterfaceName); return(true); } return(false); }