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
5512c248
Commit
5512c248
authored
Aug 01, 2011
by
Andrew Eikum
Committed by
Alexandre Julliard
Aug 02, 2011
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
winmm: Fix looping handling.
parent
729afa6a
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
16 additions
and
9 deletions
+16
-9
waveform.c
dlls/winmm/waveform.c
+16
-9
No files found.
dlls/winmm/waveform.c
View file @
5512c248
...
...
@@ -1263,7 +1263,7 @@ static WAVEHDR *WOD_MarkDoneHeaders(WINMM_Device *device)
HRESULT
hr
;
WAVEHDR
*
queue
,
*
first
=
device
->
first
;
UINT64
clock_freq
,
clock_pos
,
clock_frames
;
UINT32
nloops
,
queue_frames
;
UINT32
nloops
,
queue_frames
=
0
;
hr
=
IAudioClock_GetFrequency
(
device
->
clock
,
&
clock_freq
);
if
(
FAILED
(
hr
)){
...
...
@@ -1282,19 +1282,21 @@ static WAVEHDR *WOD_MarkDoneHeaders(WINMM_Device *device)
first
=
queue
=
device
->
first
;
nloops
=
device
->
loop_counter
;
while
(
queue
&&
(
queue_frames
=
WINMM_HeaderLenFrames
(
device
,
queue
))
<=
(
queue_frames
+
=
WINMM_HeaderLenFrames
(
device
,
queue
))
<=
clock_frames
-
device
->
last_clock_pos
){
WAVEHDR
*
next
=
queue
->
lpNext
;
if
(
!
nloops
){
device
->
first
->
dwFlags
&=
~
WHDR_INQUEUE
;
device
->
first
->
dwFlags
|=
WHDR_DONE
;
device
->
last_clock_pos
+=
queue_frames
;
queue
=
device
->
first
=
next
;
queue_frames
=
0
;
queue
=
device
->
first
=
queue
->
lpNext
;
}
else
{
if
(
queue
->
dwFlags
&
WHDR_BEGINLOOP
)
queue
=
next
;
if
(
queue
->
dwFlags
&
WHDR_ENDLOOP
){
if
(
queue
->
dwFlags
&
WHDR_BEGINLOOP
){
if
(
queue
->
dwFlags
&
WHDR_ENDLOOP
)
--
nloops
;
else
queue
=
queue
->
lpNext
;
}
else
if
(
queue
->
dwFlags
&
WHDR_ENDLOOP
){
queue
=
device
->
loop_start
;
--
nloops
;
}
...
...
@@ -2476,8 +2478,13 @@ UINT WINAPI waveOutWrite(HWAVEOUT hWaveOut, WAVEHDR *header, UINT uSize)
device
->
last
=
header
;
if
(
!
device
->
playing
)
device
->
playing
=
header
;
}
else
}
else
{
device
->
playing
=
device
->
first
=
device
->
last
=
header
;
if
(
header
->
dwFlags
&
WHDR_BEGINLOOP
){
device
->
loop_counter
=
header
->
dwLoops
;
device
->
loop_start
=
header
;
}
}
header
->
lpNext
=
NULL
;
header
->
dwFlags
&=
~
WHDR_DONE
;
...
...
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