mirror of
https://github.com/reactos/wine.git
synced 2024-11-25 20:59:54 +00:00
winealsa: Make sure we can set volume before reporting WAVECAPS_VOLUME.
This commit is contained in:
parent
f2fc4d3a0f
commit
edff53387a
@ -307,11 +307,23 @@ static int ALSA_ComputeCaps(snd_ctl_t *ctl, snd_pcm_t *pcm,
|
||||
|
||||
/* check for volume control support */
|
||||
if (ctl) {
|
||||
if (snd_ctl_name(ctl))
|
||||
{
|
||||
snd_hctl_t *hctl;
|
||||
if (snd_hctl_open(&hctl, snd_ctl_name(ctl), 0) >= 0)
|
||||
{
|
||||
snd_hctl_load(hctl);
|
||||
if (!ALSA_CheckSetVolume( hctl, NULL, NULL, NULL, NULL, NULL, NULL, NULL ))
|
||||
{
|
||||
*supports |= WAVECAPS_VOLUME;
|
||||
|
||||
if (chmin <= 2 && 2 <= chmax)
|
||||
*supports |= WAVECAPS_LRVOLUME;
|
||||
}
|
||||
snd_hctl_free(hctl);
|
||||
snd_hctl_close(hctl);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (*formats & (WAVE_FORMAT_1M08 | WAVE_FORMAT_2M08 |
|
||||
WAVE_FORMAT_4M08 | WAVE_FORMAT_48M08 |
|
||||
|
Loading…
Reference in New Issue
Block a user