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:
parent
467b1a9e4a
commit
7049389794
@ -349,13 +349,15 @@ WebRtc_Word32 AudioMixerManager::EnumerateMicrophones()
|
|||||||
{
|
{
|
||||||
// selection now contains the index of the selected source =>
|
// selection now contains the index of the selected source =>
|
||||||
// read the line information for this source
|
// read the line information for this source
|
||||||
if (!GetSourceLineInfo(mixId, destId, selection, sourceLine))
|
// if conditions listed below
|
||||||
{
|
// condition 1: invalid source
|
||||||
return -1;
|
// condition 2: no controls
|
||||||
}
|
// condition 3: disconnected
|
||||||
if (sourceLine.cControls == 0 || // no controls
|
// condition 4: inactive
|
||||||
(sourceLine.fdwLine & MIXERLINE_LINEF_DISCONNECTED) || // disconnected
|
if (!GetSourceLineInfo(mixId, destId, selection, sourceLine) ||
|
||||||
!(sourceLine.fdwLine & MIXERLINE_LINEF_ACTIVE)) // inactive
|
(sourceLine.cControls == 0) ||
|
||||||
|
(sourceLine.fdwLine & MIXERLINE_LINEF_DISCONNECTED) ||
|
||||||
|
!(sourceLine.fdwLine & MIXERLINE_LINEF_ACTIVE))
|
||||||
{
|
{
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user