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
e3b23cb6
Commit
e3b23cb6
authored
Oct 12, 2023
by
Rémi Bernon
Committed by
Alexandre Julliard
Oct 13, 2023
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
dmime: Implement band track IDirectMusicTrack_Play.
parent
fd68076c
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
66 additions
and
27 deletions
+66
-27
band.c
dlls/dmband/band.c
+34
-0
bandtrack.c
dlls/dmband/bandtrack.c
+27
-11
dmband_private.h
dlls/dmband/dmband_private.h
+2
-0
dmband.c
dlls/dmband/tests/dmband.c
+0
-1
dmime.c
dlls/dmime/tests/dmime.c
+3
-15
No files found.
dlls/dmband/band.c
View file @
e3b23cb6
...
...
@@ -486,3 +486,37 @@ HRESULT band_connect_to_collection(IDirectMusicBand *iface, IDirectMusicCollecti
return
S_OK
;
}
HRESULT
band_send_messages
(
IDirectMusicBand
*
iface
,
IDirectMusicPerformance
*
performance
,
IDirectMusicGraph
*
graph
,
MUSIC_TIME
time
,
DWORD
track_id
)
{
struct
band
*
This
=
impl_from_IDirectMusicBand
(
iface
);
struct
instrument_entry
*
entry
;
HRESULT
hr
=
S_OK
;
LIST_FOR_EACH_ENTRY_REV
(
entry
,
&
This
->
instruments
,
struct
instrument_entry
,
entry
)
{
DMUS_PATCH_PMSG
*
msg
;
if
(
FAILED
(
hr
=
IDirectMusicPerformance_AllocPMsg
(
performance
,
sizeof
(
*
msg
),
(
DMUS_PMSG
**
)
&
msg
)))
break
;
msg
->
mtTime
=
time
;
msg
->
dwFlags
=
DMUS_PMSGF_MUSICTIME
;
msg
->
dwPChannel
=
entry
->
instrument
.
dwPChannel
;
msg
->
dwVirtualTrackID
=
track_id
;
msg
->
dwType
=
DMUS_PMSGT_PATCH
;
msg
->
dwGroupID
=
1
;
msg
->
byInstrument
=
entry
->
instrument
.
dwPatch
;
if
(
FAILED
(
hr
=
IDirectMusicGraph_StampPMsg
(
graph
,
(
DMUS_PMSG
*
)
msg
))
||
FAILED
(
hr
=
IDirectMusicPerformance_SendPMsg
(
performance
,
(
DMUS_PMSG
*
)
msg
)))
{
IDirectMusicPerformance_FreePMsg
(
performance
,
(
DMUS_PMSG
*
)
msg
);
break
;
}
}
return
hr
;
}
dlls/dmband/bandtrack.c
View file @
e3b23cb6
...
...
@@ -159,22 +159,38 @@ static HRESULT WINAPI band_track_EndPlay(IDirectMusicTrack8 *iface, void *state_
}
static
HRESULT
WINAPI
band_track_Play
(
IDirectMusicTrack8
*
iface
,
void
*
state_data
,
MUSIC_TIME
mtStart
,
MUSIC_TIME
mtEnd
,
MUSIC_TIME
mtOffset
,
DWORD
flags
,
IDirectMusicPerformance
*
performance
,
IDirectMusicSegmentState
*
segment_state
,
DWORD
virtual_id
)
MUSIC_TIME
start_time
,
MUSIC_TIME
end_time
,
MUSIC_TIME
time_offset
,
DWORD
segment_flags
,
IDirectMusicPerformance
*
performance
,
IDirectMusicSegmentState
*
segment_state
,
DWORD
track_id
)
{
struct
band_track
*
This
=
impl_from_IDirectMusicTrack8
(
iface
);
IDirectMusicGraph
*
graph
;
struct
band_entry
*
entry
;
HRESULT
hr
;
FIXME
(
"(%p, %p, %ld, %ld, %ld, %lx, %p, %p, %ld): semi-stub
\n
"
,
This
,
state_data
,
mtStart
,
mtEnd
,
mtOffset
,
flags
,
performance
,
segment_state
,
virtual_id
);
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
);
/* Sends following pMSG:
- DMUS_PATCH_PMSG
- DMUS_TRANSPOSE_PMSG
- DMUS_CHANNEL_PRIORITY_PMSG
- DMUS_MIDI_PMSG
*/
if
(
!
performance
)
return
DMUS_S_END
;
return
S_OK
;
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
;
LIST_FOR_EACH_ENTRY
(
entry
,
&
This
->
bands
,
struct
band_entry
,
entry
)
{
if
(
FAILED
(
hr
=
band_send_messages
(
entry
->
band
,
performance
,
graph
,
entry
->
head
.
lBandTimeLogical
,
track_id
)))
break
;
}
IDirectMusicGraph_Release
(
graph
);
return
hr
;
}
static
HRESULT
WINAPI
band_track_GetParam
(
IDirectMusicTrack8
*
iface
,
REFGUID
type
,
MUSIC_TIME
time
,
...
...
dlls/dmband/dmband_private.h
View file @
e3b23cb6
...
...
@@ -48,5 +48,7 @@ extern HRESULT create_dmband(REFIID riid, void **ret_iface);
extern
HRESULT
create_dmbandtrack
(
REFIID
riid
,
void
**
ret_iface
);
extern
HRESULT
band_connect_to_collection
(
IDirectMusicBand
*
iface
,
IDirectMusicCollection
*
collection
);
extern
HRESULT
band_send_messages
(
IDirectMusicBand
*
iface
,
IDirectMusicPerformance
*
performance
,
IDirectMusicGraph
*
graph
,
MUSIC_TIME
time
,
DWORD
track_id
);
#endif
/* __WINE_DMBAND_PRIVATE_H */
dlls/dmband/tests/dmband.c
View file @
e3b23cb6
...
...
@@ -233,7 +233,6 @@ static void test_bandtrack(void)
hr
=
IDirectMusicTrack8_EndPlay
(
dmt8
,
NULL
);
ok
(
hr
==
S_OK
,
"IDirectMusicTrack8_EndPlay failed: %#lx
\n
"
,
hr
);
hr
=
IDirectMusicTrack8_Play
(
dmt8
,
NULL
,
0
,
0
,
0
,
0
,
NULL
,
NULL
,
0
);
todo_wine
ok
(
hr
==
DMUS_S_END
,
"IDirectMusicTrack8_Play failed: %#lx
\n
"
,
hr
);
hr
=
IDirectMusicTrack8_GetParam
(
dmt8
,
NULL
,
0
,
NULL
,
NULL
);
ok
(
hr
==
E_POINTER
,
"IDirectMusicTrack8_GetParam failed: %#lx
\n
"
,
hr
);
...
...
dlls/dmime/tests/dmime.c
View file @
e3b23cb6
...
...
@@ -3756,39 +3756,27 @@ static void test_band_track_play(void)
ret
=
test_tool_wait_message
(
tool
,
500
,
(
DMUS_PMSG
**
)
&
patch
);
ok
(
!
ret
,
"got %#lx
\n
"
,
ret
);
if
(
patch
->
dwType
==
DMUS_PMSGT_PATCH
)
{
check_dmus_patch_pmsg
(
patch
,
0
,
1
,
0
,
1
);
}
hr
=
IDirectMusicPerformance_FreePMsg
(
performance
,
(
DMUS_PMSG
*
)
patch
);
ok
(
hr
==
S_OK
,
"got %#lx
\n
"
,
hr
);
ret
=
test_tool_wait_message
(
tool
,
500
,
(
DMUS_PMSG
**
)
&
patch
);
todo_wine
ok
(
!
ret
,
"got %#lx
\n
"
,
ret
);
if
(
!
ret
)
{
ok
(
!
ret
,
"got %#lx
\n
"
,
ret
);
check_dmus_patch_pmsg
(
patch
,
1000
,
2
,
0
,
3
);
hr
=
IDirectMusicPerformance_FreePMsg
(
performance
,
(
DMUS_PMSG
*
)
patch
);
ok
(
hr
==
S_OK
,
"got %#lx
\n
"
,
hr
);
}
ret
=
test_tool_wait_message
(
tool
,
500
,
(
DMUS_PMSG
**
)
&
patch
);
todo_wine
ok
(
!
ret
,
"got %#lx
\n
"
,
ret
);
if
(
!
ret
)
{
ok
(
!
ret
,
"got %#lx
\n
"
,
ret
);
check_dmus_patch_pmsg
(
patch
,
1000
,
1
,
0
,
2
);
hr
=
IDirectMusicPerformance_FreePMsg
(
performance
,
(
DMUS_PMSG
*
)
patch
);
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