>Hello,
>
>Sounds like this will be hard to implement correctly.
>Could we get textual description of component, and if it is equal
>to "Stereo Mix" ignore it?
>
>However, I do not see how we could decide which mixer to use.
>Does get gain after set gain for mixer 0 return correct value? 

I updated the sound driver manually by copying dll, sys and some exe files to 
the corresponding windows directories as the old driver couldn't be uninstalled 
as the uninstaller crashed. Sound card works and there were some surprises:

mixer 1, lineid 131072 isn't microphone anymore, but "stereo mix"
mixer 1, lineid 65536 isn't "stereo mix" anymore but "line volume"
mixer 1, lineid 0 is our "mic volume"

So the meaning of lineids changes with different driver version. Even the 
strings can change, as "line volume" was called something else before.

The new driver did fix the issue about 2 "analog" component types in mixer 1. 
Now I can detect the microphone in mixer1 as 
dwComponentType == MIXERLINE_COMPONENTTYPE_SRC_MICROPHONE (the same way that is 
currently used in sipxmedialib). However in mixer 0 (output), the microphone is 
still "MIXERLINE_COMPONENTTYPE_SRC_ANALOG" (this could still be a bug which was 
fixed in mixer 1).

So no special detection mechanism is required for detection of the real mic in 
mixer 1. We dont need to set volume for microphone in mixer 0.

We can call mixerGetNumDevs() to get the number of mixers, then call 
mixerGetDevCaps for each mixer id (curretly only 0 and 1) and check the 
MIXERCAPS structure. I have tried this and unfortunately all fields in 
MIXERCAPS for both mixers are the same except for the szPname which contains 
"Realtek HD Audio Input" or "Realtek HD Audio output" (this time output is not 
capitalized).

So we can either
1.) set gain on all dwComponentType == MIXERLINE_COMPONENTTYPE_SRC_MICROPHONE 
lines on all mixers
2.) if there are more than 1 mixers then find out which one is "input" by doing 
case ignoring search in szPname for "input" and set gain for dwComponentType == 
MIXERLINE_COMPONENTTYPE_SRC_MICROPHONE line.

I would do it the 1st way as you never know what will be in szPname for other 
sound cards with multiple mixers.

Jaro
_______________________________________________
sipxtapi-dev mailing list
[email protected]
List Archive: http://list.sipfoundry.org/archive/sipxtapi-dev/

Reply via email to