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
fd68076c
Commit
fd68076c
authored
Sep 11, 2023
by
Rémi Bernon
Committed by
Alexandre Julliard
Oct 13, 2023
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
dmime: Implement sequence track IDirectMusicTrack_Play.
parent
b0573f9d
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
91 additions
and
17 deletions
+91
-17
seqtrack.c
dlls/dmime/seqtrack.c
+89
-6
dmime.c
dlls/dmime/tests/dmime.c
+2
-11
No files found.
dlls/dmime/seqtrack.c
View file @
fd68076c
...
...
@@ -108,13 +108,96 @@ static HRESULT WINAPI sequence_track_EndPlay(IDirectMusicTrack8 *iface, void *pS
return
S_OK
;
}
static
HRESULT
WINAPI
sequence_track_Play
(
IDirectMusicTrack8
*
iface
,
void
*
pStateD
ata
,
MUSIC_TIME
mtStart
,
MUSIC_TIME
mtEnd
,
MUSIC_TIME
mtOffset
,
DWORD
dwF
lags
,
IDirectMusicPerformance
*
p
Perf
,
IDirectMusicSegmentState
*
pSegSt
,
DWORD
dwVirtualID
)
static
HRESULT
WINAPI
sequence_track_Play
(
IDirectMusicTrack8
*
iface
,
void
*
state_d
ata
,
MUSIC_TIME
start_time
,
MUSIC_TIME
end_time
,
MUSIC_TIME
time_offset
,
DWORD
segment_f
lags
,
IDirectMusicPerformance
*
p
erformance
,
IDirectMusicSegmentState
*
segment_state
,
DWORD
track_id
)
{
struct
sequence_track
*
This
=
impl_from_IDirectMusicTrack8
(
iface
);
FIXME
(
"(%p, %p, %ld, %ld, %ld, %ld, %p, %p, %ld): stub
\n
"
,
This
,
pStateData
,
mtStart
,
mtEnd
,
mtOffset
,
dwFlags
,
pPerf
,
pSegSt
,
dwVirtualID
);
return
S_OK
;
struct
sequence_track
*
This
=
impl_from_IDirectMusicTrack8
(
iface
);
IDirectMusicGraph
*
graph
;
HRESULT
hr
;
UINT
i
;
TRACE
(
"(%p, %p, %ld, %ld, %ld, %#lx, %p, %p, %ld)
\n
"
,
This
,
state_data
,
start_time
,
end_time
,
time_offset
,
segment_flags
,
performance
,
segment_state
,
track_id
);
if
(
start_time
!=
0
)
FIXME
(
"start_time %ld not implemented
\n
"
,
start_time
);
if
(
end_time
!=
-
1
)
FIXME
(
"end_time %ld not implemented
\n
"
,
end_time
);
if
(
time_offset
!=
0
)
FIXME
(
"time_offset %ld not implemented
\n
"
,
time_offset
);
if
(
segment_flags
)
FIXME
(
"segment_flags %#lx not implemented
\n
"
,
segment_flags
);
if
(
segment_state
)
FIXME
(
"segment_state %p not implemented
\n
"
,
segment_state
);
if
(
FAILED
(
hr
=
IDirectMusicPerformance_QueryInterface
(
performance
,
&
IID_IDirectMusicGraph
,
(
void
**
)
&
graph
)))
return
hr
;
for
(
i
=
0
;
SUCCEEDED
(
hr
)
&&
i
<
This
->
count
;
i
++
)
{
DMUS_IO_SEQ_ITEM
*
item
=
This
->
items
+
i
;
DMUS_NOTE_PMSG
*
msg
;
if
(
FAILED
(
hr
=
IDirectMusicPerformance_AllocPMsg
(
performance
,
sizeof
(
*
msg
),
(
DMUS_PMSG
**
)
&
msg
)))
break
;
msg
->
mtTime
=
item
->
mtTime
;
msg
->
dwFlags
=
DMUS_PMSGF_MUSICTIME
;
msg
->
dwPChannel
=
item
->
dwPChannel
;
msg
->
dwVirtualTrackID
=
track_id
;
msg
->
dwType
=
DMUS_PMSGT_NOTE
;
msg
->
dwGroupID
=
1
;
msg
->
mtDuration
=
item
->
mtDuration
;
msg
->
wMusicValue
=
item
->
bByte1
;
msg
->
nOffset
=
item
->
nOffset
;
msg
->
bVelocity
=
item
->
bByte2
;
msg
->
bFlags
=
1
;
msg
->
bMidiValue
=
item
->
bByte1
;
if
(
FAILED
(
hr
=
IDirectMusicGraph_StampPMsg
(
graph
,
(
DMUS_PMSG
*
)
msg
))
||
FAILED
(
hr
=
IDirectMusicPerformance_SendPMsg
(
performance
,
(
DMUS_PMSG
*
)
msg
)))
{
IDirectMusicPerformance_FreePMsg
(
performance
,
(
DMUS_PMSG
*
)
msg
);
break
;
}
}
for
(
i
=
0
;
SUCCEEDED
(
hr
)
&&
i
<
This
->
curve_count
;
i
++
)
{
DMUS_IO_CURVE_ITEM
*
item
=
This
->
curve_items
+
i
;
DMUS_CURVE_PMSG
*
msg
;
if
(
FAILED
(
hr
=
IDirectMusicPerformance_AllocPMsg
(
performance
,
sizeof
(
*
msg
),
(
DMUS_PMSG
**
)
&
msg
)))
break
;
msg
->
mtTime
=
item
->
mtStart
;
msg
->
dwFlags
=
DMUS_PMSGF_MUSICTIME
;
msg
->
dwPChannel
=
item
->
dwPChannel
;
msg
->
dwVirtualTrackID
=
track_id
;
msg
->
dwType
=
DMUS_PMSGT_CURVE
;
msg
->
mtDuration
=
item
->
mtDuration
;
msg
->
mtOriginalStart
=
item
->
mtStart
;
msg
->
mtResetDuration
=
item
->
mtResetDuration
;
msg
->
nStartValue
=
item
->
nStartValue
;
msg
->
nEndValue
=
item
->
nEndValue
;
msg
->
nResetValue
=
item
->
nResetValue
;
msg
->
nOffset
=
item
->
nOffset
;
msg
->
bType
=
item
->
bType
;
msg
->
bCurveShape
=
item
->
bCurveShape
;
msg
->
bCCData
=
item
->
bCCData
;
msg
->
bFlags
=
item
->
bFlags
;
msg
->
wParamType
=
item
->
wParamType
;
msg
->
wMergeIndex
=
item
->
wMergeIndex
;
if
(
FAILED
(
hr
=
IDirectMusicGraph_StampPMsg
(
graph
,
(
DMUS_PMSG
*
)
msg
))
||
FAILED
(
hr
=
IDirectMusicPerformance_SendPMsg
(
performance
,
(
DMUS_PMSG
*
)
msg
)))
{
IDirectMusicPerformance_FreePMsg
(
performance
,
(
DMUS_PMSG
*
)
msg
);
break
;
}
}
IDirectMusicGraph_Release
(
graph
);
return
hr
;
}
static
HRESULT
WINAPI
sequence_track_GetParam
(
IDirectMusicTrack8
*
iface
,
REFGUID
type
,
...
...
dlls/dmime/tests/dmime.c
View file @
fd68076c
...
...
@@ -3502,30 +3502,21 @@ static void test_sequence_track(void)
ret
=
test_tool_wait_message
(
tool
,
500
,
(
DMUS_PMSG
**
)
&
note
);
ok
(
!
ret
,
"got %#lx
\n
"
,
ret
);
if
(
note
->
dwType
==
DMUS_PMSGT_NOTE
)
{
check_dmus_note_pmsg
(
note
,
0
,
0
,
500
,
60
,
120
);
}
hr
=
IDirectMusicPerformance_FreePMsg
(
performance
,
(
DMUS_PMSG
*
)
note
);
ok
(
hr
==
S_OK
,
"got %#lx
\n
"
,
hr
);
ret
=
test_tool_wait_message
(
tool
,
500
,
(
DMUS_PMSG
**
)
&
note
);
todo_wine
ok
(
!
ret
,
"got %#lx
\n
"
,
ret
);
if
(
!
ret
)
{
ok
(
!
ret
,
"got %#lx
\n
"
,
ret
);
check_dmus_note_pmsg
(
note
,
1000
,
1
,
200
,
50
,
100
);
hr
=
IDirectMusicPerformance_FreePMsg
(
performance
,
(
DMUS_PMSG
*
)
note
);
ok
(
hr
==
S_OK
,
"got %#lx
\n
"
,
hr
);
}
ret
=
test_tool_wait_message
(
tool
,
500
,
&
msg
);
todo_wine
ok
(
!
ret
,
"got %#lx
\n
"
,
ret
);
if
(
!
ret
)
{
ok
(
!
ret
,
"got %#lx
\n
"
,
ret
);
ok
(
msg
->
dwType
==
DMUS_PMSGT_DIRTY
,
"got %#lx
\n
"
,
msg
->
dwType
);
hr
=
IDirectMusicPerformance_FreePMsg
(
performance
,
msg
);
ok
(
hr
==
S_OK
,
"got %#lx
\n
"
,
hr
);
}
IDirectMusicSegment_Release
(
segment
);
...
...
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