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
6d971235
Commit
6d971235
authored
Jun 29, 2007
by
Maarten Lankhorst
Committed by
Alexandre Julliard
Jun 29, 2007
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
dsound: Fix calcplayposition to handle mixed amount > buffer length better.
parent
8b9454d4
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
8 deletions
+6
-8
buffer.c
dlls/dsound/buffer.c
+6
-8
No files found.
dlls/dsound/buffer.c
View file @
6d971235
...
...
@@ -444,13 +444,11 @@ DWORD DSOUND_CalcPlayPosition(IDirectSoundBufferImpl *This, DWORD pplay, DWORD p
TRACE
(
"this back-offset=%d
\n
"
,
pmix
);
/* sanity */
if
(
pmix
>
This
->
buflen
){
ERR
(
"Bad length in CalcPlayPosition!
\n
"
);
return
0
;
}
if
(
pmix
>
This
->
buflen
)
WARN
(
"Mixed length (%d) is longer then buffer length (%d)
\n
"
,
pmix
,
This
->
buflen
);
/* subtract from our last mixed position */
if
(
bplay
<
pmix
)
bplay
+=
This
->
buflen
;
/* wraparound */
while
(
bplay
<
pmix
)
bplay
+=
This
->
buflen
;
/* wraparound */
bplay
-=
pmix
;
/* check for lead-in */
...
...
@@ -461,9 +459,9 @@ DWORD DSOUND_CalcPlayPosition(IDirectSoundBufferImpl *This, DWORD pplay, DWORD p
}
/* sanity */
if
(
bplay
>
This
->
buflen
){
ERR
(
"Bad play position in CalcPlayPosition!
\n
"
);
return
0
;
if
(
bplay
>=
This
->
buflen
){
FIXME
(
"Bad play position. bplay: %d, buflen: %d
\n
"
,
bplay
,
This
->
buflen
);
bplay
%=
This
->
buflen
;
}
/* return the result */
...
...
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