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
ca060d45
Commit
ca060d45
authored
Dec 03, 2019
by
Michael Stefaniuc
Committed by
Alexandre Julliard
Dec 04, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
dmime: Tempo track supports only GUID_TempoParam in GetParam().
Signed-off-by:
Michael Stefaniuc
<
mstefani@winehq.org
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
dc96d1b1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
39 additions
and
43 deletions
+39
-43
tempotrack.c
dlls/dmime/tempotrack.c
+34
-43
dmime.c
dlls/dmime/tests/dmime.c
+5
-0
No files found.
dlls/dmime/tempotrack.c
View file @
ca060d45
...
@@ -153,52 +153,43 @@ static HRESULT WINAPI tempo_track_Play(IDirectMusicTrack8 *iface, void *pStateDa
...
@@ -153,52 +153,43 @@ static HRESULT WINAPI tempo_track_Play(IDirectMusicTrack8 *iface, void *pStateDa
return
S_OK
;
return
S_OK
;
}
}
static
HRESULT
WINAPI
tempo_track_GetParam
(
IDirectMusicTrack8
*
iface
,
REFGUID
rguidTyp
e
,
static
HRESULT
WINAPI
tempo_track_GetParam
(
IDirectMusicTrack8
*
iface
,
REFGUID
type
,
MUSIC_TIME
tim
e
,
MUSIC_TIME
mtTime
,
MUSIC_TIME
*
pmtNext
,
void
*
pP
aram
)
MUSIC_TIME
*
next
,
void
*
p
aram
)
{
{
IDirectMusicTempoTrack
*
This
=
impl_from_IDirectMusicTrack8
(
iface
);
IDirectMusicTempoTrack
*
This
=
impl_from_IDirectMusicTrack8
(
iface
);
DMUS_PRIVATE_TEMPO_ITEM
*
item
=
NULL
;
HRESULT
hr
=
S_OK
;
DMUS_TEMPO_PARAM
*
prm
=
param
;
struct
list
*
pEntry
=
NULL
;
LPDMUS_PRIVATE_TEMPO_ITEM
pIt
=
NULL
;
TRACE
(
"(%p, %s, %d, %p, %p)
\n
"
,
This
,
debugstr_dmguid
(
type
),
time
,
next
,
param
);
DMUS_TEMPO_PARAM
*
prm
=
pParam
;
if
(
!
param
)
FIXME
(
"(%p, %s, %d, %p, %p): almost stub
\n
"
,
This
,
debugstr_dmguid
(
rguidType
),
mtTime
,
pmtNext
,
pParam
);
return
E_POINTER
;
if
(
!
IsEqualGUID
(
type
,
&
GUID_TempoParam
))
if
(
NULL
==
pParam
)
{
return
DMUS_E_GET_UNSUPPORTED
;
return
E_POINTER
;
}
FIXME
(
"Partial support for GUID_TempoParam
\n
"
);
if
(
next
)
*
next
=
0
;
prm
->
mtTime
=
0
;
prm
->
dblTempo
=
0
.
123456
;
LIST_FOR_EACH_ENTRY
(
item
,
&
This
->
Items
,
DMUS_PRIVATE_TEMPO_ITEM
,
entry
)
{
if
(
item
->
item
.
lTime
<=
time
)
{
MUSIC_TIME
ofs
=
item
->
item
.
lTime
-
time
;
if
(
ofs
>
prm
->
mtTime
)
{
prm
->
mtTime
=
ofs
;
prm
->
dblTempo
=
item
->
item
.
dblTempo
;
}
if
(
next
&&
item
->
item
.
lTime
>
time
&&
item
->
item
.
lTime
<
*
next
)
*
next
=
item
->
item
.
lTime
;
}
}
hr
=
IDirectMusicTrack_IsParamSupported
(
iface
,
rguidType
);
if
(
0
.
123456
==
prm
->
dblTempo
)
if
(
FAILED
(
hr
))
{
return
DMUS_E_NOT_FOUND
;
return
hr
;
}
if
(
NULL
!=
pmtNext
)
*
pmtNext
=
0
;
return
S_OK
;
prm
->
mtTime
=
0
;
prm
->
dblTempo
=
0
.
123456
;
LIST_FOR_EACH
(
pEntry
,
&
This
->
Items
)
{
pIt
=
LIST_ENTRY
(
pEntry
,
DMUS_PRIVATE_TEMPO_ITEM
,
entry
);
/*TRACE(" - %p -> 0x%lx,%p\n", pIt, pIt->item.lTime, pIt->item.dblTempo);*/
if
(
pIt
->
item
.
lTime
<=
mtTime
)
{
MUSIC_TIME
ofs
=
pIt
->
item
.
lTime
-
mtTime
;
if
(
ofs
>
prm
->
mtTime
)
{
prm
->
mtTime
=
ofs
;
prm
->
dblTempo
=
pIt
->
item
.
dblTempo
;
}
if
(
NULL
!=
pmtNext
&&
pIt
->
item
.
lTime
>
mtTime
)
{
if
(
pIt
->
item
.
lTime
<
*
pmtNext
)
{
*
pmtNext
=
pIt
->
item
.
lTime
;
}
}
}
}
if
(
0
.
123456
==
prm
->
dblTempo
)
{
return
DMUS_E_NOT_FOUND
;
}
return
S_OK
;
}
}
static
HRESULT
WINAPI
tempo_track_SetParam
(
IDirectMusicTrack8
*
iface
,
REFGUID
type
,
MUSIC_TIME
time
,
static
HRESULT
WINAPI
tempo_track_SetParam
(
IDirectMusicTrack8
*
iface
,
REFGUID
type
,
MUSIC_TIME
time
,
...
...
dlls/dmime/tests/dmime.c
View file @
ca060d45
...
@@ -724,6 +724,11 @@ static void test_track(void)
...
@@ -724,6 +724,11 @@ static void test_track(void)
DMUS_E_GET_UNSUPPORTED
);
DMUS_E_GET_UNSUPPORTED
);
expect_setparam
(
dmt
,
&
GUID_TimeSignature
,
"GUID_TimeSignature"
,
expect_setparam
(
dmt
,
&
GUID_TimeSignature
,
"GUID_TimeSignature"
,
DMUS_E_SET_UNSUPPORTED
);
DMUS_E_SET_UNSUPPORTED
);
}
else
if
(
class
[
i
].
clsid
==
&
CLSID_DirectMusicTempoTrack
)
{
expect_getparam
(
dmt
,
&
GUID_DisableTempo
,
"GUID_DisableTempo"
,
DMUS_E_GET_UNSUPPORTED
);
expect_getparam
(
dmt
,
&
GUID_EnableTempo
,
"GUID_EnableTempo"
,
DMUS_E_GET_UNSUPPORTED
);
}
}
}
}
}
else
{
}
else
{
...
...
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