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
a4b006e7
Commit
a4b006e7
authored
Sep 06, 2023
by
Rémi Bernon
Committed by
Alexandre Julliard
Oct 13, 2023
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
dmime: Output DMUS_MIDI_PMSG into a music buffer on the port.
parent
e3b23cb6
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
33 additions
and
0 deletions
+33
-0
performance.c
dlls/dmime/performance.c
+33
-0
No files found.
dlls/dmime/performance.c
View file @
a4b006e7
...
...
@@ -1637,6 +1637,39 @@ static HRESULT WINAPI performance_tool_ProcessPMsg(IDirectMusicTool *iface,
switch
(
msg
->
dwType
)
{
case
DMUS_PMSGT_MIDI
:
{
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
;
IDirectMusicBuffer
*
buffer
;
IDirectMusicPort
*
port
;
DWORD
group
,
channel
;
UINT
value
=
0
;
if
(
FAILED
(
hr
=
IDirectMusicPerformance_PChannelInfo
(
performance
,
msg
->
dwPChannel
,
&
port
,
&
group
,
&
channel
)))
{
WARN
(
"Failed to get message port, hr %#lx
\n
"
,
hr
);
return
DMUS_S_FREE
;
}
value
|=
channel
;
value
|=
(
UINT
)
midi
->
bStatus
;
value
|=
(
UINT
)
midi
->
bByte1
<<
8
;
value
|=
(
UINT
)
midi
->
bByte2
<<
16
;
if
(
SUCCEEDED
(
hr
=
IDirectMusic_CreateMusicBuffer
(
This
->
dmusic
,
&
desc
,
&
buffer
,
NULL
)))
{
hr
=
IDirectMusicBuffer_PackStructured
(
buffer
,
msg
->
rtTime
,
group
,
value
);
if
(
SUCCEEDED
(
hr
))
hr
=
IDirectMusicPort_PlayBuffer
(
port
,
buffer
);
IDirectMusicBuffer_Release
(
buffer
);
}
IDirectMusicPort_Release
(
port
);
break
;
}
case
DMUS_PMSGT_NOTIFICATION
:
{
DMUS_NOTIFICATION_PMSG
*
notif
=
(
DMUS_NOTIFICATION_PMSG
*
)
msg
;
...
...
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