Module: wine Branch: master Commit: 81d601f56fc5c84c7f517b9424a73e4788c784b8 URL: http://source.winehq.org/git/wine.git/?a=commit;h=81d601f56fc5c84c7f517b9424...
Author: Andrew Eikum aeikum@codeweavers.com Date: Fri Dec 14 08:47:16 2012 -0600
dsound: Always fill wValidBitsPerSample.
---
dlls/dsound/primary.c | 5 ++--- 1 files changed, 2 insertions(+), 3 deletions(-)
diff --git a/dlls/dsound/primary.c b/dlls/dsound/primary.c index bc72d78..0964f9b 100644 --- a/dlls/dsound/primary.c +++ b/dlls/dsound/primary.c @@ -87,10 +87,9 @@ static HRESULT DSOUND_WaveFormat(DirectSoundDevice *device, IAudioClient *client WAVEFORMATEXTENSIBLE testwfe = *mixwfe;
testwfe.SubFormat = KSDATAFORMAT_SUBTYPE_IEEE_FLOAT; - testwfe.Format.wBitsPerSample = 32; + testwfe.Samples.wValidBitsPerSample = testwfe.Format.wBitsPerSample = 32; testwfe.Format.nBlockAlign = testwfe.Format.nChannels * testwfe.Format.wBitsPerSample / 8; testwfe.Format.nAvgBytesPerSec = testwfe.Format.nSamplesPerSec * testwfe.Format.nBlockAlign; - testwfe.Samples.wValidBitsPerSample = 0;
if (FAILED(IAudioClient_IsFormatSupported(client, AUDCLNT_SHAREMODE_SHARED, &testwfe.Format, (WAVEFORMATEX**)&retwfe))) w = DSOUND_CopyFormat(&mixwfe->Format); @@ -121,12 +120,12 @@ static HRESULT DSOUND_WaveFormat(DirectSoundDevice *device, IAudioClient *client w->nAvgBytesPerSec = w->nSamplesPerSec * w->nBlockAlign;
wfe->dwChannelMask = 0; - wfe->Samples.wValidBitsPerSample = 0; if (wi->wFormatTag == WAVE_FORMAT_IEEE_FLOAT) { w->wBitsPerSample = 32; wfe->SubFormat = KSDATAFORMAT_SUBTYPE_IEEE_FLOAT; } else wfe->SubFormat = KSDATAFORMAT_SUBTYPE_PCM; + wfe->Samples.wValidBitsPerSample = w->wBitsPerSample; } else w = DSOUND_CopyFormat(device->primary_pwfx);