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
d4b2d48f
Commit
d4b2d48f
authored
Jan 27, 2013
by
Jörg Höhle
Committed by
Alexandre Julliard
Feb 13, 2013
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
winmm: More compatible waveIn/Out[Un]Prepare WHDR_* flag handling.
parent
b95910cc
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
34 additions
and
12 deletions
+34
-12
wave.c
dlls/winmm/tests/wave.c
+23
-0
waveform.c
dlls/winmm/waveform.c
+11
-12
No files found.
dlls/winmm/tests/wave.c
View file @
d4b2d48f
...
...
@@ -809,6 +809,29 @@ static void wave_out_test_deviceOut(int device, double duration,
"waveOutUnprepareHeader(%s): rc=%s
\n
"
,
dev_name
(
device
),
wave_out_error
(
rc
));
}
ok
(
frags
[
0
].
dwFlags
==
(
interactive
?
WHDR_DONE
:
0
),
"dwFlags(%d)=%x
\n
"
,
device
,
frags
[
0
].
dwFlags
);
frags
[
0
].
dwFlags
|=
WHDR_DONE
;
rc
=
waveOutUnprepareHeader
(
wout
,
&
frags
[
0
],
sizeof
(
frags
[
0
]));
ok
(
rc
==
MMSYSERR_NOERROR
,
"waveOutUnprepareHeader(%d): rc=%s
\n
"
,
device
,
wave_out_error
(
rc
));
ok
(
frags
[
0
].
dwFlags
==
WHDR_DONE
,
"dwFlags(%d)=%x
\n
"
,
device
,
frags
[
0
].
dwFlags
);
frags
[
0
].
dwFlags
|=
WHDR_INQUEUE
;
rc
=
waveOutPrepareHeader
(
wout
,
&
frags
[
0
],
sizeof
(
frags
[
0
]));
ok
(
rc
==
MMSYSERR_NOERROR
,
"waveOutPrepareHeader(%d): rc=%s
\n
"
,
device
,
wave_out_error
(
rc
));
ok
(
frags
[
0
].
dwFlags
==
WHDR_PREPARED
,
"dwFlags(%d)=%x
\n
"
,
device
,
frags
[
0
].
dwFlags
);
frags
[
0
].
dwFlags
|=
WHDR_INQUEUE
;
rc
=
waveOutPrepareHeader
(
wout
,
&
frags
[
0
],
sizeof
(
frags
[
0
]));
ok
(
rc
==
MMSYSERR_NOERROR
,
"waveOutPrepareHeader(%d): rc=%s
\n
"
,
device
,
wave_out_error
(
rc
));
ok
(
frags
[
0
].
dwFlags
==
(
WHDR_PREPARED
|
WHDR_INQUEUE
),
"dwFlags(%d)=%x
\n
"
,
device
,
frags
[
0
].
dwFlags
);
frags
[
0
].
dwFlags
&=
~
(
WHDR_INQUEUE
|
WHDR_DONE
);
rc
=
waveOutUnprepareHeader
(
wout
,
&
frags
[
0
],
sizeof
(
frags
[
0
]));
ok
(
rc
==
MMSYSERR_NOERROR
,
"waveOutUnprepareHeader(%d): rc=%s
\n
"
,
device
,
wave_out_error
(
rc
));
ok
(
frags
[
0
].
dwFlags
==
0
,
"dwFlags(%d)=%x
\n
"
,
device
,
frags
[
0
].
dwFlags
);
rc
=
waveOutClose
(
wout
);
ok
(
rc
==
MMSYSERR_NOERROR
,
"waveOutClose(%s): rc=%s
\n
"
,
dev_name
(
device
),
wave_out_error
(
rc
));
...
...
dlls/winmm/waveform.c
View file @
d4b2d48f
...
...
@@ -1517,7 +1517,7 @@ static LRESULT WINMM_PrepareHeader(HWAVE hwave, WAVEHDR *header)
LeaveCriticalSection
(
&
device
->
lock
);
header
->
dwFlags
|=
WHDR_PREPARED
;
header
->
dwFlags
&=
~
WHDR_DONE
;
header
->
dwFlags
&=
~
(
WHDR_DONE
|
WHDR_INQUEUE
);
/* flags cleared since w2k */
return
MMSYSERR_NOERROR
;
}
...
...
@@ -1542,7 +1542,6 @@ static LRESULT WINMM_UnprepareHeader(HWAVE hwave, WAVEHDR *header)
LeaveCriticalSection
(
&
device
->
lock
);
header
->
dwFlags
&=
~
WHDR_PREPARED
;
header
->
dwFlags
|=
WHDR_DONE
;
return
MMSYSERR_NOERROR
;
}
...
...
@@ -2782,8 +2781,8 @@ UINT WINAPI waveOutPrepareHeader(HWAVEOUT hWaveOut,
if
(
!
lpWaveOutHdr
||
uSize
<
sizeof
(
WAVEHDR
))
return
MMSYSERR_INVALPARAM
;
if
(
lpWaveOutHdr
->
dwFlags
&
WHDR_
INQUEUE
)
return
WAVERR_STILLPLAYING
;
if
(
lpWaveOutHdr
->
dwFlags
&
WHDR_
PREPARED
)
return
MMSYSERR_NOERROR
;
return
WINMM_PrepareHeader
((
HWAVE
)
hWaveOut
,
lpWaveOutHdr
);
}
...
...
@@ -2798,13 +2797,13 @@ UINT WINAPI waveOutUnprepareHeader(HWAVEOUT hWaveOut,
if
(
!
lpWaveOutHdr
||
uSize
<
sizeof
(
WAVEHDR
))
return
MMSYSERR_INVALPARAM
;
if
(
!
(
lpWaveOutHdr
->
dwFlags
&
WHDR_PREPARED
))
return
MMSYSERR_NOERROR
;
if
(
lpWaveOutHdr
->
dwFlags
&
WHDR_INQUEUE
)
return
WAVERR_STILLPLAYING
;
if
(
!
(
lpWaveOutHdr
->
dwFlags
&
WHDR_PREPARED
))
return
MMSYSERR_NOERROR
;
return
WINMM_UnprepareHeader
((
HWAVE
)
hWaveOut
,
lpWaveOutHdr
);
}
...
...
@@ -3412,8 +3411,8 @@ UINT WINAPI waveInPrepareHeader(HWAVEIN hWaveIn, WAVEHDR* lpWaveInHdr,
if
(
!
lpWaveInHdr
||
uSize
<
sizeof
(
WAVEHDR
))
return
MMSYSERR_INVALPARAM
;
if
(
lpWaveInHdr
->
dwFlags
&
WHDR_
INQUEUE
)
return
WAVERR_STILLPLAYING
;
if
(
lpWaveInHdr
->
dwFlags
&
WHDR_
PREPARED
)
return
MMSYSERR_NOERROR
;
return
WINMM_PrepareHeader
((
HWAVE
)
hWaveIn
,
lpWaveInHdr
);
}
...
...
@@ -3429,12 +3428,12 @@ UINT WINAPI waveInUnprepareHeader(HWAVEIN hWaveIn, WAVEHDR* lpWaveInHdr,
if
(
!
lpWaveInHdr
||
uSize
<
sizeof
(
WAVEHDR
))
return
MMSYSERR_INVALPARAM
;
if
(
!
(
lpWaveInHdr
->
dwFlags
&
WHDR_PREPARED
))
return
MMSYSERR_NOERROR
;
if
(
lpWaveInHdr
->
dwFlags
&
WHDR_INQUEUE
)
return
WAVERR_STILLPLAYING
;
if
(
!
(
lpWaveInHdr
->
dwFlags
&
WHDR_PREPARED
))
return
MMSYSERR_NOERROR
;
return
WINMM_UnprepareHeader
((
HWAVE
)
hWaveIn
,
lpWaveInHdr
);
}
...
...
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