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
2722f2cb
Commit
2722f2cb
authored
Mar 10, 2013
by
Jörg Höhle
Committed by
Alexandre Julliard
Mar 12, 2013
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
winmm: Fix GetPosition when using MSACM codecs.
parent
78a52bd8
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
6 deletions
+5
-6
waveform.c
dlls/winmm/waveform.c
+5
-6
No files found.
dlls/winmm/waveform.c
View file @
2722f2cb
...
...
@@ -2035,7 +2035,7 @@ static LRESULT WINMM_Reset(HWAVE hwave)
}
static
MMRESULT
WINMM_FramesToMMTime
(
MMTIME
*
time
,
UINT32
played_frames
,
UINT32
sample_rate
,
UINT32
bytes_per_
frame
)
UINT32
sample_rate
,
UINT32
bytes_per_
sec
)
{
switch
(
time
->
wType
){
case
TIME_SAMPLES
:
...
...
@@ -2058,7 +2058,7 @@ static MMRESULT WINMM_FramesToMMTime(MMTIME *time, UINT32 played_frames,
time
->
wType
=
TIME_BYTES
;
/* fall through */
case
TIME_BYTES
:
time
->
u
.
cb
=
played_frames
*
bytes_per_frame
;
time
->
u
.
cb
=
MulDiv
(
played_frames
,
bytes_per_sec
,
sample_rate
)
;
return
MMSYSERR_NOERROR
;
}
}
...
...
@@ -2066,7 +2066,7 @@ static MMRESULT WINMM_FramesToMMTime(MMTIME *time, UINT32 played_frames,
static
LRESULT
WINMM_GetPosition
(
HWAVE
hwave
,
MMTIME
*
time
)
{
WINMM_Device
*
device
=
WINMM_GetDeviceFromHWAVE
(
hwave
);
UINT32
played_frames
,
sample_rate
,
bytes_per_
frame
;
UINT32
played_frames
,
sample_rate
,
bytes_per_
sec
;
TRACE
(
"(%p, %p)
\n
"
,
hwave
,
time
);
...
...
@@ -2075,12 +2075,11 @@ static LRESULT WINMM_GetPosition(HWAVE hwave, MMTIME *time)
played_frames
=
device
->
played_frames
;
sample_rate
=
device
->
orig_fmt
->
nSamplesPerSec
;
bytes_per_
frame
=
device
->
orig_fmt
->
nBlockAlign
;
bytes_per_
sec
=
device
->
orig_fmt
->
nAvgBytesPerSec
;
LeaveCriticalSection
(
&
device
->
lock
);
return
WINMM_FramesToMMTime
(
time
,
played_frames
,
sample_rate
,
bytes_per_frame
);
return
WINMM_FramesToMMTime
(
time
,
played_frames
,
sample_rate
,
bytes_per_sec
);
}
static
WINMM_MMDevice
*
WINMM_GetMixerMMDevice
(
HMIXEROBJ
hmix
,
DWORD
flags
,
...
...
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