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
6de9bd06
Commit
6de9bd06
authored
Apr 13, 2021
by
Andrew Eikum
Committed by
Alexandre Julliard
Apr 14, 2021
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
mmdevapi: Support device ID paths in ActivateAudioInterfaceAsync.
Signed-off-by:
Andrew Eikum
<
aeikum@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
80276752
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
1 deletion
+9
-1
main.c
dlls/mmdevapi/main.c
+9
-1
No files found.
dlls/mmdevapi/main.c
View file @
6de9bd06
...
...
@@ -413,6 +413,7 @@ static HRESULT get_mmdevice_by_activatepath(const WCHAR *path, IMMDevice **mmdev
static
const
WCHAR
DEVINTERFACE_AUDIO_RENDER_WSTR
[]
=
L"{E6327CAD-DCEC-4949-AE8A-991E976A79D2}"
;
static
const
WCHAR
DEVINTERFACE_AUDIO_CAPTURE_WSTR
[]
=
L"{2EEF81BE-33FA-4800-9670-1CD474972C3F}"
;
static
const
WCHAR
MMDEV_PATH_PREFIX
[]
=
L"
\\\\
?
\\
SWD#MMDEVAPI#"
;
hr
=
MMDevEnum_Create
(
&
IID_IMMDeviceEnumerator
,
(
void
**
)
&
devenum
);
if
(
FAILED
(
hr
))
{
...
...
@@ -424,8 +425,15 @@ static HRESULT get_mmdevice_by_activatepath(const WCHAR *path, IMMDevice **mmdev
hr
=
IMMDeviceEnumerator_GetDefaultAudioEndpoint
(
devenum
,
eRender
,
eMultimedia
,
mmdev
);
}
else
if
(
!
lstrcmpiW
(
path
,
DEVINTERFACE_AUDIO_CAPTURE_WSTR
)){
hr
=
IMMDeviceEnumerator_GetDefaultAudioEndpoint
(
devenum
,
eCapture
,
eMultimedia
,
mmdev
);
}
else
if
(
!
memcmp
(
path
,
MMDEV_PATH_PREFIX
,
sizeof
(
MMDEV_PATH_PREFIX
)
-
sizeof
(
WCHAR
)))
{
WCHAR
device_id
[
56
];
/* == strlen("{0.0.1.00000000}.{fd47d9cc-4218-4135-9ce2-0c195c87405b}") + 1 */
wcsncpy
(
device_id
,
path
+
(
ARRAY_SIZE
(
MMDEV_PATH_PREFIX
)
-
1
),
ARRAY_SIZE
(
device_id
));
device_id
[
ARRAY_SIZE
(
device_id
)
-
1
]
=
0
;
hr
=
IMMDeviceEnumerator_GetDevice
(
devenum
,
device_id
,
mmdev
);
}
else
{
FIXME
(
"
How to map path to device id?
%s
\n
"
,
debugstr_w
(
path
));
FIXME
(
"
Unrecognized device id format:
%s
\n
"
,
debugstr_w
(
path
));
hr
=
HRESULT_FROM_WIN32
(
ERROR_FILE_NOT_FOUND
);
}
...
...
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