From: Giovanni Mascellani gmascellani@codeweavers.com
Initializing the audio client without AUTOCONVERTPCM is expected to fail when the requested sampling rate or channel count does not match the mixing format. Such behavior is not currently modeled on Wine, but it should be introduced, and since here we expect automatic format conversion to work we add the flag. --- dlls/dsound/primary.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/dlls/dsound/primary.c b/dlls/dsound/primary.c index 2073a32240c..95e77cf4dbc 100644 --- a/dlls/dsound/primary.c +++ b/dlls/dsound/primary.c @@ -306,7 +306,8 @@ HRESULT DSOUND_ReopenDevice(DirectSoundDevice *device, BOOL forcewave)
hres = IAudioClient_Initialize(client, AUDCLNT_SHAREMODE_SHARED, AUDCLNT_STREAMFLAGS_NOPERSIST | - AUDCLNT_STREAMFLAGS_EVENTCALLBACK, 800000, 0, wfx, NULL); + AUDCLNT_STREAMFLAGS_EVENTCALLBACK | AUDCLNT_STREAMFLAGS_AUTOCONVERTPCM, + 800000, 0, wfx, NULL); if(FAILED(hres)){ IAudioClient_Release(client); ERR("Initialize failed: %08lx\n", hres);