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
d8d4aed8
Commit
d8d4aed8
authored
Jan 09, 2012
by
Jörg Höhle
Committed by
Alexandre Julliard
Jan 11, 2012
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
winmm: GetCurrentPadding is superfluous while recording.
parent
88d75f11
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
25 deletions
+13
-25
waveform.c
dlls/winmm/waveform.c
+13
-25
No files found.
dlls/winmm/waveform.c
View file @
d8d4aed8
...
...
@@ -1453,19 +1453,11 @@ static void WID_PullACMData(WINMM_Device *device)
MMRESULT
mr
;
if
(
device
->
acm_hdr
.
cbDstLength
==
0
){
hr
=
IAudioClient_GetCurrentPadding
(
device
->
client
,
&
packet
);
if
(
FAILED
(
hr
)){
ERR
(
"GetCurrentPadding failed: %08x
\n
"
,
hr
);
return
;
}
if
(
packet
==
0
)
return
;
hr
=
IAudioCaptureClient_GetBuffer
(
device
->
capture
,
&
data
,
&
packet
,
&
flags
,
NULL
,
NULL
);
if
(
FAILED
(
hr
)){
ERR
(
"GetBuffer failed: %08x
\n
"
,
hr
);
if
(
hr
!=
S_OK
){
if
(
FAILED
(
hr
))
ERR
(
"GetBuffer failed: %08x
\n
"
,
hr
);
return
;
}
...
...
@@ -1566,26 +1558,20 @@ static void WID_PullData(WINMM_Device *device)
while
(
device
->
first
){
BYTE
*
data
;
UINT32
pa
d
,
pa
cket_len
,
packet
;
UINT32
packet_len
,
packet
;
DWORD
flags
;
hr
=
IAudioClient_GetCurrentPadding
(
device
->
client
,
&
pad
);
if
(
FAILED
(
hr
)){
ERR
(
"GetCurrentPadding failed: %08x
\n
"
,
hr
);
goto
exit
;
}
if
(
pad
==
0
)
goto
exit
;
hr
=
IAudioCaptureClient_GetBuffer
(
device
->
capture
,
&
data
,
&
packet
,
hr
=
IAudioCaptureClient_GetBuffer
(
device
->
capture
,
&
data
,
&
packet_len
,
&
flags
,
NULL
,
NULL
);
if
(
FAILED
(
hr
)){
ERR
(
"GetBuffer failed: %08x
\n
"
,
hr
);
if
(
hr
!=
S_OK
){
if
(
FAILED
(
hr
))
ERR
(
"GetBuffer failed: %08x
\n
"
,
hr
);
else
/* AUDCLNT_S_BUFFER_EMPTY success code */
IAudioCaptureClient_ReleaseBuffer
(
device
->
capture
,
0
);
goto
exit
;
}
packet
_len
=
packet
;
packet
=
packet_len
;
queue
=
device
->
first
;
while
(
queue
&&
packet
>
0
){
UINT32
to_copy_bytes
;
...
...
@@ -1612,6 +1598,8 @@ static void WID_PullData(WINMM_Device *device)
if
(
FAILED
(
hr
))
ERR
(
"ReleaseBuffer failed: %08x
\n
"
,
hr
);
if
(
packet
>
0
)
WARN
(
"losing %u frames
\n
"
,
packet
);
device
->
played_frames
+=
packet_len
;
}
...
...
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