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
6d8279f0
Commit
6d8279f0
authored
Aug 13, 2022
by
Alistair Leslie-Hughes
Committed by
Alexandre Julliard
Aug 17, 2022
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
dsdmo: Add Echo FX Support.
parent
98f546ed
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
110 additions
and
3 deletions
+110
-3
dsdmo.idl
dlls/dsdmo/dsdmo.idl
+8
-0
main.c
dlls/dsdmo/main.c
+97
-0
dsdmo.c
dlls/dsdmo/tests/dsdmo.c
+5
-3
No files found.
dlls/dsdmo/dsdmo.idl
View file @
6d8279f0
...
...
@@ -41,3 +41,11 @@ coclass DirectSoundParamEqDMO {}
uuid
(
87
fc0268
-
9
a55
-
4360
-
95
aa
-
004
a1d9de26c
)
]
coclass
DirectSoundWavesReverbDMO
{}
[
uuid
(
ef3e932c
-
d40b
-
4
f51
-
8
ccf
-
3
f98f1b29d5d
),
threading
(
both
),
progid
(
"Microsoft.DirectSoundEchoDMO.1"
),
vi_progid
(
"Microsoft.DirectSoundEchoDMO"
)
]
coclass
DirectSoundEchoDMO
{}
dlls/dsdmo/main.c
View file @
6d8279f0
...
...
@@ -947,6 +947,102 @@ static HRESULT waves_reverb_create(IUnknown *outer, IUnknown **out)
return
S_OK
;
}
struct
dmo_echofx
{
struct
effect
effect
;
IDirectSoundFXEcho
IDirectSoundFXEcho_iface
;
};
static
inline
struct
dmo_echofx
*
impl_from_IDirectSoundFXEcho
(
IDirectSoundFXEcho
*
iface
)
{
return
CONTAINING_RECORD
(
iface
,
struct
dmo_echofx
,
IDirectSoundFXEcho_iface
);
}
static
HRESULT
WINAPI
echofx_QueryInterface
(
IDirectSoundFXEcho
*
iface
,
REFIID
iid
,
void
**
out
)
{
struct
dmo_echofx
*
effect
=
impl_from_IDirectSoundFXEcho
(
iface
);
return
IUnknown_QueryInterface
(
effect
->
effect
.
outer_unk
,
iid
,
out
);
}
static
ULONG
WINAPI
echofx_AddRef
(
IDirectSoundFXEcho
*
iface
)
{
struct
dmo_echofx
*
effect
=
impl_from_IDirectSoundFXEcho
(
iface
);
return
IUnknown_AddRef
(
effect
->
effect
.
outer_unk
);
}
static
ULONG
WINAPI
echofx_Release
(
IDirectSoundFXEcho
*
iface
)
{
struct
dmo_echofx
*
effect
=
impl_from_IDirectSoundFXEcho
(
iface
);
return
IUnknown_Release
(
effect
->
effect
.
outer_unk
);
}
static
HRESULT
WINAPI
echofx_SetAllParameters
(
IDirectSoundFXEcho
*
iface
,
const
DSFXEcho
*
echo
)
{
struct
dmo_echofx
*
effect
=
impl_from_IDirectSoundFXEcho
(
iface
);
FIXME
(
"(%p) %p
\n
"
,
effect
,
echo
);
return
E_NOTIMPL
;
}
static
HRESULT
WINAPI
echofx_GetAllParameters
(
IDirectSoundFXEcho
*
iface
,
DSFXEcho
*
echo
)
{
struct
dmo_echofx
*
effect
=
impl_from_IDirectSoundFXEcho
(
iface
);
FIXME
(
"(%p) %p
\n
"
,
effect
,
echo
);
return
E_NOTIMPL
;
}
static
const
struct
IDirectSoundFXEchoVtbl
echofx_vtbl
=
{
echofx_QueryInterface
,
echofx_AddRef
,
echofx_Release
,
echofx_SetAllParameters
,
echofx_GetAllParameters
};
static
struct
dmo_echofx
*
impl_echo_from_effect
(
struct
effect
*
iface
)
{
return
CONTAINING_RECORD
(
iface
,
struct
dmo_echofx
,
effect
);
}
static
void
*
echo_query_interface
(
struct
effect
*
iface
,
REFIID
iid
)
{
struct
dmo_echofx
*
effect
=
impl_echo_from_effect
(
iface
);
if
(
IsEqualGUID
(
iid
,
&
IID_IDirectSoundFXEcho
))
return
&
effect
->
IDirectSoundFXEcho_iface
;
return
NULL
;
}
static
void
echo_destroy
(
struct
effect
*
iface
)
{
struct
dmo_echofx
*
effect
=
impl_echo_from_effect
(
iface
);
free
(
effect
);
}
static
const
struct
effect_ops
echo_ops
=
{
.
destroy
=
echo_destroy
,
.
query_interface
=
echo_query_interface
,
};
static
HRESULT
echo_create
(
IUnknown
*
outer
,
IUnknown
**
out
)
{
struct
dmo_echofx
*
object
;
if
(
!
(
object
=
calloc
(
1
,
sizeof
(
*
object
))))
return
E_OUTOFMEMORY
;
effect_init
(
&
object
->
effect
,
outer
,
&
echo_ops
);
object
->
IDirectSoundFXEcho_iface
.
lpVtbl
=
&
echofx_vtbl
;
TRACE
(
"Created echo effect %p.
\n
"
,
object
);
*
out
=
&
object
->
effect
.
IUnknown_inner
;
return
S_OK
;
}
struct
class_factory
{
IClassFactory
IClassFactory_iface
;
...
...
@@ -1031,6 +1127,7 @@ class_factories[] =
{
&
GUID_DSFX_STANDARD_I3DL2REVERB
,
{{
&
class_factory_vtbl
},
reverb_create
}},
{
&
GUID_DSFX_STANDARD_PARAMEQ
,
{{
&
class_factory_vtbl
},
eq_create
}},
{
&
GUID_DSFX_WAVES_REVERB
,
{{
&
class_factory_vtbl
},
waves_reverb_create
}},
{
&
GUID_DSFX_STANDARD_ECHO
,
{{
&
class_factory_vtbl
},
echo_create
}},
};
HRESULT
WINAPI
DllGetClassObject
(
REFCLSID
clsid
,
REFIID
iid
,
void
**
out
)
...
...
dlls/dsdmo/tests/dsdmo.c
View file @
6d8279f0
...
...
@@ -385,12 +385,14 @@ static void test_echo_parameters(void)
hr
=
CoCreateInstance
(
&
GUID_DSFX_STANDARD_ECHO
,
NULL
,
CLSCTX_INPROC_SERVER
,
&
IID_IDirectSoundFXEcho
,
(
void
**
)
&
echo
);
todo_wine
ok
(
hr
==
S_OK
,
"Got hr %#lx.
\n
"
,
hr
);
ok
(
hr
==
S_OK
,
"Got hr %#lx.
\n
"
,
hr
);
if
(
hr
!=
S_OK
)
return
;
hr
=
IDirectSoundFXEcho_GetAllParameters
(
echo
,
&
params
);
ok
(
hr
==
S_OK
,
"Got hr %#lx.
\n
"
,
hr
);
todo_wine
ok
(
hr
==
S_OK
,
"Got hr %#lx.
\n
"
,
hr
);
if
(
hr
!=
S_OK
)
return
;
ok
(
params
.
fWetDryMix
==
50
.
0
f
,
"Got %.8e%% wetness.
\n
"
,
params
.
fWetDryMix
);
ok
(
params
.
fFeedback
==
50
.
0
f
,
"Got %.8e%% feedback.
\n
"
,
params
.
fFeedback
);
ok
(
params
.
fLeftDelay
==
500
.
0
f
,
"Got left delay %.8e ms.
\n
"
,
params
.
fLeftDelay
);
...
...
@@ -545,7 +547,7 @@ START_TEST(dsdmo)
{
&
GUID_DSFX_STANDARD_CHORUS
,
&
IID_IDirectSoundFXChorus
,
TRUE
},
{
&
GUID_DSFX_STANDARD_COMPRESSOR
,
&
IID_IDirectSoundFXCompressor
,
TRUE
},
{
&
GUID_DSFX_STANDARD_DISTORTION
,
&
IID_IDirectSoundFXDistortion
,
TRUE
},
{
&
GUID_DSFX_STANDARD_ECHO
,
&
IID_IDirectSoundFXEcho
,
TRUE
},
{
&
GUID_DSFX_STANDARD_ECHO
,
&
IID_IDirectSoundFXEcho
},
{
&
GUID_DSFX_STANDARD_FLANGER
,
&
IID_IDirectSoundFXFlanger
,
TRUE
},
{
&
GUID_DSFX_STANDARD_GARGLE
,
&
IID_IDirectSoundFXGargle
,
TRUE
},
{
&
GUID_DSFX_STANDARD_I3DL2REVERB
,
&
IID_IDirectSoundFXI3DL2Reverb
},
...
...
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