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
654b970b
Commit
654b970b
authored
Jun 26, 2023
by
Alistair Leslie-Hughes
Committed by
Alexandre Julliard
Jun 28, 2023
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
dsdmo: Add Flanger effect stub.
parent
e2258279
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
108 additions
and
2 deletions
+108
-2
dsdmo.idl
dlls/dsdmo/dsdmo.idl
+8
-0
main.c
dlls/dsdmo/main.c
+95
-0
dsdmo.c
dlls/dsdmo/tests/dsdmo.c
+5
-2
No files found.
dlls/dsdmo/dsdmo.idl
View file @
654b970b
...
...
@@ -65,3 +65,11 @@ coclass DirectSoundCompressorDMO {}
vi_progid
(
"Microsoft.DirectSoundChorusDMO"
)
]
coclass
DirectSoundChorusDMO
{}
[
uuid
(
efca3d92
-
dfd8
-
4672
-
a603
-
7420894b
ad98
),
threading
(
both
),
progid
(
"Microsoft.DirectSoundFlangerDMO.1"
),
vi_progid
(
"Microsoft.DirectSoundFlangerDMO"
)
]
coclass
DirectSoundFlangerDMO
{}
dlls/dsdmo/main.c
View file @
654b970b
...
...
@@ -1233,6 +1233,100 @@ static HRESULT chorus_create(IUnknown *outer, IUnknown **out)
return
S_OK
;
}
struct
dmo_flangerfx
{
struct
effect
effect
;
IDirectSoundFXFlanger
IDirectSoundFXFlanger_iface
;
};
static
inline
struct
dmo_flangerfx
*
impl_from_IDirectSoundFXFlanger
(
IDirectSoundFXFlanger
*
iface
)
{
return
CONTAINING_RECORD
(
iface
,
struct
dmo_flangerfx
,
IDirectSoundFXFlanger_iface
);
}
static
HRESULT
WINAPI
flangerfx_QueryInterface
(
IDirectSoundFXFlanger
*
iface
,
REFIID
iid
,
void
**
out
)
{
struct
dmo_flangerfx
*
effect
=
impl_from_IDirectSoundFXFlanger
(
iface
);
return
IUnknown_QueryInterface
(
effect
->
effect
.
outer_unk
,
iid
,
out
);
}
static
ULONG
WINAPI
flangerfx_AddRef
(
IDirectSoundFXFlanger
*
iface
)
{
struct
dmo_flangerfx
*
effect
=
impl_from_IDirectSoundFXFlanger
(
iface
);
return
IUnknown_AddRef
(
effect
->
effect
.
outer_unk
);
}
static
ULONG
WINAPI
flangerfx_Release
(
IDirectSoundFXFlanger
*
iface
)
{
struct
dmo_flangerfx
*
effect
=
impl_from_IDirectSoundFXFlanger
(
iface
);
return
IUnknown_Release
(
effect
->
effect
.
outer_unk
);
}
static
HRESULT
WINAPI
flangerfx_SetAllParameters
(
IDirectSoundFXFlanger
*
iface
,
const
DSFXFlanger
*
flanger
)
{
struct
dmo_flangerfx
*
This
=
impl_from_IDirectSoundFXFlanger
(
iface
);
FIXME
(
"(%p) %p
\n
"
,
This
,
flanger
);
return
E_NOTIMPL
;
}
static
HRESULT
WINAPI
flangerfx_GetAllParameters
(
IDirectSoundFXFlanger
*
iface
,
DSFXFlanger
*
flanger
)
{
struct
dmo_flangerfx
*
This
=
impl_from_IDirectSoundFXFlanger
(
iface
);
FIXME
(
"(%p) %p
\n
"
,
This
,
flanger
);
return
E_NOTIMPL
;
}
static
const
struct
IDirectSoundFXFlangerVtbl
flanger_vtbl
=
{
flangerfx_QueryInterface
,
flangerfx_AddRef
,
flangerfx_Release
,
flangerfx_SetAllParameters
,
flangerfx_GetAllParameters
};
static
struct
dmo_flangerfx
*
impl_flanger_from_effect
(
struct
effect
*
iface
)
{
return
CONTAINING_RECORD
(
iface
,
struct
dmo_flangerfx
,
effect
);
}
static
void
*
flanger_query_interface
(
struct
effect
*
iface
,
REFIID
iid
)
{
struct
dmo_flangerfx
*
effect
=
impl_flanger_from_effect
(
iface
);
if
(
IsEqualGUID
(
iid
,
&
IID_IDirectSoundFXFlanger
))
return
&
effect
->
IDirectSoundFXFlanger_iface
;
return
NULL
;
}
static
void
flanger_destroy
(
struct
effect
*
iface
)
{
struct
dmo_flangerfx
*
effect
=
impl_flanger_from_effect
(
iface
);
free
(
effect
);
}
static
const
struct
effect_ops
flanger_ops
=
{
.
destroy
=
flanger_destroy
,
.
query_interface
=
flanger_query_interface
,
};
static
HRESULT
flanger_create
(
IUnknown
*
outer
,
IUnknown
**
out
)
{
struct
dmo_flangerfx
*
object
;
if
(
!
(
object
=
calloc
(
1
,
sizeof
(
*
object
))))
return
E_OUTOFMEMORY
;
effect_init
(
&
object
->
effect
,
outer
,
&
flanger_ops
);
object
->
IDirectSoundFXFlanger_iface
.
lpVtbl
=
&
flanger_vtbl
;
TRACE
(
"Created flanger effect %p.
\n
"
,
object
);
*
out
=
&
object
->
effect
.
IUnknown_inner
;
return
S_OK
;
}
struct
class_factory
{
IClassFactory
IClassFactory_iface
;
...
...
@@ -1320,6 +1414,7 @@ class_factories[] =
{
&
GUID_DSFX_STANDARD_ECHO
,
{{
&
class_factory_vtbl
},
echo_create
}},
{
&
GUID_DSFX_STANDARD_COMPRESSOR
,
{{
&
class_factory_vtbl
},
compressor_create
}},
{
&
GUID_DSFX_STANDARD_CHORUS
,
{{
&
class_factory_vtbl
},
chorus_create
}},
{
&
GUID_DSFX_STANDARD_FLANGER
,
{{
&
class_factory_vtbl
},
flanger_create
}},
};
HRESULT
WINAPI
DllGetClassObject
(
REFCLSID
clsid
,
REFIID
iid
,
void
**
out
)
...
...
dlls/dsdmo/tests/dsdmo.c
View file @
654b970b
...
...
@@ -415,11 +415,14 @@ static void test_flanger_parameters(void)
hr
=
CoCreateInstance
(
&
GUID_DSFX_STANDARD_FLANGER
,
NULL
,
CLSCTX_INPROC_SERVER
,
&
IID_IDirectSoundFXFlanger
,
(
void
**
)
&
flanger
);
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
=
IDirectSoundFXFlanger_GetAllParameters
(
flanger
,
&
params
);
todo_wine
ok
(
hr
==
S_OK
,
"Got hr %#lx.
\n
"
,
hr
);
if
(
hr
!=
S_OK
)
return
;
ok
(
hr
==
S_OK
,
"Got hr %#lx.
\n
"
,
hr
);
ok
(
params
.
fWetDryMix
==
50
.
0
f
,
"Got %.8e%% wetness.
\n
"
,
params
.
fWetDryMix
);
ok
(
params
.
fDepth
==
100
.
0
f
,
"Got %.8e * 0.01%% depth.
\n
"
,
params
.
fDepth
);
...
...
@@ -551,7 +554,7 @@ START_TEST(dsdmo)
{
&
GUID_DSFX_STANDARD_COMPRESSOR
,
&
IID_IDirectSoundFXCompressor
},
{
&
GUID_DSFX_STANDARD_DISTORTION
,
&
IID_IDirectSoundFXDistortion
,
TRUE
},
{
&
GUID_DSFX_STANDARD_ECHO
,
&
IID_IDirectSoundFXEcho
},
{
&
GUID_DSFX_STANDARD_FLANGER
,
&
IID_IDirectSoundFXFlanger
,
TRUE
},
{
&
GUID_DSFX_STANDARD_FLANGER
,
&
IID_IDirectSoundFXFlanger
},
{
&
GUID_DSFX_STANDARD_GARGLE
,
&
IID_IDirectSoundFXGargle
,
TRUE
},
{
&
GUID_DSFX_STANDARD_I3DL2REVERB
,
&
IID_IDirectSoundFXI3DL2Reverb
},
{
&
GUID_DSFX_STANDARD_PARAMEQ
,
&
IID_IDirectSoundFXParamEq
},
...
...
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