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
906ad69b
Commit
906ad69b
authored
Aug 05, 2023
by
Davide Beatrici
Committed by
Alexandre Julliard
Aug 08, 2023
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
winepulse: Move GetPropValue into mmdevapi.
parent
c03170a9
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
34 additions
and
52 deletions
+34
-52
devenum.c
dlls/mmdevapi/devenum.c
+34
-7
main.c
dlls/mmdevapi/main.c
+0
-3
mmdevapi_private.h
dlls/mmdevapi/mmdevapi_private.h
+0
-2
mmdevdrv.c
dlls/winepulse.drv/mmdevdrv.c
+0
-39
winepulse.drv.spec
dlls/winepulse.drv/winepulse.drv.spec
+0
-1
No files found.
dlls/mmdevapi/devenum.c
View file @
906ad69b
...
...
@@ -240,21 +240,48 @@ static HRESULT MMDevice_SetPropValue(const GUID *devguid, DWORD flow, REFPROPERT
static
HRESULT
set_driver_prop_value
(
GUID
*
id
,
const
EDataFlow
flow
,
const
PROPERTYKEY
*
prop
)
{
HRESULT
hr
;
struct
get_prop_value_params
params
;
PROPVARIANT
pv
;
char
*
dev_name
;
unsigned
int
size
=
0
;
TRACE
(
"%s, (%s,%lu)
\n
"
,
wine_dbgstr_guid
(
id
),
wine_dbgstr_guid
(
&
prop
->
fmtid
),
prop
->
pid
);
if
(
!
drvs
.
p
GetPropValue
)
return
E_
NOTIMP
L
;
if
(
!
drvs
.
p
get_device_name_from_guid
(
id
,
&
dev_name
,
&
params
.
flow
)
)
return
E_
FAI
L
;
hr
=
drvs
.
pGetPropValue
(
id
,
prop
,
&
pv
);
params
.
device
=
dev_name
;
params
.
guid
=
id
;
params
.
prop
=
prop
;
params
.
value
=
&
pv
;
params
.
buffer
=
NULL
;
params
.
buffer_size
=
&
size
;
if
(
SUCCEEDED
(
hr
))
{
while
(
1
)
{
__wine_unix_call
(
drvs
.
module_unixlib
,
get_prop_value
,
&
params
);
if
(
params
.
result
!=
E_NOT_SUFFICIENT_BUFFER
)
break
;
CoTaskMemFree
(
params
.
buffer
);
params
.
buffer
=
CoTaskMemAlloc
(
*
params
.
buffer_size
);
if
(
!
params
.
buffer
)
{
free
(
dev_name
);
return
E_OUTOFMEMORY
;
}
}
if
(
FAILED
(
params
.
result
))
CoTaskMemFree
(
params
.
buffer
);
free
(
dev_name
);
if
(
SUCCEEDED
(
params
.
result
))
{
MMDevice_SetPropValue
(
id
,
flow
,
prop
,
&
pv
);
PropVariantClear
(
&
pv
);
}
return
hr
;
return
params
.
result
;
}
struct
product_name_overrides
...
...
dlls/mmdevapi/main.c
View file @
906ad69b
...
...
@@ -102,9 +102,6 @@ static BOOL load_driver(const WCHAR *name, DriverFuncs *driver)
LDFC
(
GetEndpointIDs
);
#undef LDFC
/* optional - do not fail if not found */
driver
->
pGetPropValue
=
(
void
*
)
GetProcAddress
(
driver
->
module
,
"GetPropValue"
);
GetModuleFileNameW
(
NULL
,
path
,
ARRAY_SIZE
(
path
));
params
.
name
=
wcsrchr
(
path
,
'\\'
);
params
.
name
=
params
.
name
?
params
.
name
+
1
:
path
;
...
...
dlls/mmdevapi/mmdevapi_private.h
View file @
906ad69b
...
...
@@ -50,8 +50,6 @@ typedef struct _DriverFuncs {
* all of the elements in both arrays with HeapFree() */
HRESULT
(
WINAPI
*
pGetEndpointIDs
)(
EDataFlow
flow
,
WCHAR
***
ids
,
GUID
**
guids
,
UINT
*
num
,
UINT
*
default_index
);
HRESULT
(
WINAPI
*
pGetPropValue
)(
GUID
*
guid
,
const
PROPERTYKEY
*
prop
,
PROPVARIANT
*
out
);
}
DriverFuncs
;
extern
DriverFuncs
drvs
DECLSPEC_HIDDEN
;
...
...
dlls/winepulse.drv/mmdevdrv.c
View file @
906ad69b
...
...
@@ -311,42 +311,3 @@ BOOL WINAPI get_device_name_from_guid(GUID *guid, char **name, EDataFlow *flow)
WARN
(
"No matching device in registry for GUID %s
\n
"
,
debugstr_guid
(
guid
));
return
FALSE
;
}
HRESULT
WINAPI
AUDDRV_GetPropValue
(
GUID
*
guid
,
const
PROPERTYKEY
*
prop
,
PROPVARIANT
*
out
)
{
struct
get_prop_value_params
params
;
char
*
pulse_name
;
unsigned
int
size
=
0
;
TRACE
(
"%s, (%s,%lu), %p
\n
"
,
wine_dbgstr_guid
(
guid
),
wine_dbgstr_guid
(
&
prop
->
fmtid
),
prop
->
pid
,
out
);
if
(
!
get_device_name_from_guid
(
guid
,
&
pulse_name
,
&
params
.
flow
))
return
E_FAIL
;
params
.
device
=
pulse_name
;
params
.
guid
=
guid
;
params
.
prop
=
prop
;
params
.
value
=
out
;
params
.
buffer
=
NULL
;
params
.
buffer_size
=
&
size
;
while
(
1
)
{
pulse_call
(
get_prop_value
,
&
params
);
if
(
params
.
result
!=
E_NOT_SUFFICIENT_BUFFER
)
break
;
CoTaskMemFree
(
params
.
buffer
);
params
.
buffer
=
CoTaskMemAlloc
(
*
params
.
buffer_size
);
if
(
!
params
.
buffer
)
{
free
(
pulse_name
);
return
E_OUTOFMEMORY
;
}
}
if
(
FAILED
(
params
.
result
))
CoTaskMemFree
(
params
.
buffer
);
free
(
pulse_name
);
return
params
.
result
;
}
dlls/winepulse.drv/winepulse.drv.spec
View file @
906ad69b
# MMDevAPI driver functions
@ stdcall -private get_device_name_from_guid(ptr ptr ptr) get_device_name_from_guid
@ stdcall -private GetEndpointIDs(long ptr ptr ptr ptr) AUDDRV_GetEndpointIDs
@ stdcall -private GetPropValue(ptr ptr ptr) AUDDRV_GetPropValue
# WinMM driver functions
@ stdcall -private DriverProc(long long long long long) winealsa.drv.DriverProc
...
...
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