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
02969759
Commit
02969759
authored
Nov 20, 2023
by
Davide Beatrici
Committed by
Alexandre Julliard
Nov 22, 2023
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wineoss: Fix sound not working.
Wine-Bug:
https://bugs.winehq.org/show_bug.cgi?id=55886
parent
70f15b93
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
10 deletions
+11
-10
mmdevdrv.c
dlls/wineoss.drv/mmdevdrv.c
+11
-10
No files found.
dlls/wineoss.drv/mmdevdrv.c
View file @
02969759
...
...
@@ -144,18 +144,11 @@ exit:
void
WINAPI
get_device_guid
(
EDataFlow
flow
,
const
char
*
device
,
GUID
*
guid
)
{
OSSDevice
*
oss_dev
;
HKEY
key
=
NULL
,
dev_key
;
DWORD
type
,
size
=
sizeof
(
*
guid
);
WCHAR
key_name
[
256
];
const
unsigned
int
dev_size
=
strlen
(
device
)
+
1
;
OSSDevice
*
oss_dev
=
HeapAlloc
(
GetProcessHeap
(),
0
,
offsetof
(
OSSDevice
,
devnode
[
dev_size
]));
if
(
oss_dev
){
oss_dev
->
flow
=
flow
;
oss_dev
->
guid
=
*
guid
;
memcpy
(
oss_dev
->
devnode
,
device
,
dev_size
);
device_add
(
oss_dev
);
}
if
(
flow
==
eCapture
)
key_name
[
0
]
=
'1'
;
...
...
@@ -171,7 +164,7 @@ void WINAPI get_device_guid(EDataFlow flow, const char *device, GUID *guid)
if
(
type
==
REG_BINARY
){
RegCloseKey
(
dev_key
);
RegCloseKey
(
key
);
return
;
goto
exit
;
}
ERR
(
"Invalid type for device %s GUID: %lu; ignoring and overwriting
\n
"
,
wine_dbgstr_w
(
key_name
),
type
);
...
...
@@ -183,9 +176,17 @@ void WINAPI get_device_guid(EDataFlow flow, const char *device, GUID *guid)
CoCreateGuid
(
guid
);
set_device_guid
(
flow
,
key
,
key_name
,
guid
);
exit:
if
(
key
)
RegCloseKey
(
key
);
oss_dev
=
HeapAlloc
(
GetProcessHeap
(),
0
,
offsetof
(
OSSDevice
,
devnode
[
dev_size
]));
if
(
oss_dev
){
oss_dev
->
flow
=
flow
;
oss_dev
->
guid
=
*
guid
;
memcpy
(
oss_dev
->
devnode
,
device
,
dev_size
);
device_add
(
oss_dev
);
}
}
BOOL
WINAPI
get_device_name_from_guid
(
GUID
*
guid
,
char
**
name
,
EDataFlow
*
flow
)
...
...
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