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
edad7809
Commit
edad7809
authored
Sep 25, 2023
by
Rémi Bernon
Committed by
Alexandre Julliard
Oct 11, 2023
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
dmime: Implement IDirectMusicTrack_Play for the wave track.
Wine-Bug:
https://bugs.winehq.org/show_bug.cgi?id=9027
Wine-Bug:
https://bugs.winehq.org/show_bug.cgi?id=34751
Wine-Bug:
https://bugs.winehq.org/show_bug.cgi?id=45135
Wine-Bug:
https://bugs.winehq.org/show_bug.cgi?id=48220
parent
4a7a8a7e
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
63 additions
and
13 deletions
+63
-13
dmime.c
dlls/dmime/tests/dmime.c
+1
-7
wavetrack.c
dlls/dmime/wavetrack.c
+62
-6
No files found.
dlls/dmime/tests/dmime.c
View file @
edad7809
...
@@ -3320,8 +3320,6 @@ static void test_wave_pmsg(void)
...
@@ -3320,8 +3320,6 @@ static void test_wave_pmsg(void)
ret
=
test_tool_wait_message
(
tool
,
500
,
(
DMUS_PMSG
**
)
&
wave
);
ret
=
test_tool_wait_message
(
tool
,
500
,
(
DMUS_PMSG
**
)
&
wave
);
ok
(
!
ret
,
"got %#lx
\n
"
,
ret
);
ok
(
!
ret
,
"got %#lx
\n
"
,
ret
);
if
(
wave
->
dwType
==
DMUS_PMSGT_WAVE
)
{
ok
(
wave
->
dwType
==
DMUS_PMSGT_WAVE
,
"got %p
\n
"
,
wave
);
ok
(
wave
->
dwType
==
DMUS_PMSGT_WAVE
,
"got %p
\n
"
,
wave
);
ok
(
!!
wave
->
punkUser
,
"got %p
\n
"
,
wave
->
punkUser
);
ok
(
!!
wave
->
punkUser
,
"got %p
\n
"
,
wave
->
punkUser
);
ok
(
wave
->
rtStartOffset
==
0
,
"got %I64d
\n
"
,
wave
->
rtStartOffset
);
ok
(
wave
->
rtStartOffset
==
0
,
"got %I64d
\n
"
,
wave
->
rtStartOffset
);
...
@@ -3330,18 +3328,14 @@ static void test_wave_pmsg(void)
...
@@ -3330,18 +3328,14 @@ static void test_wave_pmsg(void)
ok
(
wave
->
lVolume
==
0
,
"got %lu
\n
"
,
wave
->
lVolume
);
ok
(
wave
->
lVolume
==
0
,
"got %lu
\n
"
,
wave
->
lVolume
);
ok
(
wave
->
lPitch
==
0
,
"got %lu
\n
"
,
wave
->
lPitch
);
ok
(
wave
->
lPitch
==
0
,
"got %lu
\n
"
,
wave
->
lPitch
);
ok
(
wave
->
bFlags
==
0
,
"got %#x
\n
"
,
wave
->
bFlags
);
ok
(
wave
->
bFlags
==
0
,
"got %#x
\n
"
,
wave
->
bFlags
);
}
hr
=
IDirectMusicPerformance_FreePMsg
(
performance
,
(
DMUS_PMSG
*
)
wave
);
hr
=
IDirectMusicPerformance_FreePMsg
(
performance
,
(
DMUS_PMSG
*
)
wave
);
ok
(
hr
==
S_OK
,
"got %#lx
\n
"
,
hr
);
ok
(
hr
==
S_OK
,
"got %#lx
\n
"
,
hr
);
ret
=
test_tool_wait_message
(
tool
,
500
,
&
msg
);
ret
=
test_tool_wait_message
(
tool
,
500
,
&
msg
);
todo_wine
ok
(
!
ret
,
"got %#lx
\n
"
,
ret
);
ok
(
!
ret
,
"got %#lx
\n
"
,
ret
);
if
(
!
ret
)
{
ok
(
msg
->
dwType
==
DMUS_PMSGT_DIRTY
,
"got %p
\n
"
,
msg
);
ok
(
msg
->
dwType
==
DMUS_PMSGT_DIRTY
,
"got %p
\n
"
,
msg
);
hr
=
IDirectMusicPerformance_FreePMsg
(
performance
,
msg
);
hr
=
IDirectMusicPerformance_FreePMsg
(
performance
,
msg
);
ok
(
hr
==
S_OK
,
"got %#lx
\n
"
,
hr
);
ok
(
hr
==
S_OK
,
"got %#lx
\n
"
,
hr
);
}
hr
=
IDirectMusicSegment8_Unload
((
IDirectMusicSegment8
*
)
segment
,
(
IUnknown
*
)
performance
);
hr
=
IDirectMusicSegment8_Unload
((
IDirectMusicSegment8
*
)
segment
,
(
IUnknown
*
)
performance
);
ok
(
hr
==
S_OK
,
"got %#lx
\n
"
,
hr
);
ok
(
hr
==
S_OK
,
"got %#lx
\n
"
,
hr
);
...
...
dlls/dmime/wavetrack.c
View file @
edad7809
...
@@ -143,14 +143,70 @@ static HRESULT WINAPI wave_track_EndPlay(IDirectMusicTrack8 *iface, void *pState
...
@@ -143,14 +143,70 @@ static HRESULT WINAPI wave_track_EndPlay(IDirectMusicTrack8 *iface, void *pState
return
S_OK
;
return
S_OK
;
}
}
static
HRESULT
WINAPI
wave_track_Play
(
IDirectMusicTrack8
*
iface
,
void
*
pStateD
ata
,
static
HRESULT
WINAPI
wave_track_Play
(
IDirectMusicTrack8
*
iface
,
void
*
state_d
ata
,
MUSIC_TIME
mtStart
,
MUSIC_TIME
mtEnd
,
MUSIC_TIME
mtOffset
,
DWORD
dwF
lags
,
MUSIC_TIME
start_time
,
MUSIC_TIME
end_time
,
MUSIC_TIME
time_offset
,
DWORD
segment_f
lags
,
IDirectMusicPerformance
*
p
Perf
,
IDirectMusicSegmentState
*
pSegSt
,
DWORD
dwVirtualID
)
IDirectMusicPerformance
*
p
erformance
,
IDirectMusicSegmentState
*
segment_state
,
DWORD
track_id
)
{
{
struct
wave_track
*
This
=
impl_from_IDirectMusicTrack8
(
iface
);
struct
wave_track
*
This
=
impl_from_IDirectMusicTrack8
(
iface
);
FIXME
(
"(%p, %p, %ld, %ld, %ld, %ld, %p, %p, %ld): stub
\n
"
,
This
,
pStateData
,
mtStart
,
mtEnd
,
LONG
volume
=
This
->
header
.
lVolume
;
mtOffset
,
dwFlags
,
pPerf
,
pSegSt
,
dwVirtualID
);
IDirectMusicGraph
*
graph
;
return
S_OK
;
struct
wave_part
*
part
;
struct
wave_item
*
item
;
HRESULT
hr
;
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
;
LIST_FOR_EACH_ENTRY
(
part
,
&
This
->
parts
,
struct
wave_part
,
entry
)
{
volume
+=
part
->
header
.
lVolume
;
LIST_FOR_EACH_ENTRY
(
item
,
&
part
->
items
,
struct
wave_item
,
entry
)
{
DMUS_WAVE_PMSG
*
msg
;
if
(
!
item
->
buffer
)
continue
;
if
(
FAILED
(
hr
=
IDirectMusicPerformance_AllocPMsg
(
performance
,
sizeof
(
*
msg
),
(
DMUS_PMSG
**
)
&
msg
)))
break
;
msg
->
mtTime
=
item
->
header
.
rtTime
;
msg
->
dwFlags
=
DMUS_PMSGF_MUSICTIME
;
msg
->
dwPChannel
=
part
->
header
.
dwPChannel
;
msg
->
dwVirtualTrackID
=
track_id
;
msg
->
dwType
=
DMUS_PMSGT_WAVE
;
msg
->
punkUser
=
(
IUnknown
*
)
item
->
buffer
;
IDirectSoundBuffer_AddRef
(
item
->
buffer
);
msg
->
rtStartOffset
=
item
->
header
.
rtStartOffset
;
msg
->
rtDuration
=
item
->
header
.
rtDuration
;
msg
->
lVolume
=
volume
+
item
->
header
.
lVolume
;
msg
->
lPitch
=
item
->
header
.
lPitch
;
if
(
FAILED
(
hr
=
IDirectMusicGraph_StampPMsg
(
graph
,
(
DMUS_PMSG
*
)
msg
))
||
FAILED
(
hr
=
IDirectMusicPerformance_SendPMsg
(
performance
,
(
DMUS_PMSG
*
)
msg
)))
{
IDirectMusicPerformance_FreePMsg
(
performance
,
(
DMUS_PMSG
*
)
msg
);
break
;
}
}
volume
-=
part
->
header
.
lVolume
;
}
IDirectMusicGraph_Release
(
graph
);
return
hr
;
}
}
static
HRESULT
WINAPI
wave_track_GetParam
(
IDirectMusicTrack8
*
iface
,
REFGUID
type
,
MUSIC_TIME
time
,
static
HRESULT
WINAPI
wave_track_GetParam
(
IDirectMusicTrack8
*
iface
,
REFGUID
type
,
MUSIC_TIME
time
,
...
...
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