public static void ChangeStandardSoundDevice(CoreAudioDevice device)
        {
            CoreAudioController Controller = new CoreAudioController();

            //Controller.SetDefaultDevice(device);
            //Controller.SetDefaultCommunicationsDevice(device);
            //Controller.DefaultPlaybackDevice.SetAsDefault();
            device.SetAsDefault();
            device.SetAsDefaultCommunications();
        }
Пример #2
0
        public bool SetAudioDefaultComms(Guid guid)
        {
            CoreAudioDevice device = GetDeviceByGuid(guid, null);

            if (device == null)
            {
                return(false);
            }

            return(device.SetAsDefaultCommunications());
        }
Пример #3
0
        bool SetDefaultDeviceByObject(CoreAudioDevice coreAudioDevice)
        {
            bool isDefDeviceSet = coreAudioDevice.SetAsDefault();

            if (isDefDeviceSet)
            {
                coreAudioDevice.SetAsDefaultCommunications();
            }
            if (isDefDeviceSet)
            {
                SetToolTip(coreAudioDevice.InterfaceName);
                return(true);
            }
            return(false);
        }