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
54644715
Commit
54644715
authored
Oct 01, 2007
by
Maarten Lankhorst
Committed by
Alexandre Julliard
Oct 02, 2007
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
dsound: Fix IDirectSoundBuffer_GetPosition.
parent
8f6f252e
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
11 deletions
+8
-11
capture.c
dlls/dsound/capture.c
+8
-11
No files found.
dlls/dsound/capture.c
View file @
54644715
...
...
@@ -919,25 +919,22 @@ IDirectSoundCaptureBufferImpl_GetCurrentPosition(
if
(
hres
!=
DS_OK
)
WARN
(
"IDsCaptureDriverBuffer_GetPosition failed
\n
"
);
}
else
if
(
This
->
device
->
hwi
)
{
DWORD
pos
;
DWORD
pos
;
EnterCriticalSection
(
&
This
->
device
->
lock
);
pos
=
(
DWORD_PTR
)
This
->
device
->
pwave
[
This
->
device
->
index
].
lpData
-
(
DWORD_PTR
)
This
->
device
->
buffer
;
TRACE
(
"old This->device->state=%s
\n
"
,
captureStateString
[
This
->
device
->
state
]);
EnterCriticalSection
(
&
This
->
device
->
lock
);
pos
=
(
DWORD_PTR
)
This
->
device
->
pwave
[
This
->
device
->
index
].
lpData
-
(
DWORD_PTR
)
This
->
device
->
buffer
;
if
(
lpdwCapturePosition
)
*
lpdwCapturePosition
=
pos
;
*
lpdwCapturePosition
=
(
This
->
device
->
pwave
[
This
->
device
->
index
].
dwBufferLength
+
pos
)
%
This
->
device
->
buflen
;
if
(
lpdwReadPosition
)
*
lpdwReadPosition
=
pos
;
LeaveCriticalSection
(
&
This
->
device
->
lock
);
if
(
lpdwReadPosition
)
*
lpdwReadPosition
=
(
This
->
device
->
pwave
[
This
->
device
->
index
].
dwBufferLength
+
pos
)
%
This
->
device
->
buflen
;
LeaveCriticalSection
(
&
This
->
device
->
lock
);
if
(
lpdwCapturePosition
)
TRACE
(
"*lpdwCapturePosition=%d
\n
"
,
*
lpdwCapturePosition
);
if
(
lpdwReadPosition
)
TRACE
(
"*lpdwReadPosition=%d
\n
"
,
*
lpdwReadPosition
);
}
else
{
WARN
(
"no driver
\n
"
);
hres
=
DSERR_NODRIVER
;
}
TRACE
(
"cappos=%d readpos=%d
\n
"
,
(
lpdwCapturePosition
?*
lpdwCapturePosition
:-
1
),
(
lpdwReadPosition
?*
lpdwReadPosition
:-
1
));
TRACE
(
"returning %08x
\n
"
,
hres
);
return
hres
;
}
...
...
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