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
a20e1df9
Commit
a20e1df9
authored
Mar 03, 2023
by
Davide Beatrici
Committed by
Alexandre Julliard
Mar 06, 2023
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
mmdevapi: Move test_connect handling into mmdevapi.
parent
ec9aab2c
Hide whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
17 additions
and
42 deletions
+17
-42
main.c
dlls/mmdevapi/main.c
+15
-3
mmdevapi.h
dlls/mmdevapi/mmdevapi.h
+2
-3
mmdevdrv.c
dlls/winealsa.drv/mmdevdrv.c
+0
-5
winealsa.drv.spec
dlls/winealsa.drv/winealsa.drv.spec
+0
-1
mmdevdrv.c
dlls/winecoreaudio.drv/mmdevdrv.c
+0
-5
winecoreaudio.drv.spec
dlls/winecoreaudio.drv/winecoreaudio.drv.spec
+0
-1
mmdevdrv.c
dlls/wineoss.drv/mmdevdrv.c
+0
-11
wineoss.drv.spec
dlls/wineoss.drv/wineoss.drv.spec
+0
-1
mmdevdrv.c
dlls/winepulse.drv/mmdevdrv.c
+0
-11
winepulse.drv.spec
dlls/winepulse.drv/winepulse.drv.spec
+0
-1
No files found.
dlls/mmdevapi/main.c
View file @
a20e1df9
...
...
@@ -18,6 +18,7 @@
*/
#include <stdarg.h>
#include <wchar.h>
#include "ntstatus.h"
#define COBJMACROS
...
...
@@ -68,7 +69,8 @@ static const char *get_priority_string(int prio)
static
BOOL
load_driver
(
const
WCHAR
*
name
,
DriverFuncs
*
driver
)
{
NTSTATUS
status
;
WCHAR
driver_module
[
264
];
WCHAR
driver_module
[
264
],
path
[
MAX_PATH
];
struct
test_connect_params
params
;
lstrcpyW
(
driver_module
,
L"wine"
);
lstrcatW
(
driver_module
,
name
);
...
...
@@ -96,7 +98,6 @@ static BOOL load_driver(const WCHAR *name, DriverFuncs *driver)
#define LDFC(n) do { driver->p##n = (void*)GetProcAddress(driver->module, #n);\
if(!driver->p##n) { goto fail; } } while(0)
LDFC
(
GetPriority
);
LDFC
(
GetEndpointIDs
);
LDFC
(
GetAudioEndpoint
);
LDFC
(
GetAudioSessionManager
);
...
...
@@ -105,7 +106,18 @@ static BOOL load_driver(const WCHAR *name, DriverFuncs *driver)
/* optional - do not fail if not found */
driver
->
pGetPropValue
=
(
void
*
)
GetProcAddress
(
driver
->
module
,
"GetPropValue"
);
driver
->
priority
=
driver
->
pGetPriority
();
GetModuleFileNameW
(
NULL
,
path
,
ARRAY_SIZE
(
path
));
params
.
name
=
wcsrchr
(
path
,
'\\'
);
params
.
name
=
params
.
name
?
params
.
name
+
1
:
path
;
params
.
priority
=
Priority_Neutral
;
if
((
status
=
__wine_unix_call
(
driver
->
module_unixlib
,
test_connect
,
&
params
)))
{
ERR
(
"Unable to retrieve driver priority: %lx
\n
"
,
status
);
goto
fail
;
}
driver
->
priority
=
params
.
priority
;
lstrcpyW
(
driver
->
module_name
,
driver_module
);
TRACE
(
"Successfully loaded %s with priority %s
\n
"
,
...
...
dlls/mmdevapi/mmdevapi.h
View file @
a20e1df9
...
...
@@ -30,13 +30,12 @@ typedef struct _DriverFuncs {
HMODULE
module
;
unixlib_handle_t
module_unixlib
;
WCHAR
module_name
[
64
];
int
priority
;
/*
Returns a "priority" value for the driver.
Highest priority wins.
/* Highest priority wins.
* If multiple drivers think they are valid, they will return a
* priority value reflecting the likelihood that they are actually
* valid. See enum _DriverPriority. */
int
(
WINAPI
*
pGetPriority
)(
void
)
;
int
priority
;
/* ids gets an array of human-friendly endpoint names
* keys gets an array of driver-specific stuff that is used
...
...
dlls/winealsa.drv/mmdevdrv.c
View file @
a20e1df9
...
...
@@ -212,11 +212,6 @@ BOOL WINAPI DllMain(HINSTANCE dll, DWORD reason, void *reserved)
return
TRUE
;
}
int
WINAPI
AUDDRV_GetPriority
(
void
)
{
return
Priority_Neutral
;
}
static
HRESULT
alsa_stream_release
(
stream_handle
stream
,
HANDLE
timer_thread
)
{
struct
release_stream_params
params
;
...
...
dlls/winealsa.drv/winealsa.drv.spec
View file @
a20e1df9
...
...
@@ -4,7 +4,6 @@
@ stdcall -private modMessage(long long long long long) ALSA_modMessage
# MMDevAPI driver functions
@ stdcall -private GetPriority() AUDDRV_GetPriority
@ stdcall -private GetEndpointIDs(long ptr ptr ptr ptr) AUDDRV_GetEndpointIDs
@ stdcall -private GetAudioEndpoint(ptr ptr ptr) AUDDRV_GetAudioEndpoint
@ stdcall -private GetAudioSessionManager(ptr ptr) AUDDRV_GetAudioSessionManager
...
...
dlls/winecoreaudio.drv/mmdevdrv.c
View file @
a20e1df9
...
...
@@ -213,11 +213,6 @@ BOOL WINAPI DllMain(HINSTANCE dll, DWORD reason, void *reserved)
return
TRUE
;
}
int
WINAPI
AUDDRV_GetPriority
(
void
)
{
return
Priority_Neutral
;
}
static
void
set_device_guid
(
EDataFlow
flow
,
HKEY
drv_key
,
const
WCHAR
*
key_name
,
GUID
*
guid
)
{
...
...
dlls/winecoreaudio.drv/winecoreaudio.drv.spec
View file @
a20e1df9
...
...
@@ -4,7 +4,6 @@
@ stdcall -private modMessage(long long long long long) CoreAudio_modMessage
# MMDevAPI driver functions
@ stdcall -private GetPriority() AUDDRV_GetPriority
@ stdcall -private GetEndpointIDs(long ptr ptr ptr ptr) AUDDRV_GetEndpointIDs
@ stdcall -private GetAudioEndpoint(ptr ptr ptr) AUDDRV_GetAudioEndpoint
@ stdcall -private GetAudioSessionManager(ptr ptr) AUDDRV_GetAudioSessionManager
dlls/wineoss.drv/mmdevdrv.c
View file @
a20e1df9
...
...
@@ -226,17 +226,6 @@ BOOL WINAPI DllMain(HINSTANCE dll, DWORD reason, void *reserved)
return
TRUE
;
}
int
WINAPI
AUDDRV_GetPriority
(
void
)
{
struct
test_connect_params
params
;
params
.
name
=
NULL
;
OSS_CALL
(
test_connect
,
&
params
);
return
params
.
priority
;
}
static
HRESULT
stream_release
(
stream_handle
stream
,
HANDLE
timer_thread
)
{
struct
release_stream_params
params
;
...
...
dlls/wineoss.drv/wineoss.drv.spec
View file @
a20e1df9
...
...
@@ -5,7 +5,6 @@
@ stdcall -private modMessage(long long long long long) OSS_modMessage
# MMDevAPI driver functions
@ stdcall -private GetPriority() AUDDRV_GetPriority
@ stdcall -private GetEndpointIDs(long ptr ptr ptr ptr) AUDDRV_GetEndpointIDs
@ stdcall -private GetAudioEndpoint(ptr ptr ptr) AUDDRV_GetAudioEndpoint
@ stdcall -private GetAudioSessionManager(ptr ptr) AUDDRV_GetAudioSessionManager
dlls/winepulse.drv/mmdevdrv.c
View file @
a20e1df9
...
...
@@ -467,17 +467,6 @@ end:
return
params
.
result
;
}
int
WINAPI
AUDDRV_GetPriority
(
void
)
{
struct
test_connect_params
params
;
WCHAR
*
name
;
params
.
name
=
name
=
get_application_name
(
FALSE
);
pulse_call
(
test_connect
,
&
params
);
free
(
name
);
return
params
.
priority
;
}
static
BOOL
get_pulse_name_by_guid
(
const
GUID
*
guid
,
char
pulse_name
[
MAX_PULSE_NAME_LEN
],
EDataFlow
*
flow
)
{
struct
device_cache
*
device
;
...
...
dlls/winepulse.drv/winepulse.drv.spec
View file @
a20e1df9
# MMDevAPI driver functions
@ stdcall -private GetPriority() AUDDRV_GetPriority
@ stdcall -private GetEndpointIDs(long ptr ptr ptr ptr) AUDDRV_GetEndpointIDs
@ stdcall -private GetAudioEndpoint(ptr ptr ptr) AUDDRV_GetAudioEndpoint
@ stdcall -private GetAudioSessionManager(ptr ptr) AUDDRV_GetAudioSessionManager
...
...
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