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
cf6046af
Commit
cf6046af
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 Distortion effect stub.
Wine-Bug:
https://bugs.winehq.org/show_bug.cgi?id=55978
parent
28ca5625
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
108 additions
and
3 deletions
+108
-3
dsdmo.idl
dlls/dsdmo/dsdmo.idl
+8
-0
main.c
dlls/dsdmo/main.c
+95
-0
dsdmo.c
dlls/dsdmo/tests/dsdmo.c
+5
-3
No files found.
dlls/dsdmo/dsdmo.idl
View file @
cf6046af
...
...
@@ -73,3 +73,11 @@ coclass DirectSoundChorusDMO {}
vi_progid
(
"Microsoft.DirectSoundFlangerDMO"
)
]
coclass
DirectSoundFlangerDMO
{}
[
uuid
(
ef114c90
-
cd1d
-484e-96
e5
-
09
cfaf912a21
),
threading
(
both
),
progid
(
"Microsoft.DirectSoundDistortionDMO.1"
),
vi_progid
(
"Microsoft.DirectSoundDistortionDMO"
)
]
coclass
DirectSoundDistortionDMO
{}
dlls/dsdmo/main.c
View file @
cf6046af
...
...
@@ -1339,6 +1339,100 @@ static HRESULT flanger_create(IUnknown *outer, IUnknown **out)
return
S_OK
;
}
struct
distortion
{
struct
effect
effect
;
IDirectSoundFXDistortion
IDirectSoundFXDistortion_iface
;
};
static
inline
struct
distortion
*
impl_from_IDirectSoundFXDistortion
(
IDirectSoundFXDistortion
*
iface
)
{
return
CONTAINING_RECORD
(
iface
,
struct
distortion
,
IDirectSoundFXDistortion_iface
);
}
static
HRESULT
WINAPI
distortion_QueryInterface
(
IDirectSoundFXDistortion
*
iface
,
REFIID
iid
,
void
**
out
)
{
struct
distortion
*
effect
=
impl_from_IDirectSoundFXDistortion
(
iface
);
return
IUnknown_QueryInterface
(
effect
->
effect
.
outer_unk
,
iid
,
out
);
}
static
ULONG
WINAPI
distortion_AddRef
(
IDirectSoundFXDistortion
*
iface
)
{
struct
distortion
*
effect
=
impl_from_IDirectSoundFXDistortion
(
iface
);
return
IUnknown_AddRef
(
effect
->
effect
.
outer_unk
);
}
static
ULONG
WINAPI
distortion_Release
(
IDirectSoundFXDistortion
*
iface
)
{
struct
distortion
*
effect
=
impl_from_IDirectSoundFXDistortion
(
iface
);
return
IUnknown_Release
(
effect
->
effect
.
outer_unk
);
}
static
HRESULT
WINAPI
distortion_SetAllParameters
(
IDirectSoundFXDistortion
*
iface
,
const
DSFXDistortion
*
params
)
{
struct
distortion
*
This
=
impl_from_IDirectSoundFXDistortion
(
iface
);
FIXME
(
"(%p) %p
\n
"
,
This
,
params
);
return
E_NOTIMPL
;
}
static
HRESULT
WINAPI
distortion_GetAllParameters
(
IDirectSoundFXDistortion
*
iface
,
DSFXDistortion
*
params
)
{
struct
distortion
*
This
=
impl_from_IDirectSoundFXDistortion
(
iface
);
FIXME
(
"(%p) %p
\n
"
,
This
,
params
);
return
E_NOTIMPL
;
}
static
const
struct
IDirectSoundFXDistortionVtbl
distortion_vtbl
=
{
distortion_QueryInterface
,
distortion_AddRef
,
distortion_Release
,
distortion_SetAllParameters
,
distortion_GetAllParameters
};
static
struct
distortion
*
impl_distortion_from_effect
(
struct
effect
*
iface
)
{
return
CONTAINING_RECORD
(
iface
,
struct
distortion
,
effect
);
}
static
void
*
distortion_query_interface
(
struct
effect
*
iface
,
REFIID
iid
)
{
struct
distortion
*
effect
=
impl_distortion_from_effect
(
iface
);
if
(
IsEqualGUID
(
iid
,
&
IID_IDirectSoundFXDistortion
))
return
&
effect
->
IDirectSoundFXDistortion_iface
;
return
NULL
;
}
static
void
distortion_destroy
(
struct
effect
*
iface
)
{
struct
distortion
*
effect
=
impl_distortion_from_effect
(
iface
);
free
(
effect
);
}
static
const
struct
effect_ops
distortion_ops
=
{
.
destroy
=
distortion_destroy
,
.
query_interface
=
distortion_query_interface
,
};
static
HRESULT
distortion_create
(
IUnknown
*
outer
,
IUnknown
**
out
)
{
struct
distortion
*
object
;
if
(
!
(
object
=
calloc
(
1
,
sizeof
(
*
object
))))
return
E_OUTOFMEMORY
;
effect_init
(
&
object
->
effect
,
outer
,
&
distortion_ops
);
object
->
IDirectSoundFXDistortion_iface
.
lpVtbl
=
&
distortion_vtbl
;
TRACE
(
"Created distortion effect %p.
\n
"
,
object
);
*
out
=
&
object
->
effect
.
IUnknown_inner
;
return
S_OK
;
}
struct
class_factory
{
IClassFactory
IClassFactory_iface
;
...
...
@@ -1427,6 +1521,7 @@ class_factories[] =
{
&
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
}},
{
&
GUID_DSFX_STANDARD_DISTORTION
,
{{
&
class_factory_vtbl
},
distortion_create
}},
};
HRESULT
WINAPI
DllGetClassObject
(
REFCLSID
clsid
,
REFIID
iid
,
void
**
out
)
...
...
dlls/dsdmo/tests/dsdmo.c
View file @
cf6046af
...
...
@@ -363,12 +363,14 @@ static void test_distortion_parameters(void)
hr
=
CoCreateInstance
(
&
GUID_DSFX_STANDARD_DISTORTION
,
NULL
,
CLSCTX_INPROC_SERVER
,
&
IID_IDirectSoundFXDistortion
,
(
void
**
)
&
distortion
);
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
=
IDirectSoundFXDistortion_GetAllParameters
(
distortion
,
&
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
.
fGain
==
-
18
.
0
f
,
"Got gain %.8e dB.
\n
"
,
params
.
fGain
);
ok
(
params
.
fEdge
==
15
.
0
f
,
"Got edge %.8e%%.
\n
"
,
params
.
fEdge
);
ok
(
params
.
fPostEQCenterFrequency
==
2400
.
0
f
,
"Got center frequency %.8e Hz.
\n
"
,
params
.
fPostEQCenterFrequency
);
...
...
@@ -552,7 +554,7 @@ START_TEST(dsdmo)
{
{
&
GUID_DSFX_STANDARD_CHORUS
,
&
IID_IDirectSoundFXChorus
},
{
&
GUID_DSFX_STANDARD_COMPRESSOR
,
&
IID_IDirectSoundFXCompressor
},
{
&
GUID_DSFX_STANDARD_DISTORTION
,
&
IID_IDirectSoundFXDistortion
,
TRUE
},
{
&
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
},
...
...
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