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
0c4ec8a1
Commit
0c4ec8a1
authored
Sep 05, 2007
by
Maarten Lankhorst
Committed by
Alexandre Julliard
Sep 11, 2007
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
dsound: Fix overshot calculations.
parent
c333402b
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
3 deletions
+5
-3
primary.c
dlls/dsound/primary.c
+5
-3
No files found.
dlls/dsound/primary.c
View file @
0c4ec8a1
...
...
@@ -173,7 +173,7 @@ static HRESULT DSOUND_PrimaryOpen(DirectSoundDevice *device)
buflen
=
ds_hel_buflen
;
else
/* In case we move from hw accelerated to waveout */
buflen
=
device
->
buflen
;
buflen
-=
ds_hel_
buflen
%
device
->
pwfx
->
nBlockAlign
;
buflen
-=
buflen
%
device
->
pwfx
->
nBlockAlign
;
TRACE
(
"desired buflen=%d, old buffer=%p
\n
"
,
buflen
,
device
->
buffer
);
...
...
@@ -223,11 +223,13 @@ static HRESULT DSOUND_PrimaryOpen(DirectSoundDevice *device)
}
}
overshot
=
device
->
buflen
%
device
->
helfrags
;
overshot
=
device
->
buflen
%
device
->
fraglen
;
/* sanity */
if
(
overshot
)
{
WARN
(
"helfrags (%d x %d) doesn't fit entirely in buflen (%d) overshot: %d
\n
"
,
device
->
helfrags
,
device
->
fraglen
,
device
->
buflen
,
overshot
);
overshot
-=
overshot
%
device
->
pwfx
->
nBlockAlign
;
if
(
overshot
)
WARN
(
"helfrags (%d x %d) doesn't fit entirely in buflen (%d) overshot: %d
\n
"
,
device
->
helfrags
,
device
->
fraglen
,
device
->
buflen
,
overshot
);
device
->
pwave
[
device
->
helfrags
-
1
].
dwBufferLength
+=
overshot
;
}
...
...
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