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
81ca5d09
Commit
81ca5d09
authored
Apr 04, 2012
by
Andrew Eikum
Committed by
Alexandre Julliard
Apr 05, 2012
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wineoss.drv: Prefix device names with direction indication.
parent
ea231aba
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
16 additions
and
2 deletions
+16
-2
mmdevdrv.c
dlls/wineoss.drv/mmdevdrv.c
+16
-2
No files found.
dlls/wineoss.drv/mmdevdrv.c
View file @
81ca5d09
...
...
@@ -458,6 +458,9 @@ HRESULT WINAPI AUDDRV_GetEndpointIDs(EDataFlow flow, WCHAR ***ids, GUID **guids,
oss_sysinfo
sysinfo
;
static
int
print_once
=
0
;
static
const
WCHAR
outW
[]
=
{
'O'
,
'u'
,
't'
,
':'
,
' '
,
0
};
static
const
WCHAR
inW
[]
=
{
'I'
,
'n'
,
':'
,
' '
,
0
};
TRACE
(
"%d %p %p %p %p
\n
"
,
flow
,
ids
,
guids
,
num
,
def_index
);
mixer_fd
=
open
(
"/dev/mixer"
,
O_RDONLY
,
0
);
...
...
@@ -536,7 +539,8 @@ HRESULT WINAPI AUDDRV_GetEndpointIDs(EDataFlow flow, WCHAR ***ids, GUID **guids,
if
((
flow
==
eCapture
&&
(
ai
.
caps
&
PCM_CAP_INPUT
))
||
(
flow
==
eRender
&&
(
ai
.
caps
&
PCM_CAP_OUTPUT
))){
size_t
len
;
size_t
len
,
prefix_len
;
const
WCHAR
*
prefix
;
dev_item
=
HeapAlloc
(
GetProcessHeap
(),
0
,
sizeof
(
*
dev_item
));
...
...
@@ -547,6 +551,15 @@ HRESULT WINAPI AUDDRV_GetEndpointIDs(EDataFlow flow, WCHAR ***ids, GUID **guids,
(
*
guids
)[
*
num
]
=
dev_item
->
guid
;
len
=
MultiByteToWideChar
(
CP_UNIXCP
,
0
,
ai
.
name
,
-
1
,
NULL
,
0
);
if
(
flow
==
eRender
){
prefix
=
outW
;
prefix_len
=
(
sizeof
(
outW
)
/
sizeof
(
*
outW
))
-
1
;
len
+=
prefix_len
;
}
else
{
prefix
=
inW
;
prefix_len
=
(
sizeof
(
inW
)
/
sizeof
(
*
inW
))
-
1
;
len
+=
prefix_len
;
}
(
*
ids
)[
*
num
]
=
HeapAlloc
(
GetProcessHeap
(),
0
,
len
*
sizeof
(
WCHAR
));
if
(
!
(
*
ids
)[
*
num
]){
...
...
@@ -558,8 +571,9 @@ HRESULT WINAPI AUDDRV_GetEndpointIDs(EDataFlow flow, WCHAR ***ids, GUID **guids,
close
(
mixer_fd
);
return
E_OUTOFMEMORY
;
}
memcpy
((
*
ids
)[
*
num
],
prefix
,
prefix_len
*
sizeof
(
WCHAR
));
MultiByteToWideChar
(
CP_UNIXCP
,
0
,
ai
.
name
,
-
1
,
(
*
ids
)[
*
num
]
,
len
);
(
*
ids
)[
*
num
]
+
prefix_len
,
len
-
prefix_
len
);
list_add_tail
(
&
g_devices
,
&
dev_item
->
entry
);
...
...
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