Skip to content

Commit 3d6858f

Browse files
committed
[STOBJECT] Remove dead code from Volume_FindMixerControl
1 parent 1d409e3 commit 3d6858f

File tree

1 file changed

+0
-53
lines changed

1 file changed

+0
-53
lines changed

dll/shellext/stobject/volume.cpp

Lines changed: 0 additions & 53 deletions
Original file line numberDiff line numberDiff line change
@@ -54,59 +54,6 @@ static HRESULT __stdcall Volume_FindMixerControl(CSysTray * pSysTray)
5454

5555
g_mixerId = mixerId;
5656
return S_OK;
57-
58-
MIXERCAPS mixerCaps;
59-
MIXERLINE mixerLine;
60-
MIXERCONTROL mixerControl;
61-
MIXERLINECONTROLS mixerLineControls;
62-
63-
g_mixerLineID = -1;
64-
g_muteControlID = -1;
65-
66-
if (mixerGetDevCapsW(g_mixerId, &mixerCaps, sizeof(mixerCaps)))
67-
return E_FAIL;
68-
69-
if (mixerCaps.cDestinations == 0)
70-
return S_FALSE;
71-
72-
TRACE("mixerCaps.cDestinations %d\n", mixerCaps.cDestinations);
73-
74-
DWORD idx;
75-
for (idx = 0; idx < mixerCaps.cDestinations; idx++)
76-
{
77-
mixerLine.cbStruct = sizeof(mixerLine);
78-
mixerLine.dwDestination = idx;
79-
if (!mixerGetLineInfoW((HMIXEROBJ)UlongToHandle(g_mixerId), &mixerLine, 0))
80-
{
81-
if (mixerLine.dwComponentType >= MIXERLINE_COMPONENTTYPE_DST_SPEAKERS &&
82-
mixerLine.dwComponentType <= MIXERLINE_COMPONENTTYPE_DST_HEADPHONES)
83-
break;
84-
TRACE("Destination %d was not speakers or headphones.\n");
85-
}
86-
}
87-
88-
if (idx >= mixerCaps.cDestinations)
89-
return E_FAIL;
90-
91-
TRACE("Valid destination %d found.\n");
92-
93-
g_mixerLineID = mixerLine.dwLineID;
94-
95-
mixerLineControls.cbStruct = sizeof(mixerLineControls);
96-
mixerLineControls.dwLineID = mixerLine.dwLineID;
97-
mixerLineControls.cControls = 1;
98-
mixerLineControls.dwControlType = MIXERCONTROL_CONTROLTYPE_MUTE;
99-
mixerLineControls.pamxctrl = &mixerControl;
100-
mixerLineControls.cbmxctrl = sizeof(mixerControl);
101-
102-
if (mixerGetLineControlsW((HMIXEROBJ)UlongToHandle(g_mixerId), &mixerLineControls, MIXER_GETLINECONTROLSF_ONEBYTYPE))
103-
return E_FAIL;
104-
105-
TRACE("Found control id %d for mute: %d\n", mixerControl.dwControlID);
106-
107-
g_muteControlID = mixerControl.dwControlID;
108-
109-
return S_OK;
11057
}
11158

11259
HRESULT Volume_IsMute()

0 commit comments

Comments
 (0)