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
39889f19
Commit
39889f19
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 Compressor FX Support.
parent
6d8279f0
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
109 additions
and
4 deletions
+109
-4
dsdmo.idl
dlls/dsdmo/dsdmo.idl
+8
-0
main.c
dlls/dsdmo/main.c
+97
-0
dsdmo.c
dlls/dsdmo/tests/dsdmo.c
+4
-4
No files found.
dlls/dsdmo/dsdmo.idl
View file @
39889f19
...
@@ -49,3 +49,11 @@ coclass DirectSoundWavesReverbDMO {}
...
@@ -49,3 +49,11 @@ coclass DirectSoundWavesReverbDMO {}
vi_progid
(
"Microsoft.DirectSoundEchoDMO"
)
vi_progid
(
"Microsoft.DirectSoundEchoDMO"
)
]
]
coclass
DirectSoundEchoDMO
{}
coclass
DirectSoundEchoDMO
{}
[
uuid
(
ef011f79
-
4000
-406d-87
af
-
bffb3fc39d57
),
threading
(
both
),
progid
(
"Microsoft.DirectSoundCompressorDMO.1"
),
vi_progid
(
"Microsoft.DirectSoundCompressorDMO"
)
]
coclass
DirectSoundCompressorDMO
{}
dlls/dsdmo/main.c
View file @
39889f19
...
@@ -1043,6 +1043,102 @@ static HRESULT echo_create(IUnknown *outer, IUnknown **out)
...
@@ -1043,6 +1043,102 @@ static HRESULT echo_create(IUnknown *outer, IUnknown **out)
return
S_OK
;
return
S_OK
;
}
}
struct
dmo_compressorfx
{
struct
effect
effect
;
IDirectSoundFXCompressor
IDirectSoundFXCompressor_iface
;
};
static
inline
struct
dmo_compressorfx
*
impl_from_IDirectSoundFXCompressor
(
IDirectSoundFXCompressor
*
iface
)
{
return
CONTAINING_RECORD
(
iface
,
struct
dmo_compressorfx
,
IDirectSoundFXCompressor_iface
);
}
static
HRESULT
WINAPI
compressorfx_QueryInterface
(
IDirectSoundFXCompressor
*
iface
,
REFIID
iid
,
void
**
out
)
{
struct
dmo_compressorfx
*
effect
=
impl_from_IDirectSoundFXCompressor
(
iface
);
return
IUnknown_QueryInterface
(
effect
->
effect
.
outer_unk
,
iid
,
out
);
}
static
ULONG
WINAPI
compressorfx_AddRef
(
IDirectSoundFXCompressor
*
iface
)
{
struct
dmo_compressorfx
*
effect
=
impl_from_IDirectSoundFXCompressor
(
iface
);
return
IUnknown_AddRef
(
effect
->
effect
.
outer_unk
);
}
static
ULONG
WINAPI
compressorfx_Release
(
IDirectSoundFXCompressor
*
iface
)
{
struct
dmo_compressorfx
*
effect
=
impl_from_IDirectSoundFXCompressor
(
iface
);
return
IUnknown_Release
(
effect
->
effect
.
outer_unk
);
}
static
HRESULT
WINAPI
compressorfx_SetAllParameters
(
IDirectSoundFXCompressor
*
iface
,
const
DSFXCompressor
*
compressor
)
{
struct
dmo_compressorfx
*
This
=
impl_from_IDirectSoundFXCompressor
(
iface
);
FIXME
(
"(%p) %p
\n
"
,
This
,
compressor
);
return
E_NOTIMPL
;
}
static
HRESULT
WINAPI
compressorfx_GetAllParameters
(
IDirectSoundFXCompressor
*
iface
,
DSFXCompressor
*
compressor
)
{
struct
dmo_compressorfx
*
This
=
impl_from_IDirectSoundFXCompressor
(
iface
);
FIXME
(
"(%p) %p
\n
"
,
This
,
compressor
);
return
E_NOTIMPL
;
}
static
const
struct
IDirectSoundFXCompressorVtbl
compressor_vtbl
=
{
compressorfx_QueryInterface
,
compressorfx_AddRef
,
compressorfx_Release
,
compressorfx_SetAllParameters
,
compressorfx_GetAllParameters
};
static
struct
dmo_compressorfx
*
impl_compressor_from_effect
(
struct
effect
*
iface
)
{
return
CONTAINING_RECORD
(
iface
,
struct
dmo_compressorfx
,
effect
);
}
static
void
*
compressor_query_interface
(
struct
effect
*
iface
,
REFIID
iid
)
{
struct
dmo_compressorfx
*
effect
=
impl_compressor_from_effect
(
iface
);
if
(
IsEqualGUID
(
iid
,
&
IID_IDirectSoundFXCompressor
))
return
&
effect
->
IDirectSoundFXCompressor_iface
;
return
NULL
;
}
static
void
compressor_destroy
(
struct
effect
*
iface
)
{
struct
dmo_compressorfx
*
effect
=
impl_compressor_from_effect
(
iface
);
free
(
effect
);
}
static
const
struct
effect_ops
compressor_ops
=
{
.
destroy
=
compressor_destroy
,
.
query_interface
=
compressor_query_interface
,
};
static
HRESULT
compressor_create
(
IUnknown
*
outer
,
IUnknown
**
out
)
{
struct
dmo_compressorfx
*
object
;
if
(
!
(
object
=
calloc
(
1
,
sizeof
(
*
object
))))
return
E_OUTOFMEMORY
;
effect_init
(
&
object
->
effect
,
outer
,
&
compressor_ops
);
object
->
IDirectSoundFXCompressor_iface
.
lpVtbl
=
&
compressor_vtbl
;
TRACE
(
"Created compressor effect %p.
\n
"
,
object
);
*
out
=
&
object
->
effect
.
IUnknown_inner
;
return
S_OK
;
}
struct
class_factory
struct
class_factory
{
{
IClassFactory
IClassFactory_iface
;
IClassFactory
IClassFactory_iface
;
...
@@ -1128,6 +1224,7 @@ class_factories[] =
...
@@ -1128,6 +1224,7 @@ class_factories[] =
{
&
GUID_DSFX_STANDARD_PARAMEQ
,
{{
&
class_factory_vtbl
},
eq_create
}},
{
&
GUID_DSFX_STANDARD_PARAMEQ
,
{{
&
class_factory_vtbl
},
eq_create
}},
{
&
GUID_DSFX_WAVES_REVERB
,
{{
&
class_factory_vtbl
},
waves_reverb_create
}},
{
&
GUID_DSFX_WAVES_REVERB
,
{{
&
class_factory_vtbl
},
waves_reverb_create
}},
{
&
GUID_DSFX_STANDARD_ECHO
,
{{
&
class_factory_vtbl
},
echo_create
}},
{
&
GUID_DSFX_STANDARD_ECHO
,
{{
&
class_factory_vtbl
},
echo_create
}},
{
&
GUID_DSFX_STANDARD_COMPRESSOR
,
{{
&
class_factory_vtbl
},
compressor_create
}},
};
};
HRESULT
WINAPI
DllGetClassObject
(
REFCLSID
clsid
,
REFIID
iid
,
void
**
out
)
HRESULT
WINAPI
DllGetClassObject
(
REFCLSID
clsid
,
REFIID
iid
,
void
**
out
)
...
...
dlls/dsdmo/tests/dsdmo.c
View file @
39889f19
...
@@ -335,12 +335,12 @@ static void test_compressor_parameters(void)
...
@@ -335,12 +335,12 @@ static void test_compressor_parameters(void)
hr
=
CoCreateInstance
(
&
GUID_DSFX_STANDARD_COMPRESSOR
,
NULL
,
CLSCTX_INPROC_SERVER
,
hr
=
CoCreateInstance
(
&
GUID_DSFX_STANDARD_COMPRESSOR
,
NULL
,
CLSCTX_INPROC_SERVER
,
&
IID_IDirectSoundFXCompressor
,
(
void
**
)
&
compressor
);
&
IID_IDirectSoundFXCompressor
,
(
void
**
)
&
compressor
);
ok
(
hr
==
S_OK
,
"Got hr %#lx.
\n
"
,
hr
);
hr
=
IDirectSoundFXCompressor_GetAllParameters
(
compressor
,
&
params
);
todo_wine
ok
(
hr
==
S_OK
,
"Got hr %#lx.
\n
"
,
hr
);
todo_wine
ok
(
hr
==
S_OK
,
"Got hr %#lx.
\n
"
,
hr
);
if
(
hr
!=
S_OK
)
if
(
hr
!=
S_OK
)
return
;
return
;
hr
=
IDirectSoundFXCompressor_GetAllParameters
(
compressor
,
&
params
);
ok
(
hr
==
S_OK
,
"Got hr %#lx.
\n
"
,
hr
);
ok
(
params
.
fGain
==
0
.
0
f
,
"Got gain %.8e dB.
\n
"
,
params
.
fGain
);
ok
(
params
.
fGain
==
0
.
0
f
,
"Got gain %.8e dB.
\n
"
,
params
.
fGain
);
ok
(
params
.
fAttack
==
10
.
0
f
,
"Got attack time %.8e ms.
\n
"
,
params
.
fAttack
);
ok
(
params
.
fAttack
==
10
.
0
f
,
"Got attack time %.8e ms.
\n
"
,
params
.
fAttack
);
ok
(
params
.
fThreshold
==
-
20
.
0
f
,
"Got threshold %.8e dB.
\n
"
,
params
.
fThreshold
);
ok
(
params
.
fThreshold
==
-
20
.
0
f
,
"Got threshold %.8e dB.
\n
"
,
params
.
fThreshold
);
...
@@ -545,7 +545,7 @@ START_TEST(dsdmo)
...
@@ -545,7 +545,7 @@ START_TEST(dsdmo)
tests
[]
=
tests
[]
=
{
{
{
&
GUID_DSFX_STANDARD_CHORUS
,
&
IID_IDirectSoundFXChorus
,
TRUE
},
{
&
GUID_DSFX_STANDARD_CHORUS
,
&
IID_IDirectSoundFXChorus
,
TRUE
},
{
&
GUID_DSFX_STANDARD_COMPRESSOR
,
&
IID_IDirectSoundFXCompressor
,
TRUE
},
{
&
GUID_DSFX_STANDARD_COMPRESSOR
,
&
IID_IDirectSoundFXCompressor
},
{
&
GUID_DSFX_STANDARD_DISTORTION
,
&
IID_IDirectSoundFXDistortion
,
TRUE
},
{
&
GUID_DSFX_STANDARD_DISTORTION
,
&
IID_IDirectSoundFXDistortion
,
TRUE
},
{
&
GUID_DSFX_STANDARD_ECHO
,
&
IID_IDirectSoundFXEcho
},
{
&
GUID_DSFX_STANDARD_ECHO
,
&
IID_IDirectSoundFXEcho
},
{
&
GUID_DSFX_STANDARD_FLANGER
,
&
IID_IDirectSoundFXFlanger
,
TRUE
},
{
&
GUID_DSFX_STANDARD_FLANGER
,
&
IID_IDirectSoundFXFlanger
,
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