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
438c7489
Commit
438c7489
authored
Jul 11, 2007
by
Ken Thomases
Committed by
Alexandre Julliard
Jul 12, 2007
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
winecoreaudio: Improve safety of iterations when returning WAVEHDRs to client.
parent
1b4ad056
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
15 additions
and
4 deletions
+15
-4
audio.c
dlls/winecoreaudio.drv/audio.c
+15
-4
No files found.
dlls/winecoreaudio.drv/audio.c
View file @
438c7489
...
...
@@ -1059,12 +1059,16 @@ static void wodHelper_PlayPtrNext(WINE_WAVEOUT* wwo)
*/
static
void
wodHelper_NotifyDoneForList
(
WINE_WAVEOUT
*
wwo
,
LPWAVEHDR
lpWaveHdr
)
{
for
(
;
lpWaveHdr
;
lpWaveHdr
=
lpWaveHdr
->
lpNext
)
while
(
lpWaveHdr
)
{
LPWAVEHDR
lpNext
=
lpWaveHdr
->
lpNext
;
lpWaveHdr
->
lpNext
=
NULL
;
lpWaveHdr
->
dwFlags
&=
~
WHDR_INQUEUE
;
lpWaveHdr
->
dwFlags
|=
WHDR_DONE
;
wodNotifyClient
(
wwo
,
WOM_DONE
,
(
DWORD
)
lpWaveHdr
,
0
);
lpWaveHdr
=
lpNext
;
}
}
...
...
@@ -1670,12 +1674,17 @@ static void widHelper_NotifyCompletions(WINE_WAVEIN* wwi)
OSSpinLockUnlock
(
&
wwi
->
lock
);
/* Now, send the "done" notification for each header in our list. */
for
(
lpWaveHdr
=
lpFirstDoneWaveHdr
;
lpWaveHdr
;
lpWaveHdr
=
lpWaveHdr
->
lpNext
)
lpWaveHdr
=
lpFirstDoneWaveHdr
;
while
(
lpWaveHdr
)
{
LPWAVEHDR
lpNext
=
lpWaveHdr
->
lpNext
;
lpWaveHdr
->
lpNext
=
NULL
;
lpWaveHdr
->
dwFlags
&=
~
WHDR_INQUEUE
;
lpWaveHdr
->
dwFlags
|=
WHDR_DONE
;
widNotifyClient
(
wwi
,
WIM_DATA
,
(
DWORD
)
lpWaveHdr
,
0
);
lpWaveHdr
=
lpNext
;
}
}
...
...
@@ -2074,6 +2083,7 @@ static DWORD widStop(WORD wDevID)
if
(
lpWaveHdr
)
{
lpWaveHdr
->
lpNext
=
NULL
;
lpWaveHdr
->
dwFlags
&=
~
WHDR_INQUEUE
;
lpWaveHdr
->
dwFlags
|=
WHDR_DONE
;
widNotifyClient
(
wwi
,
WIM_DATA
,
(
DWORD
)
lpWaveHdr
,
0
);
...
...
@@ -2130,6 +2140,7 @@ static DWORD widReset(WORD wDevID)
{
WAVEHDR
*
lpNext
=
lpWaveHdr
->
lpNext
;
lpWaveHdr
->
lpNext
=
NULL
;
lpWaveHdr
->
dwFlags
&=
~
WHDR_INQUEUE
;
lpWaveHdr
->
dwFlags
|=
WHDR_DONE
;
widNotifyClient
(
wwi
,
WIM_DATA
,
(
DWORD
)
lpWaveHdr
,
0
);
...
...
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