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
e2258279
Commit
e2258279
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 Chorus effect stub.
parent
7255f63a
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 @
e2258279
...
...
@@ -57,3 +57,11 @@ coclass DirectSoundEchoDMO {}
vi_progid
(
"Microsoft.DirectSoundCompressorDMO"
)
]
coclass
DirectSoundCompressorDMO
{}
[
uuid
(
efe6629c
-
81
f7
-
4281
-
bd91
-
c9d604a95af6
),
threading
(
both
),
progid
(
"Microsoft.DirectSoundChorusDMO.1"
),
vi_progid
(
"Microsoft.DirectSoundChorusDMO"
)
]
coclass
DirectSoundChorusDMO
{}
dlls/dsdmo/main.c
View file @
e2258279
...
...
@@ -1139,6 +1139,100 @@ static HRESULT compressor_create(IUnknown *outer, IUnknown **out)
return
S_OK
;
}
struct
dmochorusfx
{
struct
effect
effect
;
IDirectSoundFXChorus
IDirectSoundFXChorus_iface
;
};
static
inline
struct
dmochorusfx
*
impl_from_IDirectSoundFXChorus
(
IDirectSoundFXChorus
*
iface
)
{
return
CONTAINING_RECORD
(
iface
,
struct
dmochorusfx
,
IDirectSoundFXChorus_iface
);
}
static
HRESULT
WINAPI
chorusfx_QueryInterface
(
IDirectSoundFXChorus
*
iface
,
REFIID
iid
,
void
**
out
)
{
struct
dmochorusfx
*
effect
=
impl_from_IDirectSoundFXChorus
(
iface
);
return
IUnknown_QueryInterface
(
effect
->
effect
.
outer_unk
,
iid
,
out
);
}
static
ULONG
WINAPI
chorusfx_AddRef
(
IDirectSoundFXChorus
*
iface
)
{
struct
dmochorusfx
*
effect
=
impl_from_IDirectSoundFXChorus
(
iface
);
return
IUnknown_AddRef
(
effect
->
effect
.
outer_unk
);
}
static
ULONG
WINAPI
chorusfx_Release
(
IDirectSoundFXChorus
*
iface
)
{
struct
dmochorusfx
*
effect
=
impl_from_IDirectSoundFXChorus
(
iface
);
return
IUnknown_Release
(
effect
->
effect
.
outer_unk
);
}
static
HRESULT
WINAPI
chorusfx_SetAllParameters
(
IDirectSoundFXChorus
*
iface
,
const
DSFXChorus
*
compressor
)
{
struct
dmochorusfx
*
This
=
impl_from_IDirectSoundFXChorus
(
iface
);
FIXME
(
"(%p) %p
\n
"
,
This
,
compressor
);
return
E_NOTIMPL
;
}
static
HRESULT
WINAPI
chorusfx_GetAllParameters
(
IDirectSoundFXChorus
*
iface
,
DSFXChorus
*
compressor
)
{
struct
dmochorusfx
*
This
=
impl_from_IDirectSoundFXChorus
(
iface
);
FIXME
(
"(%p) %p
\n
"
,
This
,
compressor
);
return
E_NOTIMPL
;
}
static
const
struct
IDirectSoundFXChorusVtbl
chorus_vtbl
=
{
chorusfx_QueryInterface
,
chorusfx_AddRef
,
chorusfx_Release
,
chorusfx_SetAllParameters
,
chorusfx_GetAllParameters
};
static
struct
dmochorusfx
*
implchorus_from_effect
(
struct
effect
*
iface
)
{
return
CONTAINING_RECORD
(
iface
,
struct
dmochorusfx
,
effect
);
}
static
void
*
chorus_query_interface
(
struct
effect
*
iface
,
REFIID
iid
)
{
struct
dmochorusfx
*
effect
=
implchorus_from_effect
(
iface
);
if
(
IsEqualGUID
(
iid
,
&
IID_IDirectSoundFXChorus
))
return
&
effect
->
IDirectSoundFXChorus_iface
;
return
NULL
;
}
static
void
chorus_destroy
(
struct
effect
*
iface
)
{
struct
dmochorusfx
*
effect
=
implchorus_from_effect
(
iface
);
free
(
effect
);
}
static
const
struct
effect_ops
chorus_ops
=
{
.
destroy
=
chorus_destroy
,
.
query_interface
=
chorus_query_interface
,
};
static
HRESULT
chorus_create
(
IUnknown
*
outer
,
IUnknown
**
out
)
{
struct
dmochorusfx
*
object
;
if
(
!
(
object
=
calloc
(
1
,
sizeof
(
*
object
))))
return
E_OUTOFMEMORY
;
effect_init
(
&
object
->
effect
,
outer
,
&
chorus_ops
);
object
->
IDirectSoundFXChorus_iface
.
lpVtbl
=
&
chorus_vtbl
;
TRACE
(
"Created chorus effect %p.
\n
"
,
object
);
*
out
=
&
object
->
effect
.
IUnknown_inner
;
return
S_OK
;
}
struct
class_factory
{
IClassFactory
IClassFactory_iface
;
...
...
@@ -1225,6 +1319,7 @@ class_factories[] =
{
&
GUID_DSFX_WAVES_REVERB
,
{{
&
class_factory_vtbl
},
waves_reverb_create
}},
{
&
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
}},
};
HRESULT
WINAPI
DllGetClassObject
(
REFCLSID
clsid
,
REFIID
iid
,
void
**
out
)
...
...
dlls/dsdmo/tests/dsdmo.c
View file @
e2258279
...
...
@@ -308,11 +308,14 @@ static void test_chorus_parameters(void)
hr
=
CoCreateInstance
(
&
GUID_DSFX_STANDARD_CHORUS
,
NULL
,
CLSCTX_INPROC_SERVER
,
&
IID_IDirectSoundFXChorus
,
(
void
**
)
&
chorus
);
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
=
IDirectSoundFXChorus_GetAllParameters
(
chorus
,
&
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 wetness %.8e%%.
\n
"
,
params
.
fWetDryMix
);
ok
(
params
.
fDepth
==
10
.
0
f
,
"Got depth %.8e.
\n
"
,
params
.
fDepth
);
...
...
@@ -544,7 +547,7 @@ START_TEST(dsdmo)
}
tests
[]
=
{
{
&
GUID_DSFX_STANDARD_CHORUS
,
&
IID_IDirectSoundFXChorus
,
TRUE
},
{
&
GUID_DSFX_STANDARD_CHORUS
,
&
IID_IDirectSoundFXChorus
},
{
&
GUID_DSFX_STANDARD_COMPRESSOR
,
&
IID_IDirectSoundFXCompressor
},
{
&
GUID_DSFX_STANDARD_DISTORTION
,
&
IID_IDirectSoundFXDistortion
,
TRUE
},
{
&
GUID_DSFX_STANDARD_ECHO
,
&
IID_IDirectSoundFXEcho
},
...
...
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