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
91c5ec96
Commit
91c5ec96
authored
Dec 21, 2006
by
Ken Thomases
Committed by
Alexandre Julliard
Dec 21, 2006
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
winecoreaudio: Extract wodHelper_CheckForLoopBegin() from wodHelper_BeginWaveHdr().
This refactoring prepares the ground for subsequent refactoring of wodHelper_BeginWaveHdr.
parent
a6da8f21
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
36 additions
and
17 deletions
+36
-17
audio.c
dlls/winmm/winecoreaudio/audio.c
+36
-17
No files found.
dlls/winmm/winecoreaudio/audio.c
View file @
91c5ec96
...
...
@@ -848,6 +848,40 @@ static DWORD wodUnprepare(WORD wDevID, LPWAVEHDR lpWaveHdr, DWORD dwSize)
return
MMSYSERR_NOERROR
;
}
/**************************************************************************
* wodHelper_CheckForLoopBegin [internal]
*
* Check if the new waveheader is the beginning of a loop, and set up
* state if so.
* This is called with the WAVEOUT lock held.
* Call from AudioUnit IO thread can't use Wine debug channels.
*/
static
void
wodHelper_CheckForLoopBegin
(
WINE_WAVEOUT
*
wwo
)
{
LPWAVEHDR
lpWaveHdr
=
wwo
->
lpPlayPtr
;
if
(
lpWaveHdr
->
dwFlags
&
WHDR_BEGINLOOP
)
{
if
(
wwo
->
lpLoopPtr
)
{
if
(
wwo
->
warn_on
)
fprintf
(
stderr
,
"warn:winecoreaudio:wodHelper_CheckForLoopBegin Already in a loop. Discarding loop on this header (%p)
\n
"
,
lpWaveHdr
);
}
else
{
if
(
wwo
->
trace_on
)
fprintf
(
stderr
,
"trace:winecoreaudio:wodHelper_CheckForLoopBegin Starting loop (%dx) with %p
\n
"
,
lpWaveHdr
->
dwLoops
,
lpWaveHdr
);
wwo
->
lpLoopPtr
=
lpWaveHdr
;
/* Windows does not touch WAVEHDR.dwLoops,
* so we need to make an internal copy */
wwo
->
dwLoops
=
lpWaveHdr
->
dwLoops
;
}
}
}
/**************************************************************************
* wodHelper_BeginWaveHdr [internal]
*
...
...
@@ -885,24 +919,9 @@ static void wodHelper_BeginWaveHdr(WINE_WAVEOUT* wwo, LPWAVEHDR lpWaveHdr)
}
else
wwo
->
state
=
WINE_WS_PLAYING
;
}
if
(
lpWaveHdr
->
dwFlags
&
WHDR_BEGINLOOP
)
{
if
(
wwo
->
lpLoopPtr
)
{
if
(
wwo
->
warn_on
)
fprintf
(
stderr
,
"warn:winecoreaudio:wodHelper_BeginWaveHdr Already in a loop. Discarding loop on this header (%p)
\n
"
,
lpWaveHdr
);
}
else
{
if
(
wwo
->
trace_on
)
fprintf
(
stderr
,
"trace:winecoreaudio:wodHelper_BeginWaveHdr Starting loop (%dx) with %p
\n
"
,
lpWaveHdr
->
dwLoops
,
lpWaveHdr
);
wwo
->
lpLoopPtr
=
lpWaveHdr
;
/* Windows does not touch WAVEHDR.dwLoops,
* so we need to make an internal copy */
wwo
->
dwLoops
=
lpWaveHdr
->
dwLoops
;
}
}
wodHelper_CheckForLoopBegin
(
wwo
);
wwo
->
dwPartialOffset
=
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