Windows 10 OS audio device selection












0















I'm looking for explanation, how audio input works in Windows 10 OS.



I have Asus laptop with Windows 10 OS and C# WinForms application, which usually uses inbuilt Microphone (Realtec High Definition Audio) by default.



Additionally I have two USB Logitech Microphone (Webcam C210) and Microphone (2- USB Audio Device).



I was thinking to use NAudio library reference to select and choose audio device manually to get system main audio input from application, but seems like it works automatically and does not requires manual selection to be selected, but it works in a certain way, which is not completely clear to me.



Insertion of Logitech automatically changes device in Sound Settings Input device to Logitech Microphone (Webcam C210) from Microphone (Realtec High Definition Audio), but insertion of Microphone (2- USB Audio Device) comes forward all regardless of whether it was plugged before the video camera microphone or after.



My goal is to select this particular microphone, so it is works as I need, but I can't understand how this hierarchy works, why system chooses this microphone, regardless of connection sequence. Because in another case, if some other microphone would be chosen by the system instead of my particular Microphone (2- USB Audio Device), then probably still I have to use manual switching with help of some method programmatically



Any guide, advice or example would be helpful










share|improve this question

























  • Usually what I have seen is in the sound panel whatever is listed as the default, then that is what's used as the default in the application. If your default (Realtek Mic) is disconnected and another Mic is plugged in it will default to the one plugged in. Now if this is for personal use you can program an "if statement" with the mics that " if Mic A is plugged in and Mic B gets plugged in you can override the default to use Mic B instead of Mic A." If that is what your going for? If so I will leave an answer below on how to accomplish that. I do that in my custom screen recorder.

    – Halonic
    Nov 23 '18 at 13:24











  • @Halonic Hello, well this actually what I'm going for, to get exactly this Microphone (2- USB Audio Device) as main OS audio input if it is plugged. With particular set of devices, inbuilt Realtec and C210 microphone, 2- USB Audio Device stands out without any C# code from my application. Everything works as needed, but at the same time I can't understand why does this microphone stand out when other devices are also connected, and how can I programmatically provide for the case if some any other microphone connected to the computer through USB will lead in this hierarchy

    – Ai_ve
    Nov 23 '18 at 17:18













  • @Halonic so seems like at least I need to know which microphone is chosen by system, to notice user in case if system chooses wrong microphone and allow choose correct one manually from OS audio settings, or from my application, last should be also solved programmatically, I guess, for example somehow with NAudio library using

    – Ai_ve
    Nov 23 '18 at 17:27











  • The way I have always known it is, what ever is set with default communication, defualt device... That is the one that stands out. You can also use the setaudiodevicetodefault(); as well and can list the microphones that are attached. I teach tutorials on YouTube for C# and I swap back and forth between OBS and my custom Screen Recorder. My screen recorder I can set what ever microphone as default in code by a combo box or have to auto default to my main Mic. If this is for other users then I would recommend a dropbox and let them choose... I will post an example in the answer shortly.

    – Halonic
    Nov 25 '18 at 12:46











  • @Halonic Well, I'm not quite understand what the method you described as setaudiodevicetodefault();, which is able to change USB microphone device for Windows 10 OS main audio input with combo box from C# application. Can you provide any useful link or example? Because all I found is NAudio library, which should be able to do something like this.

    – Ai_ve
    Nov 26 '18 at 14:55
















0















I'm looking for explanation, how audio input works in Windows 10 OS.



I have Asus laptop with Windows 10 OS and C# WinForms application, which usually uses inbuilt Microphone (Realtec High Definition Audio) by default.



Additionally I have two USB Logitech Microphone (Webcam C210) and Microphone (2- USB Audio Device).



I was thinking to use NAudio library reference to select and choose audio device manually to get system main audio input from application, but seems like it works automatically and does not requires manual selection to be selected, but it works in a certain way, which is not completely clear to me.



Insertion of Logitech automatically changes device in Sound Settings Input device to Logitech Microphone (Webcam C210) from Microphone (Realtec High Definition Audio), but insertion of Microphone (2- USB Audio Device) comes forward all regardless of whether it was plugged before the video camera microphone or after.



My goal is to select this particular microphone, so it is works as I need, but I can't understand how this hierarchy works, why system chooses this microphone, regardless of connection sequence. Because in another case, if some other microphone would be chosen by the system instead of my particular Microphone (2- USB Audio Device), then probably still I have to use manual switching with help of some method programmatically



Any guide, advice or example would be helpful










share|improve this question

























  • Usually what I have seen is in the sound panel whatever is listed as the default, then that is what's used as the default in the application. If your default (Realtek Mic) is disconnected and another Mic is plugged in it will default to the one plugged in. Now if this is for personal use you can program an "if statement" with the mics that " if Mic A is plugged in and Mic B gets plugged in you can override the default to use Mic B instead of Mic A." If that is what your going for? If so I will leave an answer below on how to accomplish that. I do that in my custom screen recorder.

    – Halonic
    Nov 23 '18 at 13:24











  • @Halonic Hello, well this actually what I'm going for, to get exactly this Microphone (2- USB Audio Device) as main OS audio input if it is plugged. With particular set of devices, inbuilt Realtec and C210 microphone, 2- USB Audio Device stands out without any C# code from my application. Everything works as needed, but at the same time I can't understand why does this microphone stand out when other devices are also connected, and how can I programmatically provide for the case if some any other microphone connected to the computer through USB will lead in this hierarchy

    – Ai_ve
    Nov 23 '18 at 17:18













  • @Halonic so seems like at least I need to know which microphone is chosen by system, to notice user in case if system chooses wrong microphone and allow choose correct one manually from OS audio settings, or from my application, last should be also solved programmatically, I guess, for example somehow with NAudio library using

    – Ai_ve
    Nov 23 '18 at 17:27











  • The way I have always known it is, what ever is set with default communication, defualt device... That is the one that stands out. You can also use the setaudiodevicetodefault(); as well and can list the microphones that are attached. I teach tutorials on YouTube for C# and I swap back and forth between OBS and my custom Screen Recorder. My screen recorder I can set what ever microphone as default in code by a combo box or have to auto default to my main Mic. If this is for other users then I would recommend a dropbox and let them choose... I will post an example in the answer shortly.

    – Halonic
    Nov 25 '18 at 12:46











  • @Halonic Well, I'm not quite understand what the method you described as setaudiodevicetodefault();, which is able to change USB microphone device for Windows 10 OS main audio input with combo box from C# application. Can you provide any useful link or example? Because all I found is NAudio library, which should be able to do something like this.

    – Ai_ve
    Nov 26 '18 at 14:55














0












0








0


1






I'm looking for explanation, how audio input works in Windows 10 OS.



I have Asus laptop with Windows 10 OS and C# WinForms application, which usually uses inbuilt Microphone (Realtec High Definition Audio) by default.



Additionally I have two USB Logitech Microphone (Webcam C210) and Microphone (2- USB Audio Device).



I was thinking to use NAudio library reference to select and choose audio device manually to get system main audio input from application, but seems like it works automatically and does not requires manual selection to be selected, but it works in a certain way, which is not completely clear to me.



Insertion of Logitech automatically changes device in Sound Settings Input device to Logitech Microphone (Webcam C210) from Microphone (Realtec High Definition Audio), but insertion of Microphone (2- USB Audio Device) comes forward all regardless of whether it was plugged before the video camera microphone or after.



My goal is to select this particular microphone, so it is works as I need, but I can't understand how this hierarchy works, why system chooses this microphone, regardless of connection sequence. Because in another case, if some other microphone would be chosen by the system instead of my particular Microphone (2- USB Audio Device), then probably still I have to use manual switching with help of some method programmatically



Any guide, advice or example would be helpful










share|improve this question
















I'm looking for explanation, how audio input works in Windows 10 OS.



I have Asus laptop with Windows 10 OS and C# WinForms application, which usually uses inbuilt Microphone (Realtec High Definition Audio) by default.



Additionally I have two USB Logitech Microphone (Webcam C210) and Microphone (2- USB Audio Device).



I was thinking to use NAudio library reference to select and choose audio device manually to get system main audio input from application, but seems like it works automatically and does not requires manual selection to be selected, but it works in a certain way, which is not completely clear to me.



Insertion of Logitech automatically changes device in Sound Settings Input device to Logitech Microphone (Webcam C210) from Microphone (Realtec High Definition Audio), but insertion of Microphone (2- USB Audio Device) comes forward all regardless of whether it was plugged before the video camera microphone or after.



My goal is to select this particular microphone, so it is works as I need, but I can't understand how this hierarchy works, why system chooses this microphone, regardless of connection sequence. Because in another case, if some other microphone would be chosen by the system instead of my particular Microphone (2- USB Audio Device), then probably still I have to use manual switching with help of some method programmatically



Any guide, advice or example would be helpful







c# winforms audio windows-10 audio-device






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Nov 21 '18 at 18:54







Ai_ve

















asked Nov 21 '18 at 17:42









Ai_veAi_ve

268




268













  • Usually what I have seen is in the sound panel whatever is listed as the default, then that is what's used as the default in the application. If your default (Realtek Mic) is disconnected and another Mic is plugged in it will default to the one plugged in. Now if this is for personal use you can program an "if statement" with the mics that " if Mic A is plugged in and Mic B gets plugged in you can override the default to use Mic B instead of Mic A." If that is what your going for? If so I will leave an answer below on how to accomplish that. I do that in my custom screen recorder.

    – Halonic
    Nov 23 '18 at 13:24











  • @Halonic Hello, well this actually what I'm going for, to get exactly this Microphone (2- USB Audio Device) as main OS audio input if it is plugged. With particular set of devices, inbuilt Realtec and C210 microphone, 2- USB Audio Device stands out without any C# code from my application. Everything works as needed, but at the same time I can't understand why does this microphone stand out when other devices are also connected, and how can I programmatically provide for the case if some any other microphone connected to the computer through USB will lead in this hierarchy

    – Ai_ve
    Nov 23 '18 at 17:18













  • @Halonic so seems like at least I need to know which microphone is chosen by system, to notice user in case if system chooses wrong microphone and allow choose correct one manually from OS audio settings, or from my application, last should be also solved programmatically, I guess, for example somehow with NAudio library using

    – Ai_ve
    Nov 23 '18 at 17:27











  • The way I have always known it is, what ever is set with default communication, defualt device... That is the one that stands out. You can also use the setaudiodevicetodefault(); as well and can list the microphones that are attached. I teach tutorials on YouTube for C# and I swap back and forth between OBS and my custom Screen Recorder. My screen recorder I can set what ever microphone as default in code by a combo box or have to auto default to my main Mic. If this is for other users then I would recommend a dropbox and let them choose... I will post an example in the answer shortly.

    – Halonic
    Nov 25 '18 at 12:46











  • @Halonic Well, I'm not quite understand what the method you described as setaudiodevicetodefault();, which is able to change USB microphone device for Windows 10 OS main audio input with combo box from C# application. Can you provide any useful link or example? Because all I found is NAudio library, which should be able to do something like this.

    – Ai_ve
    Nov 26 '18 at 14:55



















  • Usually what I have seen is in the sound panel whatever is listed as the default, then that is what's used as the default in the application. If your default (Realtek Mic) is disconnected and another Mic is plugged in it will default to the one plugged in. Now if this is for personal use you can program an "if statement" with the mics that " if Mic A is plugged in and Mic B gets plugged in you can override the default to use Mic B instead of Mic A." If that is what your going for? If so I will leave an answer below on how to accomplish that. I do that in my custom screen recorder.

    – Halonic
    Nov 23 '18 at 13:24











  • @Halonic Hello, well this actually what I'm going for, to get exactly this Microphone (2- USB Audio Device) as main OS audio input if it is plugged. With particular set of devices, inbuilt Realtec and C210 microphone, 2- USB Audio Device stands out without any C# code from my application. Everything works as needed, but at the same time I can't understand why does this microphone stand out when other devices are also connected, and how can I programmatically provide for the case if some any other microphone connected to the computer through USB will lead in this hierarchy

    – Ai_ve
    Nov 23 '18 at 17:18













  • @Halonic so seems like at least I need to know which microphone is chosen by system, to notice user in case if system chooses wrong microphone and allow choose correct one manually from OS audio settings, or from my application, last should be also solved programmatically, I guess, for example somehow with NAudio library using

    – Ai_ve
    Nov 23 '18 at 17:27











  • The way I have always known it is, what ever is set with default communication, defualt device... That is the one that stands out. You can also use the setaudiodevicetodefault(); as well and can list the microphones that are attached. I teach tutorials on YouTube for C# and I swap back and forth between OBS and my custom Screen Recorder. My screen recorder I can set what ever microphone as default in code by a combo box or have to auto default to my main Mic. If this is for other users then I would recommend a dropbox and let them choose... I will post an example in the answer shortly.

    – Halonic
    Nov 25 '18 at 12:46











  • @Halonic Well, I'm not quite understand what the method you described as setaudiodevicetodefault();, which is able to change USB microphone device for Windows 10 OS main audio input with combo box from C# application. Can you provide any useful link or example? Because all I found is NAudio library, which should be able to do something like this.

    – Ai_ve
    Nov 26 '18 at 14:55

















Usually what I have seen is in the sound panel whatever is listed as the default, then that is what's used as the default in the application. If your default (Realtek Mic) is disconnected and another Mic is plugged in it will default to the one plugged in. Now if this is for personal use you can program an "if statement" with the mics that " if Mic A is plugged in and Mic B gets plugged in you can override the default to use Mic B instead of Mic A." If that is what your going for? If so I will leave an answer below on how to accomplish that. I do that in my custom screen recorder.

– Halonic
Nov 23 '18 at 13:24





Usually what I have seen is in the sound panel whatever is listed as the default, then that is what's used as the default in the application. If your default (Realtek Mic) is disconnected and another Mic is plugged in it will default to the one plugged in. Now if this is for personal use you can program an "if statement" with the mics that " if Mic A is plugged in and Mic B gets plugged in you can override the default to use Mic B instead of Mic A." If that is what your going for? If so I will leave an answer below on how to accomplish that. I do that in my custom screen recorder.

– Halonic
Nov 23 '18 at 13:24













@Halonic Hello, well this actually what I'm going for, to get exactly this Microphone (2- USB Audio Device) as main OS audio input if it is plugged. With particular set of devices, inbuilt Realtec and C210 microphone, 2- USB Audio Device stands out without any C# code from my application. Everything works as needed, but at the same time I can't understand why does this microphone stand out when other devices are also connected, and how can I programmatically provide for the case if some any other microphone connected to the computer through USB will lead in this hierarchy

– Ai_ve
Nov 23 '18 at 17:18







@Halonic Hello, well this actually what I'm going for, to get exactly this Microphone (2- USB Audio Device) as main OS audio input if it is plugged. With particular set of devices, inbuilt Realtec and C210 microphone, 2- USB Audio Device stands out without any C# code from my application. Everything works as needed, but at the same time I can't understand why does this microphone stand out when other devices are also connected, and how can I programmatically provide for the case if some any other microphone connected to the computer through USB will lead in this hierarchy

– Ai_ve
Nov 23 '18 at 17:18















@Halonic so seems like at least I need to know which microphone is chosen by system, to notice user in case if system chooses wrong microphone and allow choose correct one manually from OS audio settings, or from my application, last should be also solved programmatically, I guess, for example somehow with NAudio library using

– Ai_ve
Nov 23 '18 at 17:27





@Halonic so seems like at least I need to know which microphone is chosen by system, to notice user in case if system chooses wrong microphone and allow choose correct one manually from OS audio settings, or from my application, last should be also solved programmatically, I guess, for example somehow with NAudio library using

– Ai_ve
Nov 23 '18 at 17:27













The way I have always known it is, what ever is set with default communication, defualt device... That is the one that stands out. You can also use the setaudiodevicetodefault(); as well and can list the microphones that are attached. I teach tutorials on YouTube for C# and I swap back and forth between OBS and my custom Screen Recorder. My screen recorder I can set what ever microphone as default in code by a combo box or have to auto default to my main Mic. If this is for other users then I would recommend a dropbox and let them choose... I will post an example in the answer shortly.

– Halonic
Nov 25 '18 at 12:46





The way I have always known it is, what ever is set with default communication, defualt device... That is the one that stands out. You can also use the setaudiodevicetodefault(); as well and can list the microphones that are attached. I teach tutorials on YouTube for C# and I swap back and forth between OBS and my custom Screen Recorder. My screen recorder I can set what ever microphone as default in code by a combo box or have to auto default to my main Mic. If this is for other users then I would recommend a dropbox and let them choose... I will post an example in the answer shortly.

– Halonic
Nov 25 '18 at 12:46













@Halonic Well, I'm not quite understand what the method you described as setaudiodevicetodefault();, which is able to change USB microphone device for Windows 10 OS main audio input with combo box from C# application. Can you provide any useful link or example? Because all I found is NAudio library, which should be able to do something like this.

– Ai_ve
Nov 26 '18 at 14:55





@Halonic Well, I'm not quite understand what the method you described as setaudiodevicetodefault();, which is able to change USB microphone device for Windows 10 OS main audio input with combo box from C# application. Can you provide any useful link or example? Because all I found is NAudio library, which should be able to do something like this.

– Ai_ve
Nov 26 '18 at 14:55












0






active

oldest

votes











Your Answer






StackExchange.ifUsing("editor", function () {
StackExchange.using("externalEditor", function () {
StackExchange.using("snippets", function () {
StackExchange.snippets.init();
});
});
}, "code-snippets");

StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "1"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);

StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});

function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});


}
});














draft saved

draft discarded


















StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53417806%2fwindows-10-os-audio-device-selection%23new-answer', 'question_page');
}
);

Post as a guest















Required, but never shown

























0






active

oldest

votes








0






active

oldest

votes









active

oldest

votes






active

oldest

votes
















draft saved

draft discarded




















































Thanks for contributing an answer to Stack Overflow!


  • Please be sure to answer the question. Provide details and share your research!

But avoid



  • Asking for help, clarification, or responding to other answers.

  • Making statements based on opinion; back them up with references or personal experience.


To learn more, see our tips on writing great answers.




draft saved


draft discarded














StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53417806%2fwindows-10-os-audio-device-selection%23new-answer', 'question_page');
}
);

Post as a guest















Required, but never shown





















































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown

































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown







Popular posts from this blog

To store a contact into the json file from server.js file using a class in NodeJS

Redirect URL with Chrome Remote Debugging Android Devices

Dieringhausen