Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-winehq
Commits
39e12238
Commit
39e12238
authored
Oct 27, 2011
by
Francois Gouget
Committed by
Alexandre Julliard
Oct 27, 2011
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
winealsa.drv: Give a name to the mmdevapi critical sections.
Also statically initialize g_sessions_lock.
parent
23e0ae83
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
2 deletions
+10
-2
mmdevdrv.c
dlls/winealsa.drv/mmdevdrv.c
+10
-2
No files found.
dlls/winealsa.drv/mmdevdrv.c
View file @
39e12238
...
@@ -142,6 +142,13 @@ typedef struct _SessionMgr {
...
@@ -142,6 +142,13 @@ typedef struct _SessionMgr {
static
HANDLE
g_timer_q
;
static
HANDLE
g_timer_q
;
static
CRITICAL_SECTION
g_sessions_lock
;
static
CRITICAL_SECTION
g_sessions_lock
;
static
CRITICAL_SECTION_DEBUG
g_sessions_lock_debug
=
{
0
,
0
,
&
g_sessions_lock
,
{
&
g_sessions_lock_debug
.
ProcessLocksList
,
&
g_sessions_lock_debug
.
ProcessLocksList
},
0
,
0
,
{
(
DWORD_PTR
)(
__FILE__
": g_sessions_lock"
)
}
};
static
CRITICAL_SECTION
g_sessions_lock
=
{
&
g_sessions_lock_debug
,
-
1
,
0
,
0
,
0
,
0
};
static
struct
list
g_sessions
=
LIST_INIT
(
g_sessions
);
static
struct
list
g_sessions
=
LIST_INIT
(
g_sessions
);
static
const
WCHAR
defaultW
[]
=
{
'd'
,
'e'
,
'f'
,
'a'
,
'u'
,
'l'
,
't'
,
0
};
static
const
WCHAR
defaultW
[]
=
{
'd'
,
'e'
,
'f'
,
'a'
,
'u'
,
'l'
,
't'
,
0
};
...
@@ -216,8 +223,6 @@ BOOL WINAPI DllMain(HINSTANCE dll, DWORD reason, void *reserved)
...
@@ -216,8 +223,6 @@ BOOL WINAPI DllMain(HINSTANCE dll, DWORD reason, void *reserved)
g_timer_q
=
CreateTimerQueue
();
g_timer_q
=
CreateTimerQueue
();
if
(
!
g_timer_q
)
if
(
!
g_timer_q
)
return
FALSE
;
return
FALSE
;
InitializeCriticalSection
(
&
g_sessions_lock
);
}
}
return
TRUE
;
return
TRUE
;
...
@@ -586,6 +591,7 @@ HRESULT WINAPI AUDDRV_GetAudioEndpoint(const char *key, IMMDevice *dev,
...
@@ -586,6 +591,7 @@ HRESULT WINAPI AUDDRV_GetAudioEndpoint(const char *key, IMMDevice *dev,
}
}
InitializeCriticalSection
(
&
This
->
lock
);
InitializeCriticalSection
(
&
This
->
lock
);
This
->
lock
.
DebugInfo
->
Spare
[
0
]
=
(
DWORD_PTR
)(
__FILE__
": ACImpl.lock"
);
This
->
parent
=
dev
;
This
->
parent
=
dev
;
IMMDevice_AddRef
(
This
->
parent
);
IMMDevice_AddRef
(
This
->
parent
);
...
@@ -632,6 +638,7 @@ static ULONG WINAPI AudioClient_Release(IAudioClient *iface)
...
@@ -632,6 +638,7 @@ static ULONG WINAPI AudioClient_Release(IAudioClient *iface)
if
(
!
ref
){
if
(
!
ref
){
IAudioClient_Stop
(
iface
);
IAudioClient_Stop
(
iface
);
IMMDevice_Release
(
This
->
parent
);
IMMDevice_Release
(
This
->
parent
);
This
->
lock
.
DebugInfo
->
Spare
[
0
]
=
0
;
DeleteCriticalSection
(
&
This
->
lock
);
DeleteCriticalSection
(
&
This
->
lock
);
snd_pcm_drop
(
This
->
pcm_handle
);
snd_pcm_drop
(
This
->
pcm_handle
);
snd_pcm_close
(
This
->
pcm_handle
);
snd_pcm_close
(
This
->
pcm_handle
);
...
@@ -744,6 +751,7 @@ static AudioSession *create_session(const GUID *guid, IMMDevice *device,
...
@@ -744,6 +751,7 @@ static AudioSession *create_session(const GUID *guid, IMMDevice *device,
list_add_head
(
&
g_sessions
,
&
ret
->
entry
);
list_add_head
(
&
g_sessions
,
&
ret
->
entry
);
InitializeCriticalSection
(
&
ret
->
lock
);
InitializeCriticalSection
(
&
ret
->
lock
);
ret
->
lock
.
DebugInfo
->
Spare
[
0
]
=
(
DWORD_PTR
)(
__FILE__
": AudioSession.lock"
);
session_init_vols
(
ret
,
num_channels
);
session_init_vols
(
ret
,
num_channels
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment