Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
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-cw
Commits
ca37dbcf
Commit
ca37dbcf
authored
Mar 26, 2011
by
Jörg Höhle
Committed by
Alexandre Julliard
Mar 30, 2011
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
winmm: Abort PlaySound in case of audio error.
parent
15ad749e
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
4 deletions
+6
-4
playsound.c
dlls/winmm/playsound.c
+6
-4
No files found.
dlls/winmm/playsound.c
View file @
ca37dbcf
...
...
@@ -179,7 +179,6 @@ static void CALLBACK PlaySound_Callback(HWAVEOUT hwo, UINT uMsg,
static
void
PlaySound_WaitDone
(
struct
playsound_data
*
s
)
{
for
(;;)
{
ResetEvent
(
s
->
hEvent
);
if
(
InterlockedDecrement
(
&
s
->
dwEventCount
)
>=
0
)
break
;
InterlockedIncrement
(
&
s
->
dwEventCount
);
...
...
@@ -437,17 +436,20 @@ static DWORD WINAPI proc_PlaySound(LPVOID arg)
if
(
count
<
1
)
break
;
left
-=
count
;
waveHdr
[
index
].
dwBufferLength
=
count
;
waveHdr
[
index
].
dwFlags
&=
~
WHDR_DONE
;
if
(
waveOutWrite
(
hWave
,
&
waveHdr
[
index
],
sizeof
(
WAVEHDR
))
==
MMSYSERR_NOERROR
)
{
index
^=
1
;
PlaySound_WaitDone
(
&
s
);
}
else
FIXME
(
"Couldn't play header
\n
"
);
else
{
ERR
(
"Aborting play loop, waveOutWrite error
\n
"
);
wps
->
bLoop
=
FALSE
;
break
;
}
}
bRet
=
TRUE
;
}
while
(
wps
->
bLoop
);
PlaySound_WaitDone
(
&
s
);
/*
for la
st buffer */
PlaySound_WaitDone
(
&
s
);
/*
to balance fir
st buffer */
waveOutReset
(
hWave
);
waveOutUnprepareHeader
(
hWave
,
&
waveHdr
[
0
],
sizeof
(
WAVEHDR
));
...
...
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