nutojr.blogg.se

How to set default audio device windows 10
How to set default audio device windows 10










how to set default audio device windows 10

Well, it's as simple as importing this library an making the same call: public void SetDefaultMic(string id)ĬoreAudioApi.Polic圜onfigClient client = new CoreAudioApi.Polic圜onfigClient() Ĭlient.SetDefaultEndpoint(id, ) Ĭlient.SetDefaultEndpoint(id, ) Īlso, by doing it this way you will not get a cast exception when combined with NAudio on a thread separated (Added this note as it happened to me).įinally I couldn't find any solution with NAudio. Using Polic圜onfigClient, set the given device as the default playback deviceĬlient.SetDefaultEndpoint(DeviceCollection.ID, ERole.eMultimedia) Using Polic圜onfigClient, set the given device as the default playback communication deviceĬlient.SetDefaultEndpoint(DeviceCollection.ID, ERole.eCommunications) Polic圜onfigClient client = new Polic圜onfigClient() Looking at the class AudioDeviceCmdlets you can find this piece of code at line 429 where DeviceCollection.ID is the ID of the new device: // Create a new audio Polic圜onfigClient I've looked at the source lib AudioDeviceCmdlets you mentioned and I've found another way of doing this. If you think you've found any, just create an issue on github, they'll make sure it gets to me.I'm adding this as a simpler way of changing the audio device. This application, while simple, can and probably has bugs. You can now switch the devices using a simple keystroke. In the option's dialog, click on the hotkey checkbox and register your hotkey. Starting with version 1.0.2 hotkey switching is supported. If you have a program that uses the audio, you will also notice where the sound will be heard. Notice how it cycles between the selected audio devices. Now you can either minimize the window or click the Hide button. Please check those that you want the program to switch between. In this window all the active audio interfaces in the system are displayed. Additionally, if you're running the program for the first time, it will display the settings window. If it's not working for you.tough luck.Įxtract the zip file in some directory. Since it is using an undocumented interface it may stop working at any point in time in the future, next patch, next service pack or next version. WARNING: It has only been tested on Windows 7, 8, 8.1 and Windows 10 with all the patches applied. To compile it, just grab the source code, open the solution (.sln) file, update the include path to where WTL include files are (e.g. This is a solution created with Visual Studio 2015 Community. Any subsequent launches, will just switch the default audio device as per your settings. Running it for the first time, just loads the application.

how to set default audio device windows 10

It is made for lazy people, so if you're not lazy, you can continue to use the control panel application (mmsys.cpl).

how to set default audio device windows 10

It is especially useful if you're like me and have a sound card with speakers attached and a USB headset/headphones. Default Audio Changer is a program that can change the default audio device on a Windows 7, 8 and 10 OS-es.












How to set default audio device windows 10