Module: wine Branch: master Commit: 0b7b6d10506aa4c97f6e25ef7e3577cdd5221f3f URL: https://gitlab.winehq.org/wine/wine/-/commit/0b7b6d10506aa4c97f6e25ef7e3577c...
Author: Arkadiusz Hiler ahiler@codeweavers.com Date: Wed Sep 13 19:08:50 2023 +0300
dsound: Get rid of DSOUND_capturers and related lock.
Ever since dcaeb6b4fdf8 ("dsound: Allow multiple buffers to capture from the same device.") it's not used for anything.
---
dlls/dsound/capture.c | 12 ------------ dlls/dsound/dsound_main.c | 11 ----------- dlls/dsound/dsound_private.h | 2 -- 3 files changed, 25 deletions(-)
diff --git a/dlls/dsound/capture.c b/dlls/dsound/capture.c index 9efef54a2bd..ca01543f358 100644 --- a/dlls/dsound/capture.c +++ b/dlls/dsound/capture.c @@ -848,10 +848,6 @@ static ULONG DirectSoundCaptureDevice_Release( if (!ref) { TRACE("deleting object\n");
- EnterCriticalSection(&DSOUND_capturers_lock); - list_remove(&device->entry); - LeaveCriticalSection(&DSOUND_capturers_lock); - if (device->capture_buffer) IDirectSoundCaptureBufferImpl_Release(&device->capture_buffer->IDirectSoundCaptureBuffer8_iface);
@@ -1027,12 +1023,9 @@ static HRESULT DirectSoundCaptureDevice_Initialize( if(FAILED(hr)) return hr;
- EnterCriticalSection(&DSOUND_capturers_lock); - hr = DirectSoundCaptureDevice_Create(&device); if (hr != DS_OK) { WARN("DirectSoundCaptureDevice_Create failed\n"); - LeaveCriticalSection(&DSOUND_capturers_lock); return hr; }
@@ -1050,7 +1043,6 @@ static HRESULT DirectSoundCaptureDevice_Initialize( device->lock.DebugInfo->Spare[0] = 0; DeleteCriticalSection(&device->lock); free(device); - LeaveCriticalSection(&DSOUND_capturers_lock); return DSERR_NODRIVER; }
@@ -1063,12 +1055,8 @@ static HRESULT DirectSoundCaptureDevice_Initialize( } IAudioClient_Release(client);
- list_add_tail(&DSOUND_capturers, &device->entry); - *ppDevice = device;
- LeaveCriticalSection(&DSOUND_capturers_lock); - return S_OK; }
diff --git a/dlls/dsound/dsound_main.c b/dlls/dsound/dsound_main.c index f0ceb2ce0b8..84a118f43aa 100644 --- a/dlls/dsound/dsound_main.c +++ b/dlls/dsound/dsound_main.c @@ -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 };
-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_capture_guids[MAXWAVEDRIVERS];
@@ -779,7 +769,6 @@ BOOL WINAPI DllMain(HINSTANCE hInstDLL, DWORD fdwReason, LPVOID lpvReserved) case DLL_PROCESS_DETACH: if (lpvReserved) break; DeleteCriticalSection(&DSOUND_renderers_lock); - DeleteCriticalSection(&DSOUND_capturers_lock); break; } return TRUE; diff --git a/dlls/dsound/dsound_private.h b/dlls/dsound/dsound_private.h index 80e6725fd27..46c150fc9fc 100644 --- a/dlls/dsound/dsound_private.h +++ b/dlls/dsound/dsound_private.h @@ -253,8 +253,6 @@ HRESULT IDirectSoundCaptureImpl_Create(IUnknown *outer_unk, REFIID riid, void ** #define STATE_STOPPING 3
extern CRITICAL_SECTION DSOUND_renderers_lock; -extern CRITICAL_SECTION DSOUND_capturers_lock; -extern struct list DSOUND_capturers; extern struct list DSOUND_renderers;
extern GUID DSOUND_renderer_guids[MAXWAVEDRIVERS];