Commit 7c3046db authored by Marcus Meissner's avatar Marcus Meissner Committed by Alexandre Julliard

Some programs (quake2 et al) do check for DSCAPS_EMULDRIVER and stop

to work. 'Adjust' caps flags accordingly.
parent d4ea0108
...@@ -369,7 +369,7 @@ static HRESULT WINAPI IDirectSoundBuffer_GetCaps( ...@@ -369,7 +369,7 @@ static HRESULT WINAPI IDirectSoundBuffer_GetCaps(
) { ) {
caps->dwSize = sizeof(*caps); caps->dwSize = sizeof(*caps);
caps->dwFlags = DSBCAPS_PRIMARYBUFFER|DSBCAPS_STATIC|DSBCAPS_CTRLALL|DSBCAPS_LOCSOFTWARE; caps->dwFlags = DSBCAPS_PRIMARYBUFFER|DSBCAPS_STATIC|DSBCAPS_CTRLALL|DSBCAPS_LOCSOFTWARE;
caps->dwBufferBytes = 0; caps->dwBufferBytes = 65536;
caps->dwUnlockTransferRate = 0; caps->dwUnlockTransferRate = 0;
caps->dwPlayCpuOverhead = 0; caps->dwPlayCpuOverhead = 0;
return DS_OK; return DS_OK;
...@@ -493,7 +493,7 @@ static HRESULT WINAPI IDirectSound_GetCaps(LPDIRECTSOUND this,LPDSCAPS caps) { ...@@ -493,7 +493,7 @@ static HRESULT WINAPI IDirectSound_GetCaps(LPDIRECTSOUND this,LPDSCAPS caps) {
TRACE(dsound,"(flags=0x%08lx)\n",caps->dwFlags); TRACE(dsound,"(flags=0x%08lx)\n",caps->dwFlags);
caps->dwSize = sizeof(*caps); caps->dwSize = sizeof(*caps);
caps->dwFlags = DSCAPS_PRIMARYSTEREO|DSCAPS_PRIMARY16BIT|DSCAPS_EMULDRIVER|DSCAPS_SECONDARYSTEREO|DSCAPS_SECONDARY16BIT; caps->dwFlags = DSCAPS_PRIMARYSTEREO|DSCAPS_PRIMARY16BIT|DSCAPS_SECONDARYSTEREO|DSCAPS_SECONDARY16BIT;
/* FIXME: query OSS */ /* FIXME: query OSS */
caps->dwMinSecondarySampleRate = 22050; caps->dwMinSecondarySampleRate = 22050;
caps->dwMaxSecondarySampleRate = 48000; caps->dwMaxSecondarySampleRate = 48000;
...@@ -503,10 +503,12 @@ static HRESULT WINAPI IDirectSound_GetCaps(LPDIRECTSOUND this,LPDSCAPS caps) { ...@@ -503,10 +503,12 @@ static HRESULT WINAPI IDirectSound_GetCaps(LPDIRECTSOUND this,LPDSCAPS caps) {
} }
static ULONG WINAPI IDirectSound_AddRef(LPDIRECTSOUND this) { static ULONG WINAPI IDirectSound_AddRef(LPDIRECTSOUND this) {
TRACE(dsound,"(%p), ref was %d\n",this,this->ref);
return ++(this->ref); return ++(this->ref);
} }
static ULONG WINAPI IDirectSound_Release(LPDIRECTSOUND this) { static ULONG WINAPI IDirectSound_Release(LPDIRECTSOUND this) {
TRACE(dsound,"(%p), ref was %d\n",this,this->ref);
if (!--(this->ref)) { if (!--(this->ref)) {
HeapFree(GetProcessHeap(),0,this); HeapFree(GetProcessHeap(),0,this);
dsound = NULL; dsound = NULL;
...@@ -922,11 +924,11 @@ DSOUND_thread(LPVOID arg) { ...@@ -922,11 +924,11 @@ DSOUND_thread(LPVOID arg) {
if (!dsound->nrofbuffers) { if (!dsound->nrofbuffers) {
/* no soundbuffer yet... wait. */ /* no soundbuffer yet... wait. */
Sleep(1000); Sleep(1000);
dsound->lpvtbl->fnRelease(dsound);
continue; continue;
} }
memset(playbuf,0,sizeof(playbuf)); memset(playbuf,0,sizeof(playbuf));
playing = 0; playing = 0;
dsound->lpvtbl->fnAddRef(dsound);
haveprimary = 0; haveprimary = 0;
for (i=dsound->nrofbuffers;i--;) { for (i=dsound->nrofbuffers;i--;) {
IDirectSoundBuffer *dsb = dsound->buffers[i]; IDirectSoundBuffer *dsb = dsound->buffers[i];
......
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