diff --git a/Resources/BuildNo.rc b/Resources/BuildNo.rc index 9aadfcf4..a3aa93bb 100644 --- a/Resources/BuildNo.rc +++ b/Resources/BuildNo.rc @@ -1 +1 @@ -#define BUILD_NUMBER 1896 +#define BUILD_NUMBER 1897 diff --git a/Wrappers/dsound/IDirectSound8.cpp b/Wrappers/dsound/IDirectSound8.cpp index d0877157..8d16fae7 100644 --- a/Wrappers/dsound/IDirectSound8.cpp +++ b/Wrappers/dsound/IDirectSound8.cpp @@ -71,7 +71,17 @@ HRESULT m_IDirectSound8::CreateSoundBuffer(LPCDSBUFFERDESC pcDSBufferDesc, LPDIR DSBufferDesc->dwFlags |= DSBCAPS_CTRLVOLUME; } - HRESULT hr = ProxyInterface->CreateSoundBuffer(pcDSBufferDesc, ppDSBuffer, pUnkOuter); + HRESULT hr; + + DWORD x = 0; + do { + hr = ProxyInterface->CreateSoundBuffer(pcDSBufferDesc, ppDSBuffer, pUnkOuter); + + if (FAILED(hr)) + { + Sleep(100); + } + } while (FAILED(hr) && ++x < 100); if (SUCCEEDED(hr) && ppDSBuffer) { diff --git a/Wrappers/dsound/dsoundwrapper.cpp b/Wrappers/dsound/dsoundwrapper.cpp index 82095be6..7685067c 100644 --- a/Wrappers/dsound/dsoundwrapper.cpp +++ b/Wrappers/dsound/dsoundwrapper.cpp @@ -48,7 +48,17 @@ HRESULT WINAPI DirectSoundCreate8Wrapper(LPCGUID pcGuidDevice, LPDIRECTSOUND8 *p { LOG_LIMIT(3, "Redirecting 'DirectSoundCreate8' ..."); - HRESULT hr = m_pDirectSoundCreate8(pcGuidDevice, ppDS8, pUnkOuter); + HRESULT hr; + + DWORD x = 0; + do { + hr = m_pDirectSoundCreate8(pcGuidDevice, ppDS8, pUnkOuter); + + if (FAILED(hr)) + { + Sleep(100); + } + } while (FAILED(hr) && ++x < 100); if (SUCCEEDED(hr) && ppDS8) {