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
a8763aab
Commit
a8763aab
authored
Oct 16, 2023
by
Rémi Bernon
Committed by
Alexandre Julliard
Oct 17, 2023
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
dmime: Use port latency time for messages with -1 time.
parent
72165fc8
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
1 deletion
+11
-1
performance.c
dlls/dmime/performance.c
+11
-1
No files found.
dlls/dmime/performance.c
View file @
a8763aab
...
...
@@ -490,7 +490,7 @@ static HRESULT WINAPI performance_SendPMsg(IDirectMusicPerformance8 *iface, DMUS
if
(
!
(
msg
->
dwFlags
&
DMUS_PMSGF_REFTIME
))
{
if
(
FAILED
(
hr
=
IDirectMusicPerformance8_MusicToReferenceTime
(
iface
,
msg
->
mtTime
,
&
msg
->
rtTime
)))
msg
->
mtTime
==
-
1
?
0
:
msg
->
mtTime
,
&
msg
->
rtTime
)))
goto
done
;
msg
->
dwFlags
|=
DMUS_PMSGF_REFTIME
;
}
...
...
@@ -1632,6 +1632,8 @@ static HRESULT WINAPI performance_tool_ProcessPMsg(IDirectMusicTool *iface,
static
const
UINT
event_size
=
sizeof
(
DMUS_EVENTHEADER
)
+
sizeof
(
DWORD
);
DMUS_BUFFERDESC
desc
=
{.
dwSize
=
sizeof
(
desc
),
.
cbBuffer
=
2
*
event_size
};
DMUS_MIDI_PMSG
*
midi
=
(
DMUS_MIDI_PMSG
*
)
msg
;
IReferenceClock
*
latency_clock
;
REFERENCE_TIME
latency_time
;
IDirectMusicBuffer
*
buffer
;
IDirectMusicPort
*
port
;
DWORD
group
,
channel
;
...
...
@@ -1644,6 +1646,13 @@ static HRESULT WINAPI performance_tool_ProcessPMsg(IDirectMusicTool *iface,
return
DMUS_S_FREE
;
}
if
(
SUCCEEDED
(
hr
=
IDirectMusicPort_GetLatencyClock
(
port
,
&
latency_clock
)))
{
if
(
FAILED
(
hr
=
IReferenceClock_GetTime
(
latency_clock
,
&
latency_time
)))
ERR
(
"Failed to get port latency time, hr %#lx
\n
"
,
hr
);
IReferenceClock_Release
(
latency_clock
);
}
value
|=
channel
;
value
|=
(
UINT
)
midi
->
bStatus
;
value
|=
(
UINT
)
midi
->
bByte1
<<
8
;
...
...
@@ -1651,6 +1660,7 @@ static HRESULT WINAPI performance_tool_ProcessPMsg(IDirectMusicTool *iface,
if
(
SUCCEEDED
(
hr
=
IDirectMusic_CreateMusicBuffer
(
This
->
dmusic
,
&
desc
,
&
buffer
,
NULL
)))
{
if
(
msg
->
rtTime
==
-
1
)
msg
->
rtTime
=
latency_time
;
hr
=
IDirectMusicBuffer_PackStructured
(
buffer
,
msg
->
rtTime
,
group
,
value
);
if
(
SUCCEEDED
(
hr
))
hr
=
IDirectMusicPort_PlayBuffer
(
port
,
buffer
);
IDirectMusicBuffer_Release
(
buffer
);
...
...
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