Commit 09881795 authored by Robert Reif's avatar Robert Reif Committed by Alexandre Julliard

Fill new software buffers with silence.

parent e551555d
......@@ -1105,6 +1105,7 @@ HRESULT WINAPI IDirectSoundBufferImpl_Create(
return DSERR_OUTOFMEMORY;
}
dsb->buffer->ref = 1;
FillMemory(dsb->buffer->memory, dsb->buflen, dsbd->lpwfxFormat->wBitsPerSample == 8 ? 128 : 0);
}
/* Allocate the hardware buffer */
......@@ -1136,6 +1137,7 @@ HRESULT WINAPI IDirectSoundBufferImpl_Create(
return DSERR_OUTOFMEMORY;
}
dsb->buffer->ref = 1;
FillMemory(dsb->buffer->memory, dsb->buflen, dsbd->lpwfxFormat->wBitsPerSample == 8 ? 128 : 0);
}
err = DS_OK;
}
......
......@@ -114,7 +114,7 @@ static HRESULT DSOUND_PrimaryOpen(IDirectSoundImpl *This)
This->pwqueue = 0;
This->playpos = 0;
This->mixpos = 0;
FillMemory(This->buffer, This->buflen, (This->pwfx->wBitsPerSample == 16) ? 0 : 128);
FillMemory(This->buffer, This->buflen, (This->pwfx->wBitsPerSample == 8) ? 128 : 0);
TRACE("fraglen=%ld\n", This->fraglen);
DSOUND_WaveQueue(This, (DWORD)-1);
}
......
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