Mainly for simplicity.
Signed-off-by: Huw Davies huw@codeweavers.com --- dlls/wineoss.drv/mmdevdrv.c | 21 ++++++++------------- 1 file changed, 8 insertions(+), 13 deletions(-)
diff --git a/dlls/wineoss.drv/mmdevdrv.c b/dlls/wineoss.drv/mmdevdrv.c index eb0ab7b8fc7..af49c88e6cf 100644 --- a/dlls/wineoss.drv/mmdevdrv.c +++ b/dlls/wineoss.drv/mmdevdrv.c @@ -81,8 +81,6 @@ typedef struct _AudioSession { float *channel_vols; BOOL mute;
- CRITICAL_SECTION lock; - struct list entry; } AudioSession;
@@ -835,9 +833,6 @@ static AudioSession *create_session(const GUID *guid, IMMDevice *device,
list_add_head(&g_sessions, &ret->entry);
- InitializeCriticalSection(&ret->lock); - ret->lock.DebugInfo->Spare[0] = (DWORD_PTR)(__FILE__ ": AudioSession.lock"); - session_init_vols(ret, num_channels);
ret->master_vol = 1.f; @@ -2565,13 +2560,13 @@ static HRESULT WINAPI SimpleAudioVolume_SetMasterVolume( if(context) FIXME("Notifications not supported yet\n");
- EnterCriticalSection(&session->lock); + EnterCriticalSection(&g_sessions_lock);
session->master_vol = level;
TRACE("OSS doesn't support setting volume\n");
- LeaveCriticalSection(&session->lock); + LeaveCriticalSection(&g_sessions_lock);
return S_OK; } @@ -2600,11 +2595,11 @@ static HRESULT WINAPI SimpleAudioVolume_SetMute(ISimpleAudioVolume *iface,
TRACE("(%p)->(%u, %s)\n", session, mute, debugstr_guid(context));
- EnterCriticalSection(&session->lock); + EnterCriticalSection(&g_sessions_lock);
session->mute = mute;
- LeaveCriticalSection(&session->lock); + LeaveCriticalSection(&g_sessions_lock);
return S_OK; } @@ -2856,13 +2851,13 @@ static HRESULT WINAPI ChannelAudioVolume_SetChannelVolume( if(context) FIXME("Notifications not supported yet\n");
- EnterCriticalSection(&session->lock); + EnterCriticalSection(&g_sessions_lock);
session->channel_vols[index] = level;
TRACE("OSS doesn't support setting volume\n");
- LeaveCriticalSection(&session->lock); + LeaveCriticalSection(&g_sessions_lock);
return S_OK; } @@ -2906,14 +2901,14 @@ static HRESULT WINAPI ChannelAudioVolume_SetAllVolumes( if(context) FIXME("Notifications not supported yet\n");
- EnterCriticalSection(&session->lock); + EnterCriticalSection(&g_sessions_lock);
for(i = 0; i < count; ++i) session->channel_vols[i] = levels[i];
TRACE("OSS doesn't support setting volume\n");
- LeaveCriticalSection(&session->lock); + LeaveCriticalSection(&g_sessions_lock);
return S_OK; }