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
4a37f2f0
Commit
4a37f2f0
authored
May 02, 2011
by
Andrew Eikum
Committed by
Alexandre Julliard
May 02, 2011
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
mmdevapi: Initialize global driver data at DLL load time.
parent
cefcadcc
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
35 additions
and
19 deletions
+35
-19
main.c
dlls/mmdevapi/main.c
+1
-1
mmdevdrv.c
dlls/winealsa.drv/mmdevdrv.c
+12
-6
mmdevdrv.c
dlls/winecoreaudio.drv/mmdevdrv.c
+11
-6
mmdevdrv.c
dlls/wineoss.drv/mmdevdrv.c
+11
-6
No files found.
dlls/mmdevapi/main.c
View file @
4a37f2f0
...
...
@@ -72,7 +72,7 @@ static BOOL load_driver(const WCHAR *name)
}
#define LDFC(n) do { drvs.p##n = (void*)GetProcAddress(drvs.module, #n);\
if(!drvs.p##n)
return FALSE;
} while(0);
if(!drvs.p##n)
{ FreeLibrary(drvs.module); return FALSE; }
} while(0);
LDFC
(
GetEndpointIDs
);
LDFC
(
GetAudioEndpoint
);
#undef LDFC
...
...
dlls/winealsa.drv/mmdevdrv.c
View file @
4a37f2f0
...
...
@@ -140,6 +140,18 @@ static inline ACImpl *impl_from_IAudioClock2(IAudioClock2 *iface)
return
CONTAINING_RECORD
(
iface
,
ACImpl
,
IAudioClock2_iface
);
}
BOOL
WINAPI
DllMain
(
HINSTANCE
dll
,
DWORD
reason
,
void
*
reserved
)
{
if
(
reason
==
DLL_PROCESS_ATTACH
){
g_timer_q
=
CreateTimerQueue
();
if
(
!
g_timer_q
)
return
FALSE
;
}
return
TRUE
;
}
HRESULT
WINAPI
AUDDRV_GetEndpointIDs
(
EDataFlow
flow
,
WCHAR
***
ids
,
void
***
keys
,
UINT
*
num
,
UINT
*
def_index
)
{
...
...
@@ -175,12 +187,6 @@ HRESULT WINAPI AUDDRV_GetAudioEndpoint(void *key, IMMDevice *dev,
TRACE
(
"%p %p %d %p
\n
"
,
key
,
dev
,
dataflow
,
out
);
if
(
!
g_timer_q
){
g_timer_q
=
CreateTimerQueue
();
if
(
!
g_timer_q
)
return
E_FAIL
;
}
This
=
HeapAlloc
(
GetProcessHeap
(),
HEAP_ZERO_MEMORY
,
sizeof
(
ACImpl
));
if
(
!
This
)
return
E_OUTOFMEMORY
;
...
...
dlls/winecoreaudio.drv/mmdevdrv.c
View file @
4a37f2f0
...
...
@@ -159,6 +159,17 @@ static inline ACImpl *impl_from_IAudioClock2(IAudioClock2 *iface)
return
CONTAINING_RECORD
(
iface
,
ACImpl
,
IAudioClock2_iface
);
}
BOOL
WINAPI
DllMain
(
HINSTANCE
dll
,
DWORD
reason
,
void
*
reserved
)
{
if
(
reason
==
DLL_PROCESS_ATTACH
){
g_timer_q
=
CreateTimerQueue
();
if
(
!
g_timer_q
)
return
FALSE
;
}
return
TRUE
;
}
HRESULT
WINAPI
AUDDRV_GetEndpointIDs
(
EDataFlow
flow
,
WCHAR
***
ids
,
AudioDeviceID
***
keys
,
UINT
*
num
,
UINT
*
def_index
)
{
...
...
@@ -344,12 +355,6 @@ HRESULT WINAPI AUDDRV_GetAudioEndpoint(AudioDeviceID *adevid, IMMDevice *dev,
TRACE
(
"%p %d %p
\n
"
,
dev
,
dataflow
,
out
);
if
(
!
g_timer_q
){
g_timer_q
=
CreateTimerQueue
();
if
(
!
g_timer_q
)
return
E_FAIL
;
}
This
=
HeapAlloc
(
GetProcessHeap
(),
HEAP_ZERO_MEMORY
,
sizeof
(
ACImpl
));
if
(
!
This
)
return
E_OUTOFMEMORY
;
...
...
dlls/wineoss.drv/mmdevdrv.c
View file @
4a37f2f0
...
...
@@ -151,6 +151,17 @@ static inline ACImpl *impl_from_IAudioClock2(IAudioClock2 *iface)
return
CONTAINING_RECORD
(
iface
,
ACImpl
,
IAudioClock2_iface
);
}
BOOL
WINAPI
DllMain
(
HINSTANCE
dll
,
DWORD
reason
,
void
*
reserved
)
{
if
(
reason
==
DLL_PROCESS_ATTACH
){
g_timer_q
=
CreateTimerQueue
();
if
(
!
g_timer_q
)
return
FALSE
;
}
return
TRUE
;
}
HRESULT
WINAPI
AUDDRV_GetEndpointIDs
(
EDataFlow
flow
,
WCHAR
***
ids
,
void
***
keys
,
UINT
*
num
,
UINT
*
def_index
)
{
...
...
@@ -268,12 +279,6 @@ HRESULT WINAPI AUDDRV_GetAudioEndpoint(char *devnode, IMMDevice *dev,
TRACE
(
"%s %p %d %p
\n
"
,
devnode
,
dev
,
dataflow
,
out
);
if
(
!
g_timer_q
){
g_timer_q
=
CreateTimerQueue
();
if
(
!
g_timer_q
)
return
E_UNEXPECTED
;
}
This
=
HeapAlloc
(
GetProcessHeap
(),
HEAP_ZERO_MEMORY
,
sizeof
(
ACImpl
));
if
(
!
This
)
return
E_OUTOFMEMORY
;
...
...
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