Fixes volume problem controls, happening with some Logitech headset [from gips P4 depot CL 38122]

Review URL: http://webrtc-codereview.appspot.com/108004

git-svn-id: http://webrtc.googlecode.com/svn/trunk@389 4adac7df-926f-26a2-2b94-8c16560cd09d
This commit is contained in:
punyabrata@webrtc.org 2011-08-17 00:15:52 +00:00
parent 467b1a9e4a
commit 7049389794

View File

@ -349,13 +349,15 @@ WebRtc_Word32 AudioMixerManager::EnumerateMicrophones()
{
// selection now contains the index of the selected source =>
// read the line information for this source
if (!GetSourceLineInfo(mixId, destId, selection, sourceLine))
{
return -1;
}
if (sourceLine.cControls == 0 || // no controls
(sourceLine.fdwLine & MIXERLINE_LINEF_DISCONNECTED) || // disconnected
!(sourceLine.fdwLine & MIXERLINE_LINEF_ACTIVE)) // inactive
// if conditions listed below
// condition 1: invalid source
// condition 2: no controls
// condition 3: disconnected
// condition 4: inactive
if (!GetSourceLineInfo(mixId, destId, selection, sourceLine) ||
(sourceLine.cControls == 0) ||
(sourceLine.fdwLine & MIXERLINE_LINEF_DISCONNECTED) ||
!(sourceLine.fdwLine & MIXERLINE_LINEF_ACTIVE))
{
continue;
}