简体   繁体   English

我在注册表中的哪里可以找到音频设备名称的不同部分

[英]where in registry can i find different parts of audio device name

I need to change some properties of the an audio device in my c++ code(on window 7) where the only input I am getting is a Device Name coming from flash player(the name is same as that shown in the recording devices list which we get from right clicking the speaker icon). 我需要在我的c ++代码中(在窗口7上)更改音频设备的某些属性,我唯一得到的输入是来自Flash Player的设备名称(名称与录音设备列表中显示的名称相同,通过右键单击扬声器图标获得)。


Now say there is this device named "Microphone ( 2 - USB Audio Device)" . 现在说有一个名为“麦克风( 2 -USB音频设备)”的设备 I am able to check the USB Audio Device and Microphone part from values of the registry key: HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\MMDevices\\Audio\\Capture\\someKindOfDeviceId\\Properties 我可以从注册表项的值检查USB音频设备麦克风部分: HKEY_LOCAL_MACHINE \\ SOFTWARE \\ Microsoft \\ Windows \\ CurrentVersion \\ MMDevices \\ Audio \\ Capture \\ someKindOfDeviceId \\ Properties

"Now what I don't get is where from are these '2' or '3' are coming in these names." “现在我不明白的是这些名称中这些'2'或'3'是从哪里来的。”

I have to find a match to the device name in the registry and that's why this becomes so very necessary. 我必须在注册表中找到设备名称的匹配项,因此这变得非常必要。 please help. 请帮忙。 thanks in advance. 提前致谢。

I found how the numbers are assigned but am not able to proceed further. 我发现了编号的分配方式,但无法继续进行。
Actually when we plug a device(say usb pnp device), driver is installed and if it is the first time the device is installed then this port is numbered 1. 实际上,当我们插入设备(例如usb pnp设备)时,会安装驱动程序,如果是第一次安装该设备,则此端口编号为1。
Now say we unplug this device and plug it in some other port(usb), again the driver will be installed and our this port will get number 2. 现在说我们拔下该设备并将其插入其他端口(usb),将再次安装驱动程序,并且此端口的编号为2。
and so on.. 等等..
Now whenever we plug the device, the number in the name is decided by the fact that 'when the driver was installed ie when the device was first used with this pin..."did we already use this with other ports and is yes then how many?". 现在,无论何时插入设备,名称中的数字都是由以下事实决定的:“安装驱动程序时,即设备首次通过此引脚使用时……”我们是否已将其与其他端口一起使用,然后是多少?”。

But the question that still remains is which value in audio/capture represents this number so that we can match it against the input device name? 但是仍然存在的问题是,音频/捕获中的哪个值表示此数字,以便我们可以将其与输入设备名称进行匹配?

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM