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
0a8e8d19
Commit
0a8e8d19
authored
Jan 15, 2016
by
Andrew Eikum
Committed by
Alexandre Julliard
Jan 17, 2016
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
xaudio2: Remove run-time versioning of xapo objects.
Signed-off-by:
Andrew Eikum
<
aeikum@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
fb9f616b
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
30 additions
and
60 deletions
+30
-60
xapofx.c
dlls/xaudio2_7/xapofx.c
+10
-19
xaudio_dll.c
dlls/xaudio2_7/xaudio_dll.c
+19
-40
xaudio_private.h
dlls/xaudio2_7/xaudio_private.h
+1
-1
No files found.
dlls/xaudio2_7/xapofx.c
View file @
0a8e8d19
...
...
@@ -53,8 +53,6 @@ typedef struct _VUMeterImpl {
IXAPOParameters
IXAPOParameters_iface
;
LONG
ref
;
DWORD
version
;
}
VUMeterImpl
;
static
VUMeterImpl
*
VUMeterImpl_from_IXAPO
(
IXAPO
*
iface
)
...
...
@@ -258,8 +256,6 @@ typedef struct _ReverbImpl {
IXAPOParameters
IXAPOParameters_iface
;
LONG
ref
;
DWORD
version
;
}
ReverbImpl
;
static
ReverbImpl
*
ReverbImpl_from_IXAPO
(
IXAPO
*
iface
)
...
...
@@ -461,8 +457,6 @@ typedef struct _EQImpl {
IXAPOParameters
IXAPOParameters_iface
;
LONG
ref
;
DWORD
version
;
}
EQImpl
;
static
EQImpl
*
EQImpl_from_IXAPO
(
IXAPO
*
iface
)
...
...
@@ -662,7 +656,6 @@ static const IXAPOParametersVtbl EQXAPOParameters_Vtbl = {
struct
xapo_cf
{
IClassFactory
IClassFactory_iface
;
LONG
ref
;
DWORD
version
;
const
CLSID
*
class
;
};
...
...
@@ -726,14 +719,13 @@ static HRESULT WINAPI xapocf_CreateInstance(IClassFactory *iface, IUnknown *pOut
object
->
IXAPO_iface
.
lpVtbl
=
&
VUMXAPO_Vtbl
;
object
->
IXAPOParameters_iface
.
lpVtbl
=
&
VUMXAPOParameters_Vtbl
;
object
->
version
=
This
->
version
;
hr
=
IXAPO_QueryInterface
(
&
object
->
IXAPO_iface
,
riid
,
ppobj
);
if
(
FAILED
(
hr
)){
HeapFree
(
GetProcessHeap
(),
0
,
object
);
return
hr
;
}
}
else
if
(
IsEqualGUID
(
This
->
class
,
&
CLSID_
AudioReverb27
)){
}
else
if
(
IsEqualGUID
(
This
->
class
,
&
CLSID_
FXReverb
)){
ReverbImpl
*
object
;
object
=
HeapAlloc
(
GetProcessHeap
(),
HEAP_ZERO_MEMORY
,
sizeof
(
*
object
));
...
...
@@ -742,7 +734,6 @@ static HRESULT WINAPI xapocf_CreateInstance(IClassFactory *iface, IUnknown *pOut
object
->
IXAPO_iface
.
lpVtbl
=
&
RVBXAPO_Vtbl
;
object
->
IXAPOParameters_iface
.
lpVtbl
=
&
RVBXAPOParameters_Vtbl
;
object
->
version
=
This
->
version
;
hr
=
IXAPO_QueryInterface
(
&
object
->
IXAPO_iface
,
riid
,
ppobj
);
if
(
FAILED
(
hr
)){
...
...
@@ -758,7 +749,6 @@ static HRESULT WINAPI xapocf_CreateInstance(IClassFactory *iface, IUnknown *pOut
object
->
IXAPO_iface
.
lpVtbl
=
&
EQXAPO_Vtbl
;
object
->
IXAPOParameters_iface
.
lpVtbl
=
&
EQXAPOParameters_Vtbl
;
object
->
version
=
This
->
version
;
hr
=
IXAPO_QueryInterface
(
&
object
->
IXAPO_iface
,
riid
,
ppobj
);
if
(
FAILED
(
hr
)){
...
...
@@ -766,6 +756,7 @@ static HRESULT WINAPI xapocf_CreateInstance(IClassFactory *iface, IUnknown *pOut
return
hr
;
}
}
else
/* TODO FXECHO, FXMasteringLimiter, */
return
E_INVALIDARG
;
return
S_OK
;
...
...
@@ -786,11 +777,10 @@ static const IClassFactoryVtbl xapo_Vtbl =
xapocf_LockServer
};
IClassFactory
*
make_xapo_factory
(
REFCLSID
clsid
,
DWORD
version
)
IClassFactory
*
make_xapo_factory
(
REFCLSID
clsid
)
{
struct
xapo_cf
*
ret
=
HeapAlloc
(
GetProcessHeap
(),
0
,
sizeof
(
struct
xapo_cf
));
ret
->
IClassFactory_iface
.
lpVtbl
=
&
xapo_Vtbl
;
ret
->
version
=
version
;
ret
->
class
=
clsid
;
ret
->
ref
=
0
;
return
&
ret
->
IClassFactory_iface
;
...
...
@@ -802,7 +792,7 @@ HRESULT WINAPI CreateAudioVolumeMeter(IUnknown **out)
IClassFactory
*
cf
;
HRESULT
hr
;
cf
=
make_xapo_factory
(
&
CLSID_AudioVolumeMeter27
,
28
);
cf
=
make_xapo_factory
(
&
CLSID_AudioVolumeMeter27
);
hr
=
IClassFactory_CreateInstance
(
cf
,
NULL
,
&
IID_IUnknown
,
(
void
**
)
out
);
...
...
@@ -816,7 +806,7 @@ HRESULT WINAPI CreateAudioReverb(IUnknown **out)
IClassFactory
*
cf
;
HRESULT
hr
;
cf
=
make_xapo_factory
(
&
CLSID_
AudioReverb27
,
28
);
cf
=
make_xapo_factory
(
&
CLSID_
FXReverb
);
hr
=
IClassFactory_CreateInstance
(
cf
,
NULL
,
&
IID_IUnknown
,
(
void
**
)
out
);
...
...
@@ -836,13 +826,13 @@ HRESULT CDECL CreateFX(REFCLSID clsid, IUnknown **out, void *initdata, UINT32 in
if
(
IsEqualGUID
(
clsid
,
&
CLSID_FXReverb27
)
||
IsEqualGUID
(
clsid
,
&
CLSID_FXReverb
))
class
=
&
CLSID_
AudioReverb27
;
class
=
&
CLSID_
FXReverb
;
else
if
(
IsEqualGUID
(
clsid
,
&
CLSID_FXEQ27
)
||
IsEqualGUID
(
clsid
,
&
CLSID_FXEQ
))
class
=
&
CLSID_FXEQ
;
if
(
class
){
cf
=
make_xapo_factory
(
class
,
20
+
XAUDIO2_VER
);
cf
=
make_xapo_factory
(
class
);
hr
=
IClassFactory_CreateInstance
(
cf
,
NULL
,
&
IID_IUnknown
,
(
void
**
)
&
obj
);
IClassFactory_Release
(
cf
);
...
...
@@ -893,13 +883,14 @@ HRESULT CDECL CreateFX(REFCLSID clsid, IUnknown **out)
if
(
IsEqualGUID
(
clsid
,
&
CLSID_FXReverb27
)
||
IsEqualGUID
(
clsid
,
&
CLSID_FXReverb
))
class
=
&
CLSID_
AudioReverb27
;
class
=
&
CLSID_
FXReverb
;
else
if
(
IsEqualGUID
(
clsid
,
&
CLSID_FXEQ27
)
||
IsEqualGUID
(
clsid
,
&
CLSID_FXEQ
))
class
=
&
CLSID_FXEQ
;
/* TODO FXECHO, FXMasteringLimiter, */
if
(
class
){
cf
=
make_xapo_factory
(
class
,
20
+
XAUDIO2_VER
);
cf
=
make_xapo_factory
(
class
);
hr
=
IClassFactory_CreateInstance
(
cf
,
NULL
,
&
IID_IUnknown
,
(
void
**
)
&
obj
);
IClassFactory_Release
(
cf
);
...
...
dlls/xaudio2_7/xaudio_dll.c
View file @
0a8e8d19
...
...
@@ -2020,46 +2020,25 @@ HRESULT WINAPI DllGetClassObject(REFCLSID rclsid, REFIID riid, void **ppv)
IsEqualGUID
(
rclsid
,
&
CLSID_XAudio27
)){
factory
=
make_xaudio2_factory
();
}
else
if
(
IsEqualGUID
(
rclsid
,
&
CLSID_AudioVolumeMeter20
)){
factory
=
make_xapo_factory
(
&
CLSID_AudioVolumeMeter27
,
20
);
}
else
if
(
IsEqualGUID
(
rclsid
,
&
CLSID_AudioVolumeMeter21
)){
factory
=
make_xapo_factory
(
&
CLSID_AudioVolumeMeter27
,
21
);
}
else
if
(
IsEqualGUID
(
rclsid
,
&
CLSID_AudioVolumeMeter22
)){
factory
=
make_xapo_factory
(
&
CLSID_AudioVolumeMeter27
,
22
);
}
else
if
(
IsEqualGUID
(
rclsid
,
&
CLSID_AudioVolumeMeter23
)){
factory
=
make_xapo_factory
(
&
CLSID_AudioVolumeMeter27
,
23
);
}
else
if
(
IsEqualGUID
(
rclsid
,
&
CLSID_AudioVolumeMeter24
)){
factory
=
make_xapo_factory
(
&
CLSID_AudioVolumeMeter27
,
24
);
}
else
if
(
IsEqualGUID
(
rclsid
,
&
CLSID_AudioVolumeMeter25
)){
factory
=
make_xapo_factory
(
&
CLSID_AudioVolumeMeter27
,
25
);
}
else
if
(
IsEqualGUID
(
rclsid
,
&
CLSID_AudioVolumeMeter26
)){
factory
=
make_xapo_factory
(
&
CLSID_AudioVolumeMeter27
,
26
);
}
else
if
(
IsEqualGUID
(
rclsid
,
&
CLSID_AudioVolumeMeter27
)){
factory
=
make_xapo_factory
(
&
CLSID_AudioVolumeMeter27
,
27
);
}
else
if
(
IsEqualGUID
(
rclsid
,
&
CLSID_AudioReverb20
)){
factory
=
make_xapo_factory
(
&
CLSID_AudioReverb27
,
20
);
}
else
if
(
IsEqualGUID
(
rclsid
,
&
CLSID_AudioReverb21
)){
factory
=
make_xapo_factory
(
&
CLSID_AudioReverb27
,
21
);
}
else
if
(
IsEqualGUID
(
rclsid
,
&
CLSID_AudioReverb22
)){
factory
=
make_xapo_factory
(
&
CLSID_AudioReverb27
,
22
);
}
else
if
(
IsEqualGUID
(
rclsid
,
&
CLSID_AudioReverb23
)){
factory
=
make_xapo_factory
(
&
CLSID_AudioReverb27
,
23
);
}
else
if
(
IsEqualGUID
(
rclsid
,
&
CLSID_AudioReverb24
)){
factory
=
make_xapo_factory
(
&
CLSID_AudioReverb27
,
24
);
}
else
if
(
IsEqualGUID
(
rclsid
,
&
CLSID_AudioReverb25
)){
factory
=
make_xapo_factory
(
&
CLSID_AudioReverb27
,
25
);
}
else
if
(
IsEqualGUID
(
rclsid
,
&
CLSID_AudioReverb26
)){
factory
=
make_xapo_factory
(
&
CLSID_AudioReverb27
,
26
);
}
else
if
(
IsEqualGUID
(
rclsid
,
&
CLSID_AudioReverb27
)){
factory
=
make_xapo_factory
(
&
CLSID_AudioReverb27
,
27
);
}
else
if
(
IsEqualGUID
(
rclsid
,
&
CLSID_AudioVolumeMeter20
)
||
IsEqualGUID
(
rclsid
,
&
CLSID_AudioVolumeMeter21
)
||
IsEqualGUID
(
rclsid
,
&
CLSID_AudioVolumeMeter22
)
||
IsEqualGUID
(
rclsid
,
&
CLSID_AudioVolumeMeter23
)
||
IsEqualGUID
(
rclsid
,
&
CLSID_AudioVolumeMeter24
)
||
IsEqualGUID
(
rclsid
,
&
CLSID_AudioVolumeMeter25
)
||
IsEqualGUID
(
rclsid
,
&
CLSID_AudioVolumeMeter26
)
||
IsEqualGUID
(
rclsid
,
&
CLSID_AudioVolumeMeter27
)){
factory
=
make_xapo_factory
(
&
CLSID_AudioVolumeMeter27
);
}
else
if
(
IsEqualGUID
(
rclsid
,
&
CLSID_AudioReverb20
)
||
IsEqualGUID
(
rclsid
,
&
CLSID_AudioReverb21
)
||
IsEqualGUID
(
rclsid
,
&
CLSID_AudioReverb22
)
||
IsEqualGUID
(
rclsid
,
&
CLSID_AudioReverb23
)
||
IsEqualGUID
(
rclsid
,
&
CLSID_AudioReverb24
)
||
IsEqualGUID
(
rclsid
,
&
CLSID_AudioReverb25
)
||
IsEqualGUID
(
rclsid
,
&
CLSID_AudioReverb26
)
||
IsEqualGUID
(
rclsid
,
&
CLSID_AudioReverb27
)){
factory
=
make_xapo_factory
(
&
CLSID_FXReverb
);
}
if
(
!
factory
)
return
CLASS_E_CLASSNOTAVAILABLE
;
...
...
dlls/xaudio2_7/xaudio_private.h
View file @
0a8e8d19
...
...
@@ -149,4 +149,4 @@ extern const IXAudio20SourceVoiceVtbl XAudio20SourceVoice_Vtbl DECLSPEC_HIDDEN;
extern
const
IXAudio20SubmixVoiceVtbl
XAudio20SubmixVoice_Vtbl
DECLSPEC_HIDDEN
;
extern
const
IXAudio20MasteringVoiceVtbl
XAudio20MasteringVoice_Vtbl
DECLSPEC_HIDDEN
;
extern
IClassFactory
*
make_xapo_factory
(
REFCLSID
clsid
,
DWORD
version
)
;
extern
IClassFactory
*
make_xapo_factory
(
REFCLSID
clsid
)
DECLSPEC_HIDDEN
;
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