Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
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-cw
Commits
68dc1468
Commit
68dc1468
authored
Nov 15, 2011
by
Francois Gouget
Committed by
Alexandre Julliard
Nov 15, 2011
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
dsound: Give a name to the critical sections, make them static and delete them…
dsound: Give a name to the critical sections, make them static and delete them when unloading the dll.
parent
1c3617a2
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
24 additions
and
3 deletions
+24
-3
dsound_main.c
dlls/dsound/dsound_main.c
+24
-3
No files found.
dlls/dsound/dsound_main.c
View file @
68dc1468
...
...
@@ -67,15 +67,36 @@ WINE_DEFAULT_DEBUG_CHANNEL(dsound);
struct
list
DSOUND_renderers
=
LIST_INIT
(
DSOUND_renderers
);
CRITICAL_SECTION
DSOUND_renderers_lock
;
static
CRITICAL_SECTION_DEBUG
DSOUND_renderers_lock_debug
=
{
0
,
0
,
&
DSOUND_renderers_lock
,
{
&
DSOUND_renderers_lock_debug
.
ProcessLocksList
,
&
DSOUND_renderers_lock_debug
.
ProcessLocksList
},
0
,
0
,
{
(
DWORD_PTR
)(
__FILE__
": DSOUND_renderers_lock"
)
}
};
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
];
static
IMMDeviceEnumerator
*
g_devenum
;
static
CRITICAL_SECTION
g_devenum_lock
;
static
CRITICAL_SECTION_DEBUG
g_devenum_lock_debug
=
{
0
,
0
,
&
g_devenum_lock
,
{
&
g_devenum_lock_debug
.
ProcessLocksList
,
&
g_devenum_lock_debug
.
ProcessLocksList
},
0
,
0
,
{
(
DWORD_PTR
)(
__FILE__
": g_devenum_lock"
)
}
};
static
CRITICAL_SECTION
g_devenum_lock
=
{
&
g_devenum_lock_debug
,
-
1
,
0
,
0
,
0
,
0
};
static
HANDLE
g_devenum_thread
;
WCHAR
wine_vxd_drv
[]
=
{
'w'
,
'i'
,
'n'
,
'e'
,
'm'
,
'm'
,
'.'
,
'v'
,
'x'
,
'd'
,
0
};
...
...
@@ -867,12 +888,12 @@ BOOL WINAPI DllMain(HINSTANCE hInstDLL, DWORD fdwReason, LPVOID lpvReserved)
DisableThreadLibraryCalls
(
hInstDLL
);
/* Increase refcount on dsound by 1 */
GetModuleHandleExW
(
GET_MODULE_HANDLE_EX_FLAG_FROM_ADDRESS
,
(
LPCWSTR
)
hInstDLL
,
&
hInstDLL
);
InitializeCriticalSection
(
&
DSOUND_renderers_lock
);
InitializeCriticalSection
(
&
DSOUND_capturers_lock
);
InitializeCriticalSection
(
&
g_devenum_lock
);
break
;
case
DLL_PROCESS_DETACH
:
TRACE
(
"DLL_PROCESS_DETACH
\n
"
);
DeleteCriticalSection
(
&
DSOUND_renderers_lock
);
DeleteCriticalSection
(
&
DSOUND_capturers_lock
);
DeleteCriticalSection
(
&
g_devenum_lock
);
break
;
default:
TRACE
(
"UNKNOWN REASON
\n
"
);
...
...
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