Commit 36eb79e7 authored by Andrew Eikum's avatar Andrew Eikum Committed by Alexandre Julliard

winealsa.drv: Don't cap the allowed number of channels.

parent 6c1fcaa3
...@@ -1463,7 +1463,6 @@ static HRESULT WINAPI AudioClient_IsFormatSupported(IAudioClient *iface, ...@@ -1463,7 +1463,6 @@ static HRESULT WINAPI AudioClient_IsFormatSupported(IAudioClient *iface,
snd_pcm_format_t format; snd_pcm_format_t format;
HRESULT hr = S_OK; HRESULT hr = S_OK;
WAVEFORMATEX *closest = NULL; WAVEFORMATEX *closest = NULL;
const WAVEFORMATEXTENSIBLE *fmtex = (const WAVEFORMATEXTENSIBLE *)fmt;
unsigned int max = 0, min = 0; unsigned int max = 0, min = 0;
int err; int err;
...@@ -1543,8 +1542,6 @@ static HRESULT WINAPI AudioClient_IsFormatSupported(IAudioClient *iface, ...@@ -1543,8 +1542,6 @@ static HRESULT WINAPI AudioClient_IsFormatSupported(IAudioClient *iface,
WARN("Unable to get max channels: %d (%s)\n", err, snd_strerror(err)); WARN("Unable to get max channels: %d (%s)\n", err, snd_strerror(err));
goto exit; goto exit;
} }
if(max > 8)
max = 2;
if(fmt->nChannels > max){ if(fmt->nChannels > max){
hr = S_FALSE; hr = S_FALSE;
closest->nChannels = max; closest->nChannels = max;
...@@ -1553,16 +1550,8 @@ static HRESULT WINAPI AudioClient_IsFormatSupported(IAudioClient *iface, ...@@ -1553,16 +1550,8 @@ static HRESULT WINAPI AudioClient_IsFormatSupported(IAudioClient *iface,
closest->nChannels = min; closest->nChannels = min;
} }
if(closest->wFormatTag == WAVE_FORMAT_EXTENSIBLE){ if(closest->wFormatTag == WAVE_FORMAT_EXTENSIBLE)
DWORD mask = get_channel_mask(closest->nChannels); ((WAVEFORMATEXTENSIBLE*)closest)->dwChannelMask = get_channel_mask(closest->nChannels);
((WAVEFORMATEXTENSIBLE*)closest)->dwChannelMask = mask;
if(fmt->wFormatTag == WAVE_FORMAT_EXTENSIBLE &&
fmtex->dwChannelMask != 0 &&
fmtex->dwChannelMask != mask)
hr = S_FALSE;
}
exit: exit:
LeaveCriticalSection(&This->lock); LeaveCriticalSection(&This->lock);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment