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
d37f0892
Commit
d37f0892
authored
Dec 02, 2023
by
Vijay Kiran Kamuju
Committed by
Alexandre Julliard
Dec 04, 2023
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
dsdmo: Add Gargle effect stub.
parent
cf6046af
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
109 additions
and
6 deletions
+109
-6
dsdmo.idl
dlls/dsdmo/dsdmo.idl
+8
-0
main.c
dlls/dsdmo/main.c
+95
-0
dsdmo.c
dlls/dsdmo/tests/dsdmo.c
+6
-6
No files found.
dlls/dsdmo/dsdmo.idl
View file @
d37f0892
...
...
@@ -81,3 +81,11 @@ coclass DirectSoundFlangerDMO {}
vi_progid
(
"Microsoft.DirectSoundDistortionDMO"
)
]
coclass
DirectSoundDistortionDMO
{}
[
uuid
(
dafd8210
-
5711
-
4b91
-
9
fe3
-
f75b7ae279bf
),
threading
(
both
),
progid
(
"Microsoft.DirectSoundGargleDMO.1"
),
vi_progid
(
"Microsoft.DirectSoundGargleDMO"
)
]
coclass
DirectSoundGargleDMO
{}
dlls/dsdmo/main.c
View file @
d37f0892
...
...
@@ -1433,6 +1433,100 @@ static HRESULT distortion_create(IUnknown *outer, IUnknown **out)
return
S_OK
;
}
struct
gargle
{
struct
effect
effect
;
IDirectSoundFXGargle
IDirectSoundFXGargle_iface
;
};
static
inline
struct
gargle
*
impl_from_IDirectSoundFXGargle
(
IDirectSoundFXGargle
*
iface
)
{
return
CONTAINING_RECORD
(
iface
,
struct
gargle
,
IDirectSoundFXGargle_iface
);
}
static
HRESULT
WINAPI
gargle_QueryInterface
(
IDirectSoundFXGargle
*
iface
,
REFIID
iid
,
void
**
out
)
{
struct
gargle
*
effect
=
impl_from_IDirectSoundFXGargle
(
iface
);
return
IUnknown_QueryInterface
(
effect
->
effect
.
outer_unk
,
iid
,
out
);
}
static
ULONG
WINAPI
gargle_AddRef
(
IDirectSoundFXGargle
*
iface
)
{
struct
gargle
*
effect
=
impl_from_IDirectSoundFXGargle
(
iface
);
return
IUnknown_AddRef
(
effect
->
effect
.
outer_unk
);
}
static
ULONG
WINAPI
gargle_Release
(
IDirectSoundFXGargle
*
iface
)
{
struct
gargle
*
effect
=
impl_from_IDirectSoundFXGargle
(
iface
);
return
IUnknown_Release
(
effect
->
effect
.
outer_unk
);
}
static
HRESULT
WINAPI
gargle_SetAllParameters
(
IDirectSoundFXGargle
*
iface
,
const
DSFXGargle
*
params
)
{
struct
gargle
*
This
=
impl_from_IDirectSoundFXGargle
(
iface
);
FIXME
(
"(%p) %p
\n
"
,
This
,
params
);
return
E_NOTIMPL
;
}
static
HRESULT
WINAPI
gargle_GetAllParameters
(
IDirectSoundFXGargle
*
iface
,
DSFXGargle
*
params
)
{
struct
gargle
*
This
=
impl_from_IDirectSoundFXGargle
(
iface
);
FIXME
(
"(%p) %p
\n
"
,
This
,
params
);
return
E_NOTIMPL
;
}
static
const
struct
IDirectSoundFXGargleVtbl
gargle_vtbl
=
{
gargle_QueryInterface
,
gargle_AddRef
,
gargle_Release
,
gargle_SetAllParameters
,
gargle_GetAllParameters
};
static
struct
gargle
*
impl_gargle_from_effect
(
struct
effect
*
iface
)
{
return
CONTAINING_RECORD
(
iface
,
struct
gargle
,
effect
);
}
static
void
*
gargle_query_interface
(
struct
effect
*
iface
,
REFIID
iid
)
{
struct
gargle
*
effect
=
impl_gargle_from_effect
(
iface
);
if
(
IsEqualGUID
(
iid
,
&
IID_IDirectSoundFXGargle
))
return
&
effect
->
IDirectSoundFXGargle_iface
;
return
NULL
;
}
static
void
gargle_destroy
(
struct
effect
*
iface
)
{
struct
gargle
*
effect
=
impl_gargle_from_effect
(
iface
);
free
(
effect
);
}
static
const
struct
effect_ops
gargle_ops
=
{
.
destroy
=
gargle_destroy
,
.
query_interface
=
gargle_query_interface
,
};
static
HRESULT
gargle_create
(
IUnknown
*
outer
,
IUnknown
**
out
)
{
struct
gargle
*
object
;
if
(
!
(
object
=
calloc
(
1
,
sizeof
(
*
object
))))
return
E_OUTOFMEMORY
;
effect_init
(
&
object
->
effect
,
outer
,
&
gargle_ops
);
object
->
IDirectSoundFXGargle_iface
.
lpVtbl
=
&
gargle_vtbl
;
TRACE
(
"Created gargle effect %p.
\n
"
,
object
);
*
out
=
&
object
->
effect
.
IUnknown_inner
;
return
S_OK
;
}
struct
class_factory
{
IClassFactory
IClassFactory_iface
;
...
...
@@ -1522,6 +1616,7 @@ class_factories[] =
{
&
GUID_DSFX_STANDARD_CHORUS
,
{{
&
class_factory_vtbl
},
chorus_create
}},
{
&
GUID_DSFX_STANDARD_FLANGER
,
{{
&
class_factory_vtbl
},
flanger_create
}},
{
&
GUID_DSFX_STANDARD_DISTORTION
,
{{
&
class_factory_vtbl
},
distortion_create
}},
{
&
GUID_DSFX_STANDARD_GARGLE
,
{{
&
class_factory_vtbl
},
gargle_create
}},
};
HRESULT
WINAPI
DllGetClassObject
(
REFCLSID
clsid
,
REFIID
iid
,
void
**
out
)
...
...
dlls/dsdmo/tests/dsdmo.c
View file @
d37f0892
...
...
@@ -446,12 +446,14 @@ static void test_gargle_parameters(void)
hr
=
CoCreateInstance
(
&
GUID_DSFX_STANDARD_GARGLE
,
NULL
,
CLSCTX_INPROC_SERVER
,
&
IID_IDirectSoundFXGargle
,
(
void
**
)
&
gargle
);
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
=
IDirectSoundFXGargle_GetAllParameters
(
gargle
,
&
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
.
dwRateHz
==
20
,
"Got rate %lu Hz.
\n
"
,
params
.
dwRateHz
);
ok
(
params
.
dwWaveShape
==
DSFXGARGLE_WAVE_TRIANGLE
,
"Got wave shape %lu.
\n
"
,
params
.
dwWaveShape
);
...
...
@@ -548,7 +550,6 @@ START_TEST(dsdmo)
{
const
GUID
*
clsid
;
const
GUID
*
iid
;
BOOL
todo
;
}
tests
[]
=
{
...
...
@@ -557,7 +558,7 @@ START_TEST(dsdmo)
{
&
GUID_DSFX_STANDARD_DISTORTION
,
&
IID_IDirectSoundFXDistortion
},
{
&
GUID_DSFX_STANDARD_ECHO
,
&
IID_IDirectSoundFXEcho
},
{
&
GUID_DSFX_STANDARD_FLANGER
,
&
IID_IDirectSoundFXFlanger
},
{
&
GUID_DSFX_STANDARD_GARGLE
,
&
IID_IDirectSoundFXGargle
,
TRUE
},
{
&
GUID_DSFX_STANDARD_GARGLE
,
&
IID_IDirectSoundFXGargle
},
{
&
GUID_DSFX_STANDARD_I3DL2REVERB
,
&
IID_IDirectSoundFXI3DL2Reverb
},
{
&
GUID_DSFX_STANDARD_PARAMEQ
,
&
IID_IDirectSoundFXParamEq
},
{
&
GUID_DSFX_WAVES_REVERB
,
&
IID_IDirectSoundFXWavesReverb
},
...
...
@@ -572,8 +573,7 @@ START_TEST(dsdmo)
HRESULT
hr
;
hr
=
CoCreateInstance
(
tests
[
i
].
clsid
,
NULL
,
CLSCTX_INPROC_SERVER
,
tests
[
i
].
iid
,
(
void
**
)
&
unk
);
todo_wine_if
(
tests
[
i
].
todo
)
ok
(
hr
==
S_OK
,
"Failed to create %s, hr %#lx.
\n
"
,
debugstr_guid
(
tests
[
i
].
clsid
),
hr
);
ok
(
hr
==
S_OK
,
"For clsid %s, got hr %#lx.
\n
"
,
debugstr_guid
(
tests
[
i
].
clsid
),
hr
);
if
(
hr
==
S_OK
)
IUnknown_Release
(
unk
);
else
...
...
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