Maarten Lankhorst : winealsa: Don't require a cswitch control for capture.
Alexandre Julliard
julliard at winehq.org
Thu Dec 13 08:23:14 CST 2007
Module: wine
Branch: master
Commit: affd447db0c7cb9c4c056916ce930d0ffd9511aa
URL: http://source.winehq.org/git/wine.git/?a=commit;h=affd447db0c7cb9c4c056916ce930d0ffd9511aa
Author: Maarten Lankhorst <maarten at codeweavers.com>
Date: Wed Dec 12 23:48:04 2007 +0100
winealsa: Don't require a cswitch control for capture.
---
dlls/winealsa.drv/mixer.c | 13 +++++++------
1 files changed, 7 insertions(+), 6 deletions(-)
diff --git a/dlls/winealsa.drv/mixer.c b/dlls/winealsa.drv/mixer.c
index 6b13610..90b539e 100644
--- a/dlls/winealsa.drv/mixer.c
+++ b/dlls/winealsa.drv/mixer.c
@@ -233,8 +233,7 @@ static int blacklisted(snd_mixer_elem_t *elem)
BOOL blisted = 0;
if (!snd_mixer_selem_has_playback_volume(elem) &&
- (!snd_mixer_selem_has_capture_volume(elem) ||
- !snd_mixer_selem_has_capture_switch(elem)))
+ !snd_mixer_selem_has_capture_volume(elem))
blisted = 1;
TRACE("%s: %x\n", name, blisted);
@@ -382,7 +381,7 @@ static void filllines(mixer *mmixer, snd_mixer_elem_t *mastelem, snd_mixer_elem_
else if (!capt)
continue;
- if (capt && snd_mixer_selem_has_capture_switch(elem))
+ if (capt && snd_mixer_selem_has_capture_volume(elem))
{
(++mline)->component = comp;
MultiByteToWideChar(CP_UNIXCP, 0, name, -1, mline->name, MAXPNAMELEN);
@@ -473,7 +472,7 @@ static void ALSA_MixerInit(void)
captelem = elem;
else if (!blacklisted(elem))
{
- if (snd_mixer_selem_has_capture_switch(elem))
+ if (snd_mixer_selem_has_capture_volume(elem))
++capcontrols;
if (snd_mixer_selem_has_playback_volume(elem))
{
@@ -1306,14 +1305,14 @@ static DWORD MIX_GetLineInfo(UINT wDevID, LPMIXERLINEW Ml, DWORD_PTR flags)
return MMSYSERR_INVALPARAM;
}
- Ml->fdwLine = MIXERLINE_LINEF_ACTIVE;
Ml->dwUser = 0;
-
+ Ml->fdwLine = MIXERLINE_LINEF_DISCONNECTED;
switch (qf)
{
case MIXER_GETLINEINFOF_COMPONENTTYPE:
{
Ml->dwLineID = 0xFFFF;
+ TRACE("Looking for componenttype %d/%x\n", Ml->dwComponentType, Ml->dwComponentType);
for (idx = 0; idx < mmixer->chans; ++idx)
if (mmixer->lines[idx].component == Ml->dwComponentType)
{
@@ -1383,6 +1382,8 @@ static DWORD MIX_GetLineInfo(UINT wDevID, LPMIXERLINEW Ml, DWORD_PTR flags)
return MMSYSERR_INVALPARAM;
}
+ Ml->fdwLine &= ~MIXERLINE_LINEF_DISCONNECTED;
+ Ml->fdwLine |= MIXERLINE_LINEF_ACTIVE;
if (Ml->dwLineID >= mmixer->dests)
Ml->fdwLine |= MIXERLINE_LINEF_SOURCE;
More information about the wine-cvs
mailing list