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
0d567ff9
Commit
0d567ff9
authored
Oct 11, 2011
by
Andrew Eikum
Committed by
Alexandre Julliard
Oct 12, 2011
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
winmm: Also track input device position.
parent
1ed42313
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
11 additions
and
0 deletions
+11
-0
capture.c
dlls/winmm/tests/capture.c
+7
-0
waveform.c
dlls/winmm/waveform.c
+4
-0
No files found.
dlls/winmm/tests/capture.c
View file @
0d567ff9
...
...
@@ -133,6 +133,7 @@ static void wave_in_test_deviceIn(int device, LPWAVEFORMATEX pwfx, DWORD format,
WAVEHDR
frag
;
MMRESULT
rc
;
DWORD
res
;
MMTIME
mmt
;
WORD
nChannels
=
pwfx
->
nChannels
;
WORD
wBitsPerSample
=
pwfx
->
wBitsPerSample
;
DWORD
nSamplesPerSec
=
pwfx
->
nSamplesPerSec
;
...
...
@@ -224,6 +225,12 @@ static void wave_in_test_deviceIn(int device, LPWAVEFORMATEX pwfx, DWORD format,
"frag.dwBytesRecorded=%d, should=%d
\n
"
,
frag
.
dwBytesRecorded
,
pwfx
->
nAvgBytesPerSec
);
mmt
.
wType
=
TIME_SAMPLES
;
rc
=
waveInGetPosition
(
win
,
&
mmt
,
sizeof
(
mmt
));
ok
(
rc
==
MMSYSERR_NOERROR
,
"waveInGetPosition(%s): rc=%s
\n
"
,
dev_name
(
device
),
wave_in_error
(
rc
));
ok
(
mmt
.
u
.
cb
==
frag
.
dwBytesRecorded
,
"Got wrong position: %u
\n
"
,
mmt
.
u
.
cb
);
/* stop playing on error */
if
(
res
!=
WAIT_OBJECT_0
)
{
rc
=
waveInStop
(
win
);
...
...
dlls/winmm/waveform.c
View file @
0d567ff9
...
...
@@ -1495,6 +1495,8 @@ static void WID_PullACMData(WINMM_Device *device)
hr
=
IAudioCaptureClient_ReleaseBuffer
(
device
->
capture
,
packet
);
if
(
FAILED
(
hr
))
ERR
(
"ReleaseBuffer failed: %08x
\n
"
,
hr
);
device
->
played_frames
+=
packet
;
}
queue
=
device
->
first
;
...
...
@@ -1602,6 +1604,8 @@ static void WID_PullData(WINMM_Device *device)
hr
=
IAudioCaptureClient_ReleaseBuffer
(
device
->
capture
,
packet_len
);
if
(
FAILED
(
hr
))
ERR
(
"ReleaseBuffer failed: %08x
\n
"
,
hr
);
device
->
played_frames
+=
packet_len
;
}
exit:
...
...
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