Commit 0b7b6d10 authored by Arkadiusz Hiler's avatar Arkadiusz Hiler Committed by Alexandre Julliard

dsound: Get rid of DSOUND_capturers and related lock.

Ever since dcaeb6b4 ("dsound: Allow multiple buffers to capture from the same device.") it's not used for anything.
parent c95ec723
...@@ -848,10 +848,6 @@ static ULONG DirectSoundCaptureDevice_Release( ...@@ -848,10 +848,6 @@ static ULONG DirectSoundCaptureDevice_Release(
if (!ref) { if (!ref) {
TRACE("deleting object\n"); TRACE("deleting object\n");
EnterCriticalSection(&DSOUND_capturers_lock);
list_remove(&device->entry);
LeaveCriticalSection(&DSOUND_capturers_lock);
if (device->capture_buffer) if (device->capture_buffer)
IDirectSoundCaptureBufferImpl_Release(&device->capture_buffer->IDirectSoundCaptureBuffer8_iface); IDirectSoundCaptureBufferImpl_Release(&device->capture_buffer->IDirectSoundCaptureBuffer8_iface);
...@@ -1027,12 +1023,9 @@ static HRESULT DirectSoundCaptureDevice_Initialize( ...@@ -1027,12 +1023,9 @@ static HRESULT DirectSoundCaptureDevice_Initialize(
if(FAILED(hr)) if(FAILED(hr))
return hr; return hr;
EnterCriticalSection(&DSOUND_capturers_lock);
hr = DirectSoundCaptureDevice_Create(&device); hr = DirectSoundCaptureDevice_Create(&device);
if (hr != DS_OK) { if (hr != DS_OK) {
WARN("DirectSoundCaptureDevice_Create failed\n"); WARN("DirectSoundCaptureDevice_Create failed\n");
LeaveCriticalSection(&DSOUND_capturers_lock);
return hr; return hr;
} }
...@@ -1050,7 +1043,6 @@ static HRESULT DirectSoundCaptureDevice_Initialize( ...@@ -1050,7 +1043,6 @@ static HRESULT DirectSoundCaptureDevice_Initialize(
device->lock.DebugInfo->Spare[0] = 0; device->lock.DebugInfo->Spare[0] = 0;
DeleteCriticalSection(&device->lock); DeleteCriticalSection(&device->lock);
free(device); free(device);
LeaveCriticalSection(&DSOUND_capturers_lock);
return DSERR_NODRIVER; return DSERR_NODRIVER;
} }
...@@ -1063,12 +1055,8 @@ static HRESULT DirectSoundCaptureDevice_Initialize( ...@@ -1063,12 +1055,8 @@ static HRESULT DirectSoundCaptureDevice_Initialize(
} }
IAudioClient_Release(client); IAudioClient_Release(client);
list_add_tail(&DSOUND_capturers, &device->entry);
*ppDevice = device; *ppDevice = device;
LeaveCriticalSection(&DSOUND_capturers_lock);
return S_OK; return S_OK;
} }
......
...@@ -73,16 +73,6 @@ static CRITICAL_SECTION_DEBUG DSOUND_renderers_lock_debug = ...@@ -73,16 +73,6 @@ static CRITICAL_SECTION_DEBUG DSOUND_renderers_lock_debug =
}; };
CRITICAL_SECTION DSOUND_renderers_lock = { &DSOUND_renderers_lock_debug, -1, 0, 0, 0, 0 }; CRITICAL_SECTION DSOUND_renderers_lock = { &DSOUND_renderers_lock_debug, -1, 0, 0, 0, 0 };
struct list DSOUND_capturers = LIST_INIT(DSOUND_capturers);
CRITICAL_SECTION DSOUND_capturers_lock;
static CRITICAL_SECTION_DEBUG DSOUND_capturers_lock_debug =
{
0, 0, &DSOUND_capturers_lock,
{ &DSOUND_capturers_lock_debug.ProcessLocksList, &DSOUND_capturers_lock_debug.ProcessLocksList },
0, 0, { (DWORD_PTR)(__FILE__ ": DSOUND_capturers_lock") }
};
CRITICAL_SECTION DSOUND_capturers_lock = { &DSOUND_capturers_lock_debug, -1, 0, 0, 0, 0 };
GUID DSOUND_renderer_guids[MAXWAVEDRIVERS]; GUID DSOUND_renderer_guids[MAXWAVEDRIVERS];
GUID DSOUND_capture_guids[MAXWAVEDRIVERS]; GUID DSOUND_capture_guids[MAXWAVEDRIVERS];
...@@ -779,7 +769,6 @@ BOOL WINAPI DllMain(HINSTANCE hInstDLL, DWORD fdwReason, LPVOID lpvReserved) ...@@ -779,7 +769,6 @@ BOOL WINAPI DllMain(HINSTANCE hInstDLL, DWORD fdwReason, LPVOID lpvReserved)
case DLL_PROCESS_DETACH: case DLL_PROCESS_DETACH:
if (lpvReserved) break; if (lpvReserved) break;
DeleteCriticalSection(&DSOUND_renderers_lock); DeleteCriticalSection(&DSOUND_renderers_lock);
DeleteCriticalSection(&DSOUND_capturers_lock);
break; break;
} }
return TRUE; return TRUE;
......
...@@ -253,8 +253,6 @@ HRESULT IDirectSoundCaptureImpl_Create(IUnknown *outer_unk, REFIID riid, void ** ...@@ -253,8 +253,6 @@ HRESULT IDirectSoundCaptureImpl_Create(IUnknown *outer_unk, REFIID riid, void **
#define STATE_STOPPING 3 #define STATE_STOPPING 3
extern CRITICAL_SECTION DSOUND_renderers_lock; extern CRITICAL_SECTION DSOUND_renderers_lock;
extern CRITICAL_SECTION DSOUND_capturers_lock;
extern struct list DSOUND_capturers;
extern struct list DSOUND_renderers; extern struct list DSOUND_renderers;
extern GUID DSOUND_renderer_guids[MAXWAVEDRIVERS]; extern GUID DSOUND_renderer_guids[MAXWAVEDRIVERS];
......
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