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
baddd558
Commit
baddd558
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 IDirectSoundFXI3DL2Reverb parameters methods.
Signed-off-by:
Zebediah Figura
<
z.figura12@gmail.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
9faa7af9
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
52 additions
and
20 deletions
+52
-20
main.c
dlls/dsdmo/main.c
+24
-4
dsdmo.c
dlls/dsdmo/tests/dsdmo.c
+28
-16
No files found.
dlls/dsdmo/main.c
View file @
baddd558
...
...
@@ -438,6 +438,7 @@ struct reverb
{
struct
effect
effect
;
IDirectSoundFXI3DL2Reverb
IDirectSoundFXI3DL2Reverb_iface
;
DSFXI3DL2Reverb
params
;
};
static
struct
reverb
*
impl_from_IDirectSoundFXI3DL2Reverb
(
IDirectSoundFXI3DL2Reverb
*
iface
)
...
...
@@ -467,18 +468,24 @@ static HRESULT WINAPI reverb_params_SetAllParameters(IDirectSoundFXI3DL2Reverb *
{
struct
reverb
*
effect
=
impl_from_IDirectSoundFXI3DL2Reverb
(
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
reverb_params_GetAllParameters
(
IDirectSoundFXI3DL2Reverb
*
iface
,
DSFXI3DL2Reverb
*
params
)
{
struct
reverb
*
effect
=
impl_from_IDirectSoundFXI3DL2Reverb
(
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
HRESULT
WINAPI
reverb_params_SetPreset
(
IDirectSoundFXI3DL2Reverb
*
iface
,
DWORD
preset
)
...
...
@@ -567,6 +574,19 @@ static HRESULT reverb_create(IUnknown *outer, IUnknown **out)
effect_init
(
&
object
->
effect
,
outer
,
&
reverb_ops
);
object
->
IDirectSoundFXI3DL2Reverb_iface
.
lpVtbl
=
&
reverb_params_vtbl
;
object
->
params
.
lRoom
=
DSFX_I3DL2REVERB_ROOM_DEFAULT
;
object
->
params
.
lRoomHF
=
DSFX_I3DL2REVERB_ROOMHF_DEFAULT
;
object
->
params
.
flRoomRolloffFactor
=
DSFX_I3DL2REVERB_ROOMROLLOFFFACTOR_DEFAULT
;
object
->
params
.
flDecayTime
=
DSFX_I3DL2REVERB_DECAYTIME_DEFAULT
;
object
->
params
.
flDecayHFRatio
=
DSFX_I3DL2REVERB_DECAYHFRATIO_DEFAULT
;
object
->
params
.
lReflections
=
DSFX_I3DL2REVERB_REFLECTIONS_DEFAULT
;
object
->
params
.
flReflectionsDelay
=
DSFX_I3DL2REVERB_REFLECTIONSDELAY_DEFAULT
;
object
->
params
.
lReverb
=
DSFX_I3DL2REVERB_REVERB_DEFAULT
;
object
->
params
.
flReverbDelay
=
DSFX_I3DL2REVERB_REVERBDELAY_DEFAULT
;
object
->
params
.
flDiffusion
=
DSFX_I3DL2REVERB_DIFFUSION_DEFAULT
;
object
->
params
.
flDensity
=
DSFX_I3DL2REVERB_DENSITY_DEFAULT
;
object
->
params
.
flHFReference
=
DSFX_I3DL2REVERB_HFREFERENCE_DEFAULT
;
TRACE
(
"Created I3DL2 reverb effect %p.
\n
"
,
object
);
*
out
=
&
object
->
effect
.
IUnknown_inner
;
return
S_OK
;
...
...
dlls/dsdmo/tests/dsdmo.c
View file @
baddd558
...
...
@@ -476,22 +476,34 @@ static void test_reverb_parameters(void)
ok
(
hr
==
S_OK
,
"Got hr %#x.
\n
"
,
hr
);
hr
=
IDirectSoundFXI3DL2Reverb_GetAllParameters
(
reverb
,
&
params
);
todo_wine
ok
(
hr
==
S_OK
,
"Got hr %#x.
\n
"
,
hr
);
if
(
hr
==
S_OK
)
{
ok
(
params
.
lRoom
==
-
1000
,
"Got room attenuation %d mB.
\n
"
,
params
.
lRoom
);
ok
(
params
.
lRoomHF
==
-
100
,
"Got room high-frequency attenuation %d mB.
\n
"
,
params
.
lRoomHF
);
ok
(
params
.
flRoomRolloffFactor
==
0
.
0
f
,
"Got room rolloff factor %.8e.
\n
"
,
params
.
flRoomRolloffFactor
);
ok
(
params
.
flDecayTime
==
1
.
49
f
,
"Got decay time %.8e s.
\n
"
,
params
.
flDecayTime
);
ok
(
params
.
flDecayHFRatio
==
0
.
83
f
,
"Got decay time ratio %.8e.
\n
"
,
params
.
flDecayHFRatio
);
ok
(
params
.
lReflections
==
-
2602
,
"Got early reflection attenuation %d mB.
\n
"
,
params
.
lReflections
);
ok
(
params
.
flReflectionsDelay
==
0
.
007
f
,
"Got first reflection delay %.8e s.
\n
"
,
params
.
flReflectionsDelay
);
ok
(
params
.
lReverb
==
200
,
"Got reverb attenuation %d mB.
\n
"
,
params
.
lReverb
);
ok
(
params
.
flReverbDelay
==
0
.
011
f
,
"Got reverb delay %.8e s.
\n
"
,
params
.
flReverbDelay
);
ok
(
params
.
flDiffusion
==
100
.
0
f
,
"Got diffusion %.8e%%.
\n
"
,
params
.
flDiffusion
);
ok
(
params
.
flDensity
==
100
.
0
f
,
"Got density %.8e%%.
\n
"
,
params
.
flDensity
);
ok
(
params
.
flHFReference
==
5000
.
0
f
,
"Got reference high frequency %.8e Hz.
\n
"
,
params
.
flHFReference
);
}
ok
(
hr
==
S_OK
,
"Got hr %#x.
\n
"
,
hr
);
ok
(
params
.
lRoom
==
-
1000
,
"Got room attenuation %d mB.
\n
"
,
params
.
lRoom
);
ok
(
params
.
lRoomHF
==
-
100
,
"Got room high-frequency attenuation %d mB.
\n
"
,
params
.
lRoomHF
);
ok
(
params
.
flRoomRolloffFactor
==
0
.
0
f
,
"Got room rolloff factor %.8e.
\n
"
,
params
.
flRoomRolloffFactor
);
ok
(
params
.
flDecayTime
==
1
.
49
f
,
"Got decay time %.8e s.
\n
"
,
params
.
flDecayTime
);
ok
(
params
.
flDecayHFRatio
==
0
.
83
f
,
"Got decay time ratio %.8e.
\n
"
,
params
.
flDecayHFRatio
);
ok
(
params
.
lReflections
==
-
2602
,
"Got early reflection attenuation %d mB.
\n
"
,
params
.
lReflections
);
ok
(
params
.
flReflectionsDelay
==
0
.
007
f
,
"Got first reflection delay %.8e s.
\n
"
,
params
.
flReflectionsDelay
);
ok
(
params
.
lReverb
==
200
,
"Got reverb attenuation %d mB.
\n
"
,
params
.
lReverb
);
ok
(
params
.
flReverbDelay
==
0
.
011
f
,
"Got reverb delay %.8e s.
\n
"
,
params
.
flReverbDelay
);
ok
(
params
.
flDiffusion
==
100
.
0
f
,
"Got diffusion %.8e%%.
\n
"
,
params
.
flDiffusion
);
ok
(
params
.
flDensity
==
100
.
0
f
,
"Got density %.8e%%.
\n
"
,
params
.
flDensity
);
ok
(
params
.
flHFReference
==
5000
.
0
f
,
"Got reference high frequency %.8e Hz.
\n
"
,
params
.
flHFReference
);
params
.
lRoom
=
-
10001
;
hr
=
IDirectSoundFXI3DL2Reverb_SetAllParameters
(
reverb
,
&
params
);
todo_wine
ok
(
hr
==
E_INVALIDARG
,
"Got hr %#x.
\n
"
,
hr
);
params
.
lRoom
=
1
;
hr
=
IDirectSoundFXI3DL2Reverb_SetAllParameters
(
reverb
,
&
params
);
todo_wine
ok
(
hr
==
E_INVALIDARG
,
"Got hr %#x.
\n
"
,
hr
);
params
.
lRoom
=
-
900
;
hr
=
IDirectSoundFXI3DL2Reverb_SetAllParameters
(
reverb
,
&
params
);
ok
(
hr
==
S_OK
,
"Got hr %#x.
\n
"
,
hr
);
memset
(
&
params
,
0xcc
,
sizeof
(
params
));
hr
=
IDirectSoundFXI3DL2Reverb_GetAllParameters
(
reverb
,
&
params
);
ok
(
hr
==
S_OK
,
"Got hr %#x.
\n
"
,
hr
);
ok
(
params
.
lRoom
==
-
900
,
"Got room attenuation %d mB.
\n
"
,
params
.
lRoom
);
ref
=
IDirectSoundFXI3DL2Reverb_Release
(
reverb
);
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