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
a363c41e
Commit
a363c41e
authored
Apr 21, 2010
by
Maarten Lankhorst
Committed by
Alexandre Julliard
Apr 21, 2010
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
mmdevapi: Fix small capture bugs.
parent
1997a3a2
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
7 deletions
+8
-7
audio.c
dlls/mmdevapi/audio.c
+8
-7
No files found.
dlls/mmdevapi/audio.c
View file @
a363c41e
...
...
@@ -633,7 +633,7 @@ static HRESULT WINAPI AC_GetCurrentPadding(IAudioClient *iface, UINT32 *numpad)
if
(
ofs
+
avail
<=
This
->
bufsize
)
palcCaptureSamples
(
This
->
capdev
,
buf1
,
avail
);
else
{
DWORD
part1
=
This
->
bufsize
-
This
->
ofs
;
DWORD
part1
=
This
->
bufsize
-
ofs
;
palcCaptureSamples
(
This
->
capdev
,
buf1
,
part1
);
palcCaptureSamples
(
This
->
capdev
,
This
->
buffer
,
avail
-
part1
);
}
...
...
@@ -648,7 +648,7 @@ static HRESULT WINAPI AC_GetCurrentPadding(IAudioClient *iface, UINT32 *numpad)
if
(
rest
)
This
->
ofs
+=
psize
-
rest
;
This
->
ofs
%=
This
->
bufsize
;
This
->
pad
=
This
->
bufsize
-
rest
;
This
->
pad
=
This
->
bufsize
;
}
}
if
(
This
->
pad
>=
psize
)
...
...
@@ -1224,6 +1224,7 @@ static HRESULT WINAPI ACC_GetBuffer(IAudioCaptureClient *iface, BYTE **data, UIN
hr
=
AUDCLNT_S_BUFFER_EMPTY
;
out:
LeaveCriticalSection
(
This
->
parent
->
crst
);
TRACE
(
"Returning %08x %i
\n
"
,
hr
,
*
frames
);
return
hr
;
}
...
...
@@ -1232,15 +1233,15 @@ static HRESULT WINAPI ACC_ReleaseBuffer(IAudioCaptureClient *iface, UINT32 writt
ACCapture
*
This
=
(
ACCapture
*
)
iface
;
HRESULT
hr
=
S_OK
;
EnterCriticalSection
(
This
->
parent
->
crst
);
if
(
!
written
||
written
==
This
->
parent
->
locked
)
if
(
!
written
||
written
==
This
->
parent
->
locked
)
{
This
->
parent
->
locked
=
0
;
else
if
(
!
This
->
parent
->
locked
)
This
->
parent
->
ofs
+=
written
;
This
->
parent
->
ofs
%=
This
->
parent
->
bufsize
;
This
->
parent
->
pad
-=
written
;
}
else
if
(
!
This
->
parent
->
locked
)
hr
=
AUDCLNT_E_OUT_OF_ORDER
;
else
hr
=
AUDCLNT_E_INVALID_SIZE
;
This
->
parent
->
ofs
+=
written
;
This
->
parent
->
ofs
%=
This
->
parent
->
bufsize
;
This
->
parent
->
pad
-=
written
;
LeaveCriticalSection
(
This
->
parent
->
crst
);
return
hr
;
}
...
...
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