winealsa: Simplify the test for 8bit linear PCM.

This commit is contained in:
Jörg Höhle 2011-08-16 10:12:48 +02:00 committed by Alexandre Julliard
parent 59e817c523
commit 386f7639f3
1 changed files with 1 additions and 5 deletions

View File

@ -2076,11 +2076,7 @@ static HRESULT WINAPI AudioRenderClient_ReleaseBuffer(
buffer = This->tmp_buffer;
if(flags & AUDCLNT_BUFFERFLAGS_SILENT){
WAVEFORMATEXTENSIBLE *fmtex = (WAVEFORMATEXTENSIBLE*)This->fmt;
if((This->fmt->wFormatTag == WAVE_FORMAT_PCM ||
(This->fmt->wFormatTag == WAVE_FORMAT_EXTENSIBLE &&
IsEqualGUID(&fmtex->SubFormat, &KSDATAFORMAT_SUBTYPE_PCM))) &&
This->fmt->wBitsPerSample == 8)
if(This->fmt->wBitsPerSample == 8)
memset(buffer, 128, written_frames * This->fmt->nBlockAlign);
else
memset(buffer, 0, written_frames * This->fmt->nBlockAlign);