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
3ba24075
Commit
3ba24075
authored
Jul 27, 2020
by
Zebediah Figura
Committed by
Alexandre Julliard
Jul 28, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
dsdmo: Implement IDirectSoundFXParamEq parameters methods.
Signed-off-by:
Zebediah Figura
<
z.figura12@gmail.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
861cfee2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
36 additions
and
11 deletions
+36
-11
main.c
dlls/dsdmo/main.c
+15
-4
dsdmo.c
dlls/dsdmo/tests/dsdmo.c
+21
-7
No files found.
dlls/dsdmo/main.c
View file @
3ba24075
...
...
@@ -438,6 +438,7 @@ struct eq
{
struct
effect
effect
;
IDirectSoundFXParamEq
IDirectSoundFXParamEq_iface
;
DSFXParamEq
params
;
};
static
struct
eq
*
impl_from_IDirectSoundFXParamEq
(
IDirectSoundFXParamEq
*
iface
)
...
...
@@ -467,18 +468,24 @@ static HRESULT WINAPI eq_params_SetAllParameters(IDirectSoundFXParamEq *iface, c
{
struct
eq
*
effect
=
impl_from_IDirectSoundFXParamEq
(
iface
);
FIXME
(
"effect %p, params %p, stub!
\n
"
,
effect
,
params
);
TRACE
(
"effect %p, params %p.
\n
"
,
effect
,
params
);
return
E_NOTIMPL
;
EnterCriticalSection
(
&
effect
->
effect
.
cs
);
effect
->
params
=
*
params
;
LeaveCriticalSection
(
&
effect
->
effect
.
cs
);
return
S_OK
;
}
static
HRESULT
WINAPI
eq_params_GetAllParameters
(
IDirectSoundFXParamEq
*
iface
,
DSFXParamEq
*
params
)
{
struct
eq
*
effect
=
impl_from_IDirectSoundFXParamEq
(
iface
);
FIXME
(
"effect %p, params %p, stub!
\n
"
,
effect
,
params
);
TRACE
(
"effect %p, params %p.
\n
"
,
effect
,
params
);
return
E_NOTIMPL
;
EnterCriticalSection
(
&
effect
->
effect
.
cs
);
*
params
=
effect
->
params
;
LeaveCriticalSection
(
&
effect
->
effect
.
cs
);
return
S_OK
;
}
static
const
IDirectSoundFXParamEqVtbl
eq_params_vtbl
=
...
...
@@ -527,6 +534,10 @@ static HRESULT eq_create(IUnknown *outer, IUnknown **out)
effect_init
(
&
object
->
effect
,
outer
,
&
eq_ops
);
object
->
IDirectSoundFXParamEq_iface
.
lpVtbl
=
&
eq_params_vtbl
;
object
->
params
.
fCenter
=
8000
.
0
f
;
object
->
params
.
fBandwidth
=
12
.
0
f
;
object
->
params
.
fGain
=
0
.
0
f
;
TRACE
(
"Created equalizer effect %p.
\n
"
,
object
);
*
out
=
&
object
->
effect
.
IUnknown_inner
;
return
S_OK
;
...
...
dlls/dsdmo/tests/dsdmo.c
View file @
3ba24075
...
...
@@ -453,13 +453,27 @@ static void test_eq_parameters(void)
ok
(
hr
==
S_OK
,
"Got hr %#x.
\n
"
,
hr
);
hr
=
IDirectSoundFXParamEq_GetAllParameters
(
eq
,
&
params
);
todo_wine
ok
(
hr
==
S_OK
,
"Got hr %#x.
\n
"
,
hr
);
if
(
hr
==
S_OK
)
{
ok
(
params
.
fCenter
==
8000
.
0
f
,
"Got center frequency %.8e Hz.
\n
"
,
params
.
fCenter
);
ok
(
params
.
fBandwidth
==
12
.
0
f
,
"Got band width %.8e semitones.
\n
"
,
params
.
fBandwidth
);
ok
(
params
.
fGain
==
0
.
0
f
,
"Got gain %.8e.
\n
"
,
params
.
fGain
);
}
ok
(
hr
==
S_OK
,
"Got hr %#x.
\n
"
,
hr
);
ok
(
params
.
fCenter
==
8000
.
0
f
,
"Got center frequency %.8e Hz.
\n
"
,
params
.
fCenter
);
ok
(
params
.
fBandwidth
==
12
.
0
f
,
"Got band width %.8e semitones.
\n
"
,
params
.
fBandwidth
);
ok
(
params
.
fGain
==
0
.
0
f
,
"Got gain %.8e.
\n
"
,
params
.
fGain
);
params
.
fCenter
=
79
.
0
f
;
hr
=
IDirectSoundFXParamEq_SetAllParameters
(
eq
,
&
params
);
todo_wine
ok
(
hr
==
E_INVALIDARG
,
"Got hr %#x.
\n
"
,
hr
);
params
.
fCenter
=
16001
.
0
f
;
hr
=
IDirectSoundFXParamEq_SetAllParameters
(
eq
,
&
params
);
todo_wine
ok
(
hr
==
E_INVALIDARG
,
"Got hr %#x.
\n
"
,
hr
);
params
.
fCenter
=
738
.
0
f
;
hr
=
IDirectSoundFXParamEq_SetAllParameters
(
eq
,
&
params
);
ok
(
hr
==
S_OK
,
"Got hr %#x.
\n
"
,
hr
);
memset
(
&
params
,
0xcc
,
sizeof
(
params
));
hr
=
IDirectSoundFXParamEq_GetAllParameters
(
eq
,
&
params
);
ok
(
hr
==
S_OK
,
"Got hr %#x.
\n
"
,
hr
);
ok
(
params
.
fCenter
==
738
.
0
f
,
"Got center frequency %.8e Hz.
\n
"
,
params
.
fCenter
);
ok
(
params
.
fBandwidth
==
12
.
0
f
,
"Got band width %.8e semitones.
\n
"
,
params
.
fBandwidth
);
ok
(
params
.
fGain
==
0
.
0
f
,
"Got gain %.8e.
\n
"
,
params
.
fGain
);
ref
=
IDirectSoundFXParamEq_Release
(
eq
);
ok
(
!
ref
,
"Got outstanding refcount %d.
\n
"
,
ref
);
...
...
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