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
ac528a49
Commit
ac528a49
authored
Jul 27, 2020
by
Zebediah Figura
Committed by
Alexandre Julliard
Jul 28, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
dsdmo: Add a stub equalizer effect.
Signed-off-by:
Zebediah Figura
<
z.figura12@gmail.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
baddd558
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
71 additions
and
33 deletions
+71
-33
dsdmo.idl
dlls/dsdmo/dsdmo.idl
+8
-0
main.c
dlls/dsdmo/main.c
+43
-0
dsound8.c
dlls/dsound/tests/dsound8.c
+20
-33
No files found.
dlls/dsdmo/dsdmo.idl
View file @
ac528a49
...
...
@@ -28,6 +28,14 @@ coclass DirectSoundI3DL2ReverbDMO {}
[
threading
(
both
),
progid
(
"Microsoft.DirectSoundParamEqDMO.1"
),
vi_progid
(
"Microsoft.DirectSoundParamEqDMO"
),
uuid
(
120
ced89
-
3b
f4
-
4173
-
a132
-
3
cb406cf3231
)
]
coclass
DirectSoundParamEqDMO
{}
[
threading
(
both
),
progid
(
"Microsoft.DirectSoundWavesReverbDMO.1"
),
vi_progid
(
"Microsoft.DirectSoundWavesReverbDMO"
),
uuid
(
87
fc0268
-
9
a55
-
4360
-
95
aa
-
004
a1d9de26c
)
...
...
dlls/dsdmo/main.c
View file @
ac528a49
...
...
@@ -434,6 +434,48 @@ static void effect_init(struct effect *effect, IUnknown *outer, const struct eff
effect
->
ops
=
ops
;
}
struct
eq
{
struct
effect
effect
;
};
static
struct
eq
*
impl_eq_from_effect
(
struct
effect
*
iface
)
{
return
CONTAINING_RECORD
(
iface
,
struct
eq
,
effect
);
}
static
void
*
eq_query_interface
(
struct
effect
*
iface
,
REFIID
iid
)
{
return
NULL
;
}
static
void
eq_destroy
(
struct
effect
*
iface
)
{
struct
eq
*
effect
=
impl_eq_from_effect
(
iface
);
free
(
effect
);
}
static
const
struct
effect_ops
eq_ops
=
{
.
destroy
=
eq_destroy
,
.
query_interface
=
eq_query_interface
,
};
static
HRESULT
eq_create
(
IUnknown
*
outer
,
IUnknown
**
out
)
{
struct
eq
*
object
;
if
(
!
(
object
=
calloc
(
1
,
sizeof
(
*
object
))))
return
E_OUTOFMEMORY
;
effect_init
(
&
object
->
effect
,
outer
,
&
eq_ops
);
TRACE
(
"Created equalizer effect %p.
\n
"
,
object
);
*
out
=
&
object
->
effect
.
IUnknown_inner
;
return
S_OK
;
}
struct
reverb
{
struct
effect
effect
;
...
...
@@ -787,6 +829,7 @@ static struct
class_factories
[]
=
{
{
&
GUID_DSFX_STANDARD_I3DL2REVERB
,
{{
&
class_factory_vtbl
},
reverb_create
}},
{
&
GUID_DSFX_STANDARD_PARAMEQ
,
{{
&
class_factory_vtbl
},
eq_create
}},
{
&
GUID_DSFX_WAVES_REVERB
,
{{
&
class_factory_vtbl
},
waves_reverb_create
}},
};
...
...
dlls/dsound/tests/dsound8.c
View file @
ac528a49
...
...
@@ -1617,8 +1617,8 @@ static void test_effects(void)
results
[
0
]
=
0xdeadbeef
;
hr
=
IDirectSoundBuffer8_SetFX
(
buffer8
,
1
,
effects
,
results
);
todo_wine
ok
(
hr
==
DS_OK
,
"Got hr %#x.
\n
"
,
hr
);
todo_wine
ok
(
results
[
0
]
==
DSFXR_LOCSOFTWARE
,
"Got result %#x.
\n
"
,
results
[
0
]);
ok
(
hr
==
DS_OK
,
"Got hr %#x.
\n
"
,
hr
);
ok
(
results
[
0
]
==
DSFXR_LOCSOFTWARE
,
"Got result %#x.
\n
"
,
results
[
0
]);
hr
=
IDirectSoundBuffer8_Lock
(
buffer8
,
0
,
0
,
&
ptr1
,
&
size1
,
&
ptr2
,
&
size2
,
DSBLOCK_ENTIREBUFFER
);
ok
(
hr
==
DS_OK
,
"Got hr %#x.
\n
"
,
hr
);
...
...
@@ -1648,38 +1648,33 @@ static void test_effects(void)
effects
[
0
].
guidDSFXClass
=
GUID_DSFX_STANDARD_PARAMEQ
;
results
[
0
]
=
0xdeadbeef
;
hr
=
IDirectSoundBuffer8_SetFX
(
buffer8
,
1
,
effects
,
results
);
todo_wine
ok
(
hr
==
DS_OK
,
"Got hr %#x.
\n
"
,
hr
);
todo_wine
ok
(
results
[
0
]
==
DSFXR_LOCSOFTWARE
,
"Got result %#x.
\n
"
,
results
[
0
]);
ok
(
hr
==
DS_OK
,
"Got hr %#x.
\n
"
,
hr
);
ok
(
results
[
0
]
==
DSFXR_LOCSOFTWARE
,
"Got result %#x.
\n
"
,
results
[
0
]);
hr
=
IDirectSoundBuffer8_GetObjectInPath
(
buffer8
,
&
GUID_All_Objects
,
0
,
&
IID_IMediaObject
,
NULL
);
todo_wine
ok
(
hr
==
DSERR_INVALIDPARAM
,
"Got hr %#x.
\n
"
,
hr
);
ok
(
hr
==
DSERR_INVALIDPARAM
,
"Got hr %#x.
\n
"
,
hr
);
dmo
=
(
IMediaObject
*
)
0xdeadbeef
;
hr
=
IDirectSoundBuffer8_GetObjectInPath
(
buffer8
,
&
GUID_All_Objects
,
0
,
&
GUID_NULL
,
(
void
**
)
&
dmo
);
todo_wine
ok
(
hr
==
E_NOINTERFACE
,
"Got hr %#x.
\n
"
,
hr
);
todo_wine
ok
(
!
dmo
,
"Got object %p.
\n
"
,
dmo
);
ok
(
hr
==
E_NOINTERFACE
,
"Got hr %#x.
\n
"
,
hr
);
ok
(
!
dmo
,
"Got object %p.
\n
"
,
dmo
);
dmo
=
(
IMediaObject
*
)
0xdeadbeef
;
hr
=
IDirectSoundBuffer8_GetObjectInPath
(
buffer8
,
&
GUID_NULL
,
0
,
&
IID_IMediaObject
,
(
void
**
)
&
dmo
);
todo_wine
ok
(
hr
==
DSERR_OBJECTNOTFOUND
,
"Got hr %#x.
\n
"
,
hr
);
ok
(
hr
==
DSERR_OBJECTNOTFOUND
,
"Got hr %#x.
\n
"
,
hr
);
ok
(
dmo
==
(
IMediaObject
*
)
0xdeadbeef
,
"Got object %p.
\n
"
,
dmo
);
dmo
=
NULL
;
hr
=
IDirectSoundBuffer8_GetObjectInPath
(
buffer8
,
&
GUID_All_Objects
,
0
,
&
IID_IMediaObject
,
(
void
**
)
&
dmo
);
todo_wine
ok
(
hr
==
DS_OK
,
"Got hr %#x.
\n
"
,
hr
);
if
(
hr
==
DS_OK
)
{
ok
(
hr
==
DS_OK
,
"Got hr %#x.
\n
"
,
hr
);
ok
(
!!
dmo
,
"Expected a non-NULL object.
\n
"
);
IMediaObject_Release
(
dmo
);
}
dmo
=
NULL
;
hr
=
IDirectSoundBuffer8_GetObjectInPath
(
buffer8
,
&
GUID_DSFX_STANDARD_PARAMEQ
,
0
,
&
IID_IMediaObject
,
(
void
**
)
&
dmo
);
if
(
hr
==
DS_OK
)
{
ok
(
hr
==
DS_OK
,
"Got hr %#x.
\n
"
,
hr
);
ok
(
!!
dmo
,
"Expected a non-NULL object.
\n
"
);
IMediaObject_Release
(
dmo
);
}
dmo
=
(
IMediaObject
*
)
0xdeadbeef
;
hr
=
IDirectSoundBuffer8_GetObjectInPath
(
buffer8
,
&
GUID_All_Objects
,
1
,
&
IID_IMediaObject
,
(
void
**
)
&
dmo
);
...
...
@@ -1691,7 +1686,7 @@ static void test_effects(void)
results
[
0
]
=
results
[
1
]
=
0xdeadbeef
;
hr
=
IDirectSoundBuffer8_SetFX
(
buffer8
,
2
,
effects
,
results
);
ok
(
hr
==
REGDB_E_CLASSNOTREG
,
"Got hr %#x.
\n
"
,
hr
);
todo_wine
ok
(
results
[
0
]
==
DSFXR_PRESENT
,
"Got result %#x.
\n
"
,
results
[
0
]);
ok
(
results
[
0
]
==
DSFXR_PRESENT
,
"Got result %#x.
\n
"
,
results
[
0
]);
ok
(
results
[
1
]
==
DSFXR_UNKNOWN
,
"Got result %#x.
\n
"
,
results
[
1
]);
hr
=
IDirectSoundBuffer8_GetObjectInPath
(
buffer8
,
&
GUID_All_Objects
,
0
,
&
IID_IMediaObject
,
(
void
**
)
&
dmo
);
...
...
@@ -1701,13 +1696,12 @@ static void test_effects(void)
effects
[
1
].
guidDSFXClass
=
GUID_DSFX_STANDARD_I3DL2REVERB
;
results
[
0
]
=
results
[
1
]
=
0xdeadbeef
;
hr
=
IDirectSoundBuffer8_SetFX
(
buffer8
,
2
,
effects
,
results
);
todo_wine
ok
(
hr
==
DS_OK
,
"Got hr %#x.
\n
"
,
hr
);
todo_wine
ok
(
results
[
0
]
==
DSFXR_LOCSOFTWARE
,
"Got result %#x.
\n
"
,
results
[
0
]);
todo_wine
ok
(
results
[
1
]
==
DSFXR_LOCSOFTWARE
,
"Got result %#x.
\n
"
,
results
[
1
]);
ok
(
hr
==
DS_OK
,
"Got hr %#x.
\n
"
,
hr
);
ok
(
results
[
0
]
==
DSFXR_LOCSOFTWARE
,
"Got result %#x.
\n
"
,
results
[
0
]);
ok
(
results
[
1
]
==
DSFXR_LOCSOFTWARE
,
"Got result %#x.
\n
"
,
results
[
1
]);
hr
=
IDirectSoundBuffer8_GetObjectInPath
(
buffer8
,
&
GUID_DSFX_STANDARD_PARAMEQ
,
0
,
&
IID_IMediaObject
,
(
void
**
)
&
dmo
);
todo_wine
ok
(
hr
==
DS_OK
,
"Got hr %#x.
\n
"
,
hr
);
if
(
hr
==
DS_OK
)
ok
(
hr
==
DS_OK
,
"Got hr %#x.
\n
"
,
hr
);
echo
=
dmo
;
hr
=
IDirectSoundBuffer8_GetObjectInPath
(
buffer8
,
&
GUID_DSFX_STANDARD_I3DL2REVERB
,
0
,
&
IID_IMediaObject
,
(
void
**
)
&
dmo
);
...
...
@@ -1716,20 +1710,14 @@ static void test_effects(void)
reverb
=
dmo
;
hr
=
IDirectSoundBuffer8_GetObjectInPath
(
buffer8
,
&
GUID_All_Objects
,
0
,
&
IID_IMediaObject
,
(
void
**
)
&
dmo
);
todo_wine
ok
(
hr
==
DS_OK
,
"Got hr %#x.
\n
"
,
hr
);
if
(
hr
==
DS_OK
)
{
ok
(
hr
==
DS_OK
,
"Got hr %#x.
\n
"
,
hr
);
ok
(
dmo
==
echo
,
"Expected %p, got %p.
\n
"
,
echo
,
dmo
);
IMediaObject_Release
(
dmo
);
}
hr
=
IDirectSoundBuffer8_GetObjectInPath
(
buffer8
,
&
GUID_All_Objects
,
1
,
&
IID_IMediaObject
,
(
void
**
)
&
dmo
);
todo_wine
ok
(
hr
==
DS_OK
,
"Got hr %#x.
\n
"
,
hr
);
if
(
hr
==
DS_OK
)
{
ok
(
dmo
==
reverb
,
"Expected %p, got %p.
\n
"
,
reverb
,
dmo
);
ok
(
hr
==
DS_OK
,
"Got hr %#x.
\n
"
,
hr
);
todo_wine
ok
(
dmo
==
reverb
,
"Expected %p, got %p.
\n
"
,
reverb
,
dmo
);
IMediaObject_Release
(
dmo
);
}
hr
=
IDirectSoundBuffer8_GetObjectInPath
(
buffer8
,
&
GUID_DSFX_STANDARD_I3DL2REVERB
,
1
,
&
IID_IMediaObject
,
(
void
**
)
&
dmo
);
...
...
@@ -1748,12 +1736,11 @@ static void test_effects(void)
hr
=
IDirectSoundBuffer8_GetObjectInPath
(
buffer8
,
&
GUID_All_Objects
,
0
,
&
IID_IDirectSoundFXI3DL2Reverb
,
(
void
**
)
&
unk
);
todo_wine
ok
(
hr
==
E_NOINTERFACE
,
"Got hr %#x.
\n
"
,
hr
);
ok
(
hr
==
E_NOINTERFACE
,
"Got hr %#x.
\n
"
,
hr
);
hr
=
IDirectSoundBuffer8_GetObjectInPath
(
buffer8
,
&
GUID_All_Objects
,
1
,
&
IID_IDirectSoundFXI3DL2Reverb
,
(
void
**
)
&
unk
);
todo_wine
ok
(
hr
==
DS_OK
,
"Got hr %#x.
\n
"
,
hr
);
if
(
hr
==
DS_OK
)
ok
(
hr
==
DS_OK
,
"Got hr %#x.
\n
"
,
hr
);
IUnknown_Release
(
unk
);
hr
=
IDirectSoundBuffer8_GetObjectInPath
(
buffer8
,
...
...
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