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,
snd_pcm_format_t format;
HRESULT hr = S_OK;
WAVEFORMATEX *closest = NULL;
const WAVEFORMATEXTENSIBLE *fmtex = (const WAVEFORMATEXTENSIBLE *)fmt;
unsigned int max = 0, min = 0;
int err;
......@@ -1543,8 +1542,6 @@ static HRESULT WINAPI AudioClient_IsFormatSupported(IAudioClient *iface,
WARN("Unable to get max channels: %d (%s)\n", err, snd_strerror(err));
goto exit;
}
if(max > 8)
max = 2;
if(fmt->nChannels > max){
hr = S_FALSE;
closest->nChannels = max;
......@@ -1553,16 +1550,8 @@ static HRESULT WINAPI AudioClient_IsFormatSupported(IAudioClient *iface,
closest->nChannels = min;
}
if(closest->wFormatTag == WAVE_FORMAT_EXTENSIBLE){
DWORD mask = get_channel_mask(closest->nChannels);
((WAVEFORMATEXTENSIBLE*)closest)->dwChannelMask = mask;
if(fmt->wFormatTag == WAVE_FORMAT_EXTENSIBLE &&
fmtex->dwChannelMask != 0 &&
fmtex->dwChannelMask != mask)
hr = S_FALSE;
}
if(closest->wFormatTag == WAVE_FORMAT_EXTENSIBLE)
((WAVEFORMATEXTENSIBLE*)closest)->dwChannelMask = get_channel_mask(closest->nChannels);
exit:
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