Hi Lexikos,
Here is what I figured out with my next step. Once I knew that "capture:4" worked for the device description, I used that to create a script test to get the device name, which is "Microphone (Realtek High Definition Audio)". With the device name, I was able to write the script so it could find the microphone and then use the correct capture index to access the device in order to set the volume and mute values. Here is the code:
Code:
#NoEnv
COM_CoInitialize()
VA_SetVolume(100.0,1,1,"Stereo Mix:1")
VA_SetVolume(100.0,1,2,"Stereo Mix:1")
VA_SetMute(0,1,"Stereo Mix:1")
;Loop to find the microphone capture device
i := 1
notFound := true
Loop
{
if (notFound = false)
break ;Terminate the loop
;Get the device name
device_desc := "capture:" . i
device := VA_GetDevice(device_desc)
device_name := VA_GetDeviceName(device)
;Compare the device name for loop termination
if (device_name == "Microphone (Realtek High Definition Audio)")
notFound := false
else
i := i+1
}
VA_SetVolume(100.0,1,1,device_desc)
VA_SetVolume(100.0,1,2,device_desc)
VA_SetMute(0,1,device_desc)
COM_CoUninitialize()
It has been a challenge to figure out a way to set the volume and mute for the microphone and stereo mix devices/subunits. I hope this helps the other folks out there that are trying to solve this problem. I need to integrate this with the rest of my script and make sure it all works together. I will report back and thanks for your assistance as well as the assistance of others.