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
b9de906a
Commit
b9de906a
authored
Jul 27, 2011
by
Jörg Höhle
Committed by
Alexandre Julliard
Aug 05, 2011
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
winmm: Fix logic conditions.
parent
96168370
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
6 deletions
+8
-6
waveform.c
dlls/winmm/waveform.c
+8
-6
No files found.
dlls/winmm/waveform.c
View file @
b9de906a
...
...
@@ -706,9 +706,9 @@ static MMRESULT WINMM_MapDevice(WINMM_OpenInfo *info, BOOL is_out)
}
/* no direct match, so set up the ACM stream */
if
(
info
->
format
->
wFormatTag
!=
WAVE_FORMAT_PCM
||
(
info
->
format
->
wFormatTag
==
WAVE_FORMAT_EXTENSIBLE
&&
!
IsEqualGUID
(
&
fmtex
->
SubFormat
,
&
KSDATAFORMAT_SUBTYPE_PCM
))){
if
(
info
->
format
->
wFormatTag
!=
WAVE_FORMAT_PCM
&&
!
(
info
->
format
->
wFormatTag
==
WAVE_FORMAT_EXTENSIBLE
&&
IsEqualGUID
(
&
fmtex
->
SubFormat
,
&
KSDATAFORMAT_SUBTYPE_PCM
))){
/* convert to PCM format if it's not already */
mr
=
WINMM_TryDeviceMapping
(
info
,
info
->
format
->
nChannels
,
info
->
format
->
nSamplesPerSec
,
16
,
is_out
);
...
...
@@ -889,6 +889,8 @@ static LRESULT WINMM_OpenDevice(WINMM_Device *device, WINMM_MMDevice *mmdevice,
goto
error
;
}
/* As the devices thread is waiting on g_device_handles, it can
* only be modified from within this same thread. */
if
(
g_device_handles
){
g_device_handles
=
HeapReAlloc
(
GetProcessHeap
(),
0
,
g_device_handles
,
sizeof
(
HANDLE
)
*
(
g_devhandle_count
+
1
));
...
...
@@ -2087,11 +2089,11 @@ static DWORD WINAPI WINMM_DevicesThreadProc(void *arg)
DWORD
wait
;
wait
=
MsgWaitForMultipleObjects
(
g_devhandle_count
,
g_device_handles
,
FALSE
,
INFINITE
,
QS_ALLINPUT
);
if
(
wait
==
g_devhandle_count
-
WAIT_OBJECT_0
){
if
(
wait
==
g_devhandle_count
+
WAIT_OBJECT_0
){
MSG
msg
;
if
(
PeekMessageW
(
&
msg
,
g_devices_hwnd
,
0
,
0
,
PM_REMOVE
))
ERR
(
"Unexpected message: 0x%x
\n
"
,
msg
.
message
);
}
else
if
(
wait
<
g_devhandle_count
){
}
else
if
(
wait
<
g_devhandle_count
+
WAIT_OBJECT_0
){
WINMM_Device
*
device
=
g_handle_devices
[
wait
-
WAIT_OBJECT_0
];
if
(
device
->
render
)
WOD_PushData
(
device
);
...
...
@@ -2149,7 +2151,7 @@ static BOOL WINMM_StartDevicesThread(void)
wait
=
WaitForMultipleObjects
(
2
,
events
,
FALSE
,
INFINITE
);
CloseHandle
(
events
[
0
]);
if
(
wait
!=
WAIT_OBJECT_0
){
if
(
wait
==
1
-
WAIT_OBJECT_0
){
if
(
wait
==
1
+
WAIT_OBJECT_0
){
CloseHandle
(
g_devices_thread
);
g_devices_thread
=
NULL
;
g_devices_hwnd
=
NULL
;
...
...
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