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
de480f0b
Commit
de480f0b
authored
Jun 20, 2007
by
Ken Thomases
Committed by
Alexandre Julliard
Jun 20, 2007
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
winecoreaudio: Extract loop, wodNotifyClient for WAVEHDRs in list, to separate function.
parent
ea2613fe
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
20 additions
and
7 deletions
+20
-7
audio.c
dlls/winecoreaudio.drv/audio.c
+20
-7
No files found.
dlls/winecoreaudio.drv/audio.c
View file @
de480f0b
...
...
@@ -211,6 +211,7 @@ static HANDLE hThread = NULL; /* Track the thread we create so we can clean it u
static
CFMessagePortRef
Port_SendToMessageThread
;
static
void
wodHelper_PlayPtrNext
(
WINE_WAVEOUT
*
wwo
);
static
void
wodHelper_NotifyDoneForList
(
WINE_WAVEOUT
*
wwo
,
LPWAVEHDR
lpWaveHdr
);
static
void
wodHelper_NotifyCompletions
(
WINE_WAVEOUT
*
wwo
,
BOOL
force
);
static
void
widHelper_NotifyCompletions
(
WINE_WAVEIN
*
wwi
);
...
...
@@ -1049,6 +1050,24 @@ static void wodHelper_PlayPtrNext(WINE_WAVEOUT* wwo)
}
}
/* Send the "done" notification for each WAVEHDR in a list. The list must be
* free-standing. It should not be part of a device's queue.
* This function must be called with the WAVEOUT lock *not* held. Furthermore,
* it does not lock it, itself. That's because the callback to the application
* may prompt the application to operate on the device, and we don't want to
* deadlock.
*/
static
void
wodHelper_NotifyDoneForList
(
WINE_WAVEOUT
*
wwo
,
LPWAVEHDR
lpWaveHdr
)
{
for
(
;
lpWaveHdr
;
lpWaveHdr
=
lpWaveHdr
->
lpNext
)
{
lpWaveHdr
->
dwFlags
&=
~
WHDR_INQUEUE
;
lpWaveHdr
->
dwFlags
|=
WHDR_DONE
;
wodNotifyClient
(
wwo
,
WOM_DONE
,
(
DWORD
)
lpWaveHdr
,
0
);
}
}
/* if force is TRUE then notify the client that all the headers were completed
*/
static
void
wodHelper_NotifyCompletions
(
WINE_WAVEOUT
*
wwo
,
BOOL
force
)
...
...
@@ -1097,13 +1116,7 @@ static void wodHelper_NotifyCompletions(WINE_WAVEOUT* wwo, BOOL force)
OSSpinLockUnlock
(
&
wwo
->
lock
);
/* Now, send the "done" notification for each header in our list. */
for
(
lpWaveHdr
=
lpFirstDoneWaveHdr
;
lpWaveHdr
;
lpWaveHdr
=
lpWaveHdr
->
lpNext
)
{
lpWaveHdr
->
dwFlags
&=
~
WHDR_INQUEUE
;
lpWaveHdr
->
dwFlags
|=
WHDR_DONE
;
wodNotifyClient
(
wwo
,
WOM_DONE
,
(
DWORD
)
lpWaveHdr
,
0
);
}
wodHelper_NotifyDoneForList
(
wwo
,
lpFirstDoneWaveHdr
);
}
...
...
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