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
ee3c8794
Commit
ee3c8794
authored
Nov 17, 2009
by
Jörg Höhle
Committed by
Alexandre Julliard
Dec 04, 2009
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
mciwave: Abort the play loop in case of audio error.
parent
4da51e08
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
6 deletions
+8
-6
mciwave.c
dlls/mciwave/mciwave.c
+8
-6
No files found.
dlls/mciwave/mciwave.c
View file @
ee3c8794
...
@@ -876,14 +876,18 @@ static DWORD WAVE_mciPlay(MCIDEVICEID wDevID, DWORD_PTR dwFlags, DWORD_PTR pmt,
...
@@ -876,14 +876,18 @@ static DWORD WAVE_mciPlay(MCIDEVICEID wDevID, DWORD_PTR dwFlags, DWORD_PTR pmt,
*/
*/
waveHdr
[
whidx
].
dwBufferLength
=
count
;
waveHdr
[
whidx
].
dwBufferLength
=
count
;
waveHdr
[
whidx
].
dwFlags
&=
~
WHDR_DONE
;
waveHdr
[
whidx
].
dwFlags
&=
~
WHDR_DONE
;
TRACE
(
"before WODM_WRITE lpWaveHdr=%p dwBufferLength=%u dwBytesRecorded=%u
\n
"
,
TRACE
(
"before WODM_WRITE lpWaveHdr=%p dwBufferLength=%u
\n
"
,
&
waveHdr
[
whidx
],
waveHdr
[
whidx
].
dwBufferLength
,
&
waveHdr
[
whidx
],
waveHdr
[
whidx
].
dwBufferLength
);
waveHdr
[
whidx
].
dwBytesRecorded
);
dwRet
=
waveOutWrite
(
wmw
->
hWave
,
&
waveHdr
[
whidx
],
sizeof
(
WAVEHDR
));
dwRet
=
waveOutWrite
(
wmw
->
hWave
,
&
waveHdr
[
whidx
],
sizeof
(
WAVEHDR
));
if
(
dwRet
)
{
ERR
(
"Aborting play loop, WODM_WRITE error %d
\n
"
,
dwRet
);
dwRet
=
MCIERR_HARDWARE
;
break
;
}
left
-=
count
;
left
-=
count
;
wmw
->
dwPosition
+=
count
;
wmw
->
dwPosition
+=
count
;
TRACE
(
"after WODM_WRITE dwPosition=%u
\n
"
,
wmw
->
dwPosition
);
TRACE
(
"after WODM_WRITE dwPosition=%u
\n
"
,
wmw
->
dwPosition
);
/* InterlockedDecrement if and only if waveOutWrite is successful */
WAVE_mciPlayWaitDone
(
wmw
);
WAVE_mciPlayWaitDone
(
wmw
);
whidx
^=
1
;
whidx
^=
1
;
}
}
...
@@ -896,8 +900,6 @@ static DWORD WAVE_mciPlay(MCIDEVICEID wDevID, DWORD_PTR dwFlags, DWORD_PTR pmt,
...
@@ -896,8 +900,6 @@ static DWORD WAVE_mciPlay(MCIDEVICEID wDevID, DWORD_PTR dwFlags, DWORD_PTR pmt,
waveOutUnprepareHeader
(
wmw
->
hWave
,
&
waveHdr
[
0
],
sizeof
(
WAVEHDR
));
waveOutUnprepareHeader
(
wmw
->
hWave
,
&
waveHdr
[
0
],
sizeof
(
WAVEHDR
));
waveOutUnprepareHeader
(
wmw
->
hWave
,
&
waveHdr
[
1
],
sizeof
(
WAVEHDR
));
waveOutUnprepareHeader
(
wmw
->
hWave
,
&
waveHdr
[
1
],
sizeof
(
WAVEHDR
));
dwRet
=
0
;
cleanUp:
cleanUp:
if
(
dwFlags
&
MCI_NOTIFY
)
if
(
dwFlags
&
MCI_NOTIFY
)
oldcb
=
InterlockedExchangePointer
(
&
wmw
->
hCallback
,
NULL
);
oldcb
=
InterlockedExchangePointer
(
&
wmw
->
hCallback
,
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