diff options
author | Chris Robinson <[email protected]> | 2009-11-29 23:02:21 -0800 |
---|---|---|
committer | Chris Robinson <[email protected]> | 2009-11-29 23:02:21 -0800 |
commit | f63d8dbf38352b9ca0f1dc5e8eab87242c81b3ee (patch) | |
tree | 40c78b4d5fabe9a170c7b1e6a789b21766cba352 /Alc/dsound.c | |
parent | 15aad09ce73e1a71837579be96348c8708c127ea (diff) |
Enable real-time priority for ALSA, OSS, and DirectSound mixing loops
Diffstat (limited to 'Alc/dsound.c')
-rw-r--r-- | Alc/dsound.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/Alc/dsound.c b/Alc/dsound.c index 374cb00c..8d7b42b9 100644 --- a/Alc/dsound.c +++ b/Alc/dsound.c @@ -134,6 +134,8 @@ static ALuint DSoundProc(ALvoid *ptr) DWORD avail; HRESULT err; + EnableRTPrio(); + memset(&DSBCaps, 0, sizeof(DSBCaps)); DSBCaps.dwSize = sizeof(DSBCaps); err = IDirectSoundBuffer_GetCaps(pData->DSsbuffer, &DSBCaps); @@ -413,6 +415,7 @@ static ALCboolean DSoundResetPlayback(ALCdevice *device) if(SUCCEEDED(hr)) { device->ExtraData = pData; + device->Format = format; pData->thread = StartThread(DSoundProc, device); if(!pData->thread) hr = E_FAIL; @@ -429,8 +432,6 @@ static ALCboolean DSoundResetPlayback(ALCdevice *device) return ALC_FALSE; } - device->Format = format; - return ALC_TRUE; } |