You've already forked wine-staging
mirror of
https://gitlab.winehq.org/wine/wine-staging.git
synced 2025-04-13 14:42:51 -07:00
Compare commits
28 Commits
Author | SHA1 | Date | |
---|---|---|---|
|
c811ed7bd9 | ||
|
d9eb78e597 | ||
|
150ce22fa2 | ||
|
eae4093bf8 | ||
|
621cf69c80 | ||
|
bc6c681225 | ||
|
46420edcd0 | ||
|
af56d3821a | ||
|
32082f4d6f | ||
|
59e6a606b9 | ||
|
bf043458ba | ||
|
7c1249e5c0 | ||
|
3b24c1cf1d | ||
|
eb32fd78ae | ||
|
e4a11b1663 | ||
|
90d57326b5 | ||
|
b71d588d78 | ||
|
bafd1bfc74 | ||
|
23ae4e6c7a | ||
|
6ecb8df033 | ||
|
364ce82bd1 | ||
|
261a981d77 | ||
|
f7013bb1b4 | ||
|
99c296e10c | ||
|
02be23fa52 | ||
|
352d5a391b | ||
|
4373a1011e | ||
|
26d3815d8c |
31
README.md
31
README.md
@@ -79,4 +79,33 @@ Contributing
|
||||
|
||||
For information on contributing to Wine-Staging, please see
|
||||
<https://wiki.winehq.org/Wine-Staging_Contributing>. Note that GitHub pull
|
||||
requests are strongly dispreferred, especially for patches.
|
||||
requests are strongly dispreferred, especially for patches.
|
||||
|
||||
Donations
|
||||
---------
|
||||
As many of you may or may not know, wine-staging is a large set of experimental
|
||||
patches which provide various improvements to WINE, but are not quite suitable for
|
||||
upstreaming. This set of patches has been continuously managed for many years by
|
||||
us, a small group of volunteers. The way this works is that we often review patches
|
||||
attached to various bug reports found at https://bugs.winehq.org/ which may fix bugs,
|
||||
but may not be quite suitable to be upstreamed due to needing some cleanup or more
|
||||
proper implementation. In the event that this happens, we add the patches to wine-staging
|
||||
instead, and keep them updated/maintained as well as attempt to clean them up to be upstreamed.
|
||||
We also both write and verify patches which fix various bugs that may not have patches,
|
||||
and in turn allow them run better using WINE. This includes testing on various hardware,
|
||||
games, and applications.
|
||||
|
||||
As this is a volunteer project which is separate from WINE and CodeWeavers, any expenses
|
||||
for applications, games, or hardware which we do not own comes out of pocket. This is the
|
||||
reason this patreon has been created. All of our work is provided publicly for free and can
|
||||
be found at https://github.com/wine-staging/wine-staging. We do not expect to be paid for
|
||||
any of the work provided, as mentioned this project is completely voluntary. However the
|
||||
proceeds from Patreon are most definitely appreciated, and go towards helping us with
|
||||
obtaining the various hardware and software mentioned. This in turn allows us to continue
|
||||
to perform testing, provide fixes, and get them upstreamed, ultimately aiming to provide a
|
||||
better experience for all WINE users.
|
||||
|
||||
|
||||
For anyone interested, wine-staging Patreon can be found here:
|
||||
|
||||
https://www.patreon.com/winestaging
|
@@ -1,31 +1,43 @@
|
||||
From 8d80506ade85cac639a732280111226f65e0aac3 Mon Sep 17 00:00:00 2001
|
||||
From 1b222275e7faf71ae1e5c94e297004055ec6f82f Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Michael=20M=C3=BCller?= <michael@fds-team.de>
|
||||
Date: Fri, 4 Aug 2017 02:33:14 +0200
|
||||
Subject: [PATCH] ntdll: Implement NtFilterToken.
|
||||
|
||||
---
|
||||
dlls/ntdll/nt.c | 59 ++++++++++++++++++++++++++++++
|
||||
dlls/ntdll/ntdll.spec | 2 +-
|
||||
include/winnt.h | 5 +++
|
||||
include/winternl.h | 1 +
|
||||
server/named_pipe.c | 2 +-
|
||||
server/process.c | 2 +-
|
||||
server/protocol.def | 10 ++++++
|
||||
server/security.h | 4 ++-
|
||||
server/token.c | 84 +++++++++++++++++++++++++++++++++++++++++--
|
||||
9 files changed, 163 insertions(+), 6 deletions(-)
|
||||
dlls/ntdll/ntdll.spec | 2 +-
|
||||
dlls/ntdll/unix/security.c | 64 +++++++++++++++++++++++++++++
|
||||
include/winnt.h | 5 +++
|
||||
include/winternl.h | 1 +
|
||||
server/named_pipe.c | 2 +-
|
||||
server/process.c | 2 +-
|
||||
server/protocol.def | 10 +++++
|
||||
server/security.h | 4 +-
|
||||
server/token.c | 84 +++++++++++++++++++++++++++++++++++++-
|
||||
9 files changed, 168 insertions(+), 6 deletions(-)
|
||||
|
||||
diff --git a/dlls/ntdll/nt.c b/dlls/ntdll/nt.c
|
||||
index cc13672b2b9..443d46c71c7 100644
|
||||
--- a/dlls/ntdll/nt.c
|
||||
+++ b/dlls/ntdll/nt.c
|
||||
@@ -90,6 +90,65 @@ NTSTATUS WINAPI NtDuplicateToken(
|
||||
return status;
|
||||
diff --git a/dlls/ntdll/ntdll.spec b/dlls/ntdll/ntdll.spec
|
||||
index a3bc57716da..f604c8a3c35 100644
|
||||
--- a/dlls/ntdll/ntdll.spec
|
||||
+++ b/dlls/ntdll/ntdll.spec
|
||||
@@ -208,7 +208,7 @@
|
||||
# @ stub NtEnumerateSystemEnvironmentValuesEx
|
||||
@ stdcall -syscall NtEnumerateValueKey(long long long ptr long ptr)
|
||||
@ stub NtExtendSection
|
||||
-# @ stub NtFilterToken
|
||||
+@ stdcall -syscall NtFilterToken(long long ptr ptr ptr ptr)
|
||||
@ stdcall -syscall NtFindAtom(ptr long ptr)
|
||||
@ stdcall -syscall NtFlushBuffersFile(long ptr)
|
||||
@ stdcall -syscall NtFlushInstructionCache(long ptr long)
|
||||
diff --git a/dlls/ntdll/unix/security.c b/dlls/ntdll/unix/security.c
|
||||
index daecc5e0591..d063d43d6d4 100644
|
||||
--- a/dlls/ntdll/unix/security.c
|
||||
+++ b/dlls/ntdll/unix/security.c
|
||||
@@ -604,6 +604,70 @@ NTSTATUS WINAPI NtAdjustPrivilegesToken( HANDLE token, BOOLEAN disable, TOKEN_PR
|
||||
}
|
||||
|
||||
+/******************************************************************************
|
||||
+ * NtFilterToken [NTDLL.@]
|
||||
+ * ZwFilterToken [NTDLL.@]
|
||||
|
||||
+/***********************************************************************
|
||||
+ * NtFilterToken (NTDLL.@)
|
||||
+ */
|
||||
+NTSTATUS WINAPI NtFilterToken( HANDLE token, ULONG flags, TOKEN_GROUPS *disable_sids,
|
||||
+ TOKEN_PRIVILEGES *privileges, TOKEN_GROUPS *restrict_sids,
|
||||
@@ -54,14 +66,18 @@ index cc13672b2b9..443d46c71c7 100644
|
||||
+ BYTE *tmp;
|
||||
+
|
||||
+ for (i = 0; i < disable_sids->GroupCount; i++)
|
||||
+ sids_len += RtlLengthSid( disable_sids->Groups[i].Sid );
|
||||
+ {
|
||||
+ SID *sid = disable_sids->Groups[i].Sid;
|
||||
+ sids_len += offsetof( SID, SubAuthority[sid->SubAuthorityCount] );
|
||||
+ }
|
||||
+
|
||||
+ sids = RtlAllocateHeap( GetProcessHeap(), 0, sids_len );
|
||||
+ sids = malloc( sids_len );
|
||||
+ if (!sids) return STATUS_NO_MEMORY;
|
||||
+
|
||||
+ for (i = 0, tmp = (BYTE *)sids; i < disable_sids->GroupCount; i++, tmp += len)
|
||||
+ {
|
||||
+ len = RtlLengthSid( disable_sids->Groups[i].Sid );
|
||||
+ SID *sid = disable_sids->Groups[i].Sid;
|
||||
+ len = offsetof( SID, SubAuthority[sid->SubAuthorityCount] );
|
||||
+ memcpy( tmp, disable_sids->Groups[i].Sid, len );
|
||||
+ }
|
||||
+ }
|
||||
@@ -78,26 +94,15 @@ index cc13672b2b9..443d46c71c7 100644
|
||||
+ }
|
||||
+ SERVER_END_REQ;
|
||||
+
|
||||
+ RtlFreeHeap( GetProcessHeap(), 0, sids );
|
||||
+ free( sids );
|
||||
+ return status;
|
||||
+}
|
||||
+
|
||||
/******************************************************************************
|
||||
* NtOpenProcessToken [NTDLL.@]
|
||||
* ZwOpenProcessToken [NTDLL.@]
|
||||
diff --git a/dlls/ntdll/ntdll.spec b/dlls/ntdll/ntdll.spec
|
||||
index 6293dc81ed4..36f7ddbda81 100644
|
||||
--- a/dlls/ntdll/ntdll.spec
|
||||
+++ b/dlls/ntdll/ntdll.spec
|
||||
@@ -208,7 +208,7 @@
|
||||
# @ stub NtEnumerateSystemEnvironmentValuesEx
|
||||
@ stdcall -syscall NtEnumerateValueKey(long long long ptr long ptr)
|
||||
@ stub NtExtendSection
|
||||
-# @ stub NtFilterToken
|
||||
+@ stdcall NtFilterToken(long long ptr ptr ptr ptr)
|
||||
@ stdcall -syscall NtFindAtom(ptr long ptr)
|
||||
@ stdcall -syscall NtFlushBuffersFile(long ptr)
|
||||
@ stdcall -syscall NtFlushInstructionCache(long ptr long)
|
||||
+
|
||||
+
|
||||
/***********************************************************************
|
||||
* NtPrivilegeCheck (NTDLL.@)
|
||||
*/
|
||||
diff --git a/include/winnt.h b/include/winnt.h
|
||||
index e1cf78420a6..da17fe3e330 100644
|
||||
--- a/include/winnt.h
|
||||
|
@@ -1,38 +1,39 @@
|
||||
From c8dc0ec6406e8449b59c219ede2e9bd88d8a56fa Mon Sep 17 00:00:00 2001
|
||||
From d2e98b2054a5af671fd81ded32f2cf60a062312c Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Michael=20M=C3=BCller?= <michael@fds-team.de>
|
||||
Date: Sat, 5 Aug 2017 00:26:03 +0200
|
||||
Subject: [PATCH] server: Implement token elevation information.
|
||||
|
||||
---
|
||||
dlls/ntdll/nt.c | 16 ++++++++++++----
|
||||
server/protocol.def | 8 ++++++++
|
||||
server/token.c | 22 +++++++++++++++++++---
|
||||
dlls/ntdll/unix/security.c | 16 ++++++++++++----
|
||||
server/protocol.def | 8 ++++++++
|
||||
server/token.c | 22 +++++++++++++++++++---
|
||||
3 files changed, 39 insertions(+), 7 deletions(-)
|
||||
|
||||
diff --git a/dlls/ntdll/nt.c b/dlls/ntdll/nt.c
|
||||
index cd271fde9c..b1dd999cf5 100644
|
||||
--- a/dlls/ntdll/nt.c
|
||||
+++ b/dlls/ntdll/nt.c
|
||||
@@ -625,18 +625,26 @@ NTSTATUS WINAPI NtQueryInformationToken(
|
||||
SERVER_END_REQ;
|
||||
diff --git a/dlls/ntdll/unix/security.c b/dlls/ntdll/unix/security.c
|
||||
index d063d43d6d4..03a81afa46e 100644
|
||||
--- a/dlls/ntdll/unix/security.c
|
||||
+++ b/dlls/ntdll/unix/security.c
|
||||
@@ -390,19 +390,27 @@ NTSTATUS WINAPI NtQueryInformationToken( HANDLE token, TOKEN_INFORMATION_CLASS c
|
||||
break;
|
||||
|
||||
case TokenElevationType:
|
||||
+ SERVER_START_REQ( get_token_elevation_type )
|
||||
{
|
||||
TOKEN_ELEVATION_TYPE *elevation_type = tokeninfo;
|
||||
TOKEN_ELEVATION_TYPE *type = info;
|
||||
- FIXME("QueryInformationToken( ..., TokenElevationType, ...) semi-stub\n");
|
||||
- *elevation_type = TokenElevationTypeFull;
|
||||
- *type = TokenElevationTypeFull;
|
||||
+ req->handle = wine_server_obj_handle( token );
|
||||
+ status = wine_server_call( req );
|
||||
+ if (status == STATUS_SUCCESS)
|
||||
+ *elevation_type = reply->elevation;
|
||||
+ *type = reply->elevation;
|
||||
}
|
||||
+ SERVER_END_REQ;
|
||||
break;
|
||||
|
||||
case TokenElevation:
|
||||
+ SERVER_START_REQ( get_token_elevation_type )
|
||||
{
|
||||
TOKEN_ELEVATION *elevation = tokeninfo;
|
||||
TOKEN_ELEVATION *elevation = info;
|
||||
- FIXME("QueryInformationToken( ..., TokenElevation, ...) semi-stub\n");
|
||||
- elevation->TokenIsElevated = TRUE;
|
||||
+ req->handle = wine_server_obj_handle( token );
|
||||
@@ -42,13 +43,13 @@ index cd271fde9c..b1dd999cf5 100644
|
||||
}
|
||||
+ SERVER_END_REQ;
|
||||
break;
|
||||
|
||||
case TokenSessionId:
|
||||
{
|
||||
diff --git a/server/protocol.def b/server/protocol.def
|
||||
index 90af9df7f4..93afaabca1 100644
|
||||
index ee07b1eca14..84f0b577d72 100644
|
||||
--- a/server/protocol.def
|
||||
+++ b/server/protocol.def
|
||||
@@ -3643,6 +3643,14 @@ struct handle_info
|
||||
@@ -3566,6 +3566,14 @@ struct handle_info
|
||||
@END
|
||||
|
||||
|
||||
@@ -64,10 +65,10 @@ index 90af9df7f4..93afaabca1 100644
|
||||
@REQ(create_completion)
|
||||
unsigned int access; /* desired access to a port */
|
||||
diff --git a/server/token.c b/server/token.c
|
||||
index 6d193603b4..64f20e1b57 100644
|
||||
index 38a4c203d54..14343637af5 100644
|
||||
--- a/server/token.c
|
||||
+++ b/server/token.c
|
||||
@@ -112,6 +112,7 @@ struct token
|
||||
@@ -110,6 +110,7 @@ struct token
|
||||
ACL *default_dacl; /* the default DACL to assign to objects created by this user */
|
||||
TOKEN_SOURCE source; /* source of the token */
|
||||
int impersonation_level; /* impersonation level this token is capable of if non-primary token */
|
||||
@@ -75,7 +76,7 @@ index 6d193603b4..64f20e1b57 100644
|
||||
};
|
||||
|
||||
struct privilege
|
||||
@@ -545,7 +546,7 @@ static struct token *create_token( unsigned primary, const SID *user,
|
||||
@@ -552,7 +553,7 @@ static struct token *create_token( unsigned primary, const SID *user,
|
||||
const LUID_AND_ATTRIBUTES *privs, unsigned int priv_count,
|
||||
const ACL *default_dacl, TOKEN_SOURCE source,
|
||||
const luid_t *modified_id,
|
||||
@@ -84,7 +85,7 @@ index 6d193603b4..64f20e1b57 100644
|
||||
{
|
||||
struct token *token = alloc_object( &token_ops );
|
||||
if (token)
|
||||
@@ -567,6 +568,7 @@ static struct token *create_token( unsigned primary, const SID *user,
|
||||
@@ -574,6 +575,7 @@ static struct token *create_token( unsigned primary, const SID *user,
|
||||
token->impersonation_level = impersonation_level;
|
||||
token->default_dacl = NULL;
|
||||
token->primary_group = NULL;
|
||||
@@ -92,7 +93,7 @@ index 6d193603b4..64f20e1b57 100644
|
||||
|
||||
/* copy user */
|
||||
token->user = memdup( user, security_sid_len( user ));
|
||||
@@ -682,7 +684,8 @@ struct token *token_duplicate( struct token *src_token, unsigned primary,
|
||||
@@ -689,7 +691,8 @@ struct token *token_duplicate( struct token *src_token, unsigned primary,
|
||||
token = create_token( primary, src_token->user, NULL, 0,
|
||||
NULL, 0, src_token->default_dacl,
|
||||
src_token->source, modified_id,
|
||||
@@ -102,7 +103,7 @@ index 6d193603b4..64f20e1b57 100644
|
||||
if (!token) return token;
|
||||
|
||||
/* copy groups */
|
||||
@@ -888,7 +891,7 @@ struct token *token_create_admin( void )
|
||||
@@ -895,7 +898,7 @@ struct token *token_create_admin( void )
|
||||
static const TOKEN_SOURCE admin_source = {"SeMgr", {0, 0}};
|
||||
token = create_token( TRUE, user_sid, admin_groups, ARRAY_SIZE( admin_groups ),
|
||||
admin_privs, ARRAY_SIZE( admin_privs ), default_dacl,
|
||||
@@ -111,7 +112,7 @@ index 6d193603b4..64f20e1b57 100644
|
||||
/* we really need a primary group */
|
||||
assert( token->primary_group );
|
||||
}
|
||||
@@ -1627,6 +1630,19 @@ DECL_HANDLER(get_token_statistics)
|
||||
@@ -1634,6 +1637,19 @@ DECL_HANDLER(get_token_statistics)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -132,5 +133,5 @@ index 6d193603b4..64f20e1b57 100644
|
||||
{
|
||||
struct token *token;
|
||||
--
|
||||
2.19.1
|
||||
2.27.0
|
||||
|
||||
|
@@ -1,19 +1,19 @@
|
||||
From ae503e8e7eb8f4fcb9bf3e642458c2a1bba6ccaa Mon Sep 17 00:00:00 2001
|
||||
From 6dc1b7d9e533379133857629bb9c09e1045a9020 Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Michael=20M=C3=BCller?= <michael@fds-team.de>
|
||||
Date: Mon, 7 Aug 2017 02:28:35 +0200
|
||||
Subject: [PATCH] server: Implement token integrity level.
|
||||
|
||||
---
|
||||
dlls/ntdll/nt.c | 23 ++++++++++++++---------
|
||||
server/protocol.def | 7 +++++++
|
||||
server/token.c | 30 +++++++++++++++++++++++++++---
|
||||
dlls/ntdll/unix/security.c | 23 ++++++++++++++---------
|
||||
server/protocol.def | 7 +++++++
|
||||
server/token.c | 30 +++++++++++++++++++++++++++---
|
||||
3 files changed, 48 insertions(+), 12 deletions(-)
|
||||
|
||||
diff --git a/dlls/ntdll/nt.c b/dlls/ntdll/nt.c
|
||||
index ca26ab15..8aab0a48 100644
|
||||
--- a/dlls/ntdll/nt.c
|
||||
+++ b/dlls/ntdll/nt.c
|
||||
@@ -400,7 +400,7 @@ NTSTATUS WINAPI NtQueryInformationToken(
|
||||
diff --git a/dlls/ntdll/unix/security.c b/dlls/ntdll/unix/security.c
|
||||
index 03a81afa46e..f0057116dee 100644
|
||||
--- a/dlls/ntdll/unix/security.c
|
||||
+++ b/dlls/ntdll/unix/security.c
|
||||
@@ -172,7 +172,7 @@ NTSTATUS WINAPI NtQueryInformationToken( HANDLE token, TOKEN_INFORMATION_CLASS c
|
||||
0, /* TokenAccessInformation */
|
||||
0, /* TokenVirtualizationAllowed */
|
||||
sizeof(DWORD), /* TokenVirtualizationEnabled */
|
||||
@@ -22,9 +22,9 @@ index ca26ab15..8aab0a48 100644
|
||||
0, /* TokenUIAccess */
|
||||
0, /* TokenMandatoryPolicy */
|
||||
0, /* TokenLogonSid */
|
||||
@@ -659,18 +659,23 @@ NTSTATUS WINAPI NtQueryInformationToken(
|
||||
}
|
||||
@@ -428,18 +428,23 @@ NTSTATUS WINAPI NtQueryInformationToken( HANDLE token, TOKEN_INFORMATION_CLASS c
|
||||
break;
|
||||
|
||||
case TokenIntegrityLevel:
|
||||
+ SERVER_START_REQ( get_token_integrity )
|
||||
{
|
||||
@@ -32,14 +32,14 @@ index ca26ab15..8aab0a48 100644
|
||||
- static const SID high_level = {SID_REVISION, 1, {SECURITY_MANDATORY_LABEL_AUTHORITY},
|
||||
- {SECURITY_MANDATORY_HIGH_RID}};
|
||||
-
|
||||
TOKEN_MANDATORY_LABEL *tml = tokeninfo;
|
||||
TOKEN_MANDATORY_LABEL *tml = info;
|
||||
- PSID psid = tml + 1;
|
||||
+ PSID sid = tml + 1;
|
||||
+ DWORD sid_len = tokeninfolength < sizeof(*tml) ? 0 : tokeninfolength - sizeof(*tml);
|
||||
+ DWORD sid_len = length < sizeof(*tml) ? 0 : length - sizeof(*tml);
|
||||
|
||||
- tml->Label.Sid = psid;
|
||||
- tml->Label.Attributes = SE_GROUP_INTEGRITY | SE_GROUP_INTEGRITY_ENABLED;
|
||||
- memcpy(psid, &high_level, sizeof(SID));
|
||||
- memcpy( psid, &high_level, sizeof(SID) );
|
||||
+ req->handle = wine_server_obj_handle( token );
|
||||
+ wine_server_set_reply( req, sid, sid_len );
|
||||
+ status = wine_server_call( req );
|
||||
@@ -52,13 +52,13 @@ index ca26ab15..8aab0a48 100644
|
||||
}
|
||||
+ SERVER_END_REQ;
|
||||
break;
|
||||
|
||||
case TokenAppContainerSid:
|
||||
{
|
||||
diff --git a/server/protocol.def b/server/protocol.def
|
||||
index 11221d7d..1bfe3234 100644
|
||||
index 84f0b577d72..4d37a0df348 100644
|
||||
--- a/server/protocol.def
|
||||
+++ b/server/protocol.def
|
||||
@@ -3405,6 +3405,13 @@ enum caret_state
|
||||
@@ -3296,6 +3296,13 @@ enum caret_state
|
||||
VARARG(sid,SID); /* the sid specified by which_sid from the token */
|
||||
@END
|
||||
|
||||
@@ -73,10 +73,10 @@ index 11221d7d..1bfe3234 100644
|
||||
obj_handle_t handle; /* handle to the token */
|
||||
@REPLY
|
||||
diff --git a/server/token.c b/server/token.c
|
||||
index ccde0c2d..2d81118a 100644
|
||||
index 7c510fbdad9..d267991f751 100644
|
||||
--- a/server/token.c
|
||||
+++ b/server/token.c
|
||||
@@ -113,6 +113,7 @@ struct token
|
||||
@@ -111,6 +111,7 @@ struct token
|
||||
TOKEN_SOURCE source; /* source of the token */
|
||||
int impersonation_level; /* impersonation level this token is capable of if non-primary token */
|
||||
TOKEN_ELEVATION_TYPE elevation; /* elevation level */
|
||||
@@ -84,7 +84,7 @@ index ccde0c2d..2d81118a 100644
|
||||
};
|
||||
|
||||
struct privilege
|
||||
@@ -546,7 +547,8 @@ static struct token *create_token( unsigned primary, const SID *user,
|
||||
@@ -553,7 +554,8 @@ static struct token *create_token( unsigned primary, const SID *user,
|
||||
const LUID_AND_ATTRIBUTES *privs, unsigned int priv_count,
|
||||
const ACL *default_dacl, TOKEN_SOURCE source,
|
||||
const luid_t *modified_id,
|
||||
@@ -94,7 +94,7 @@ index ccde0c2d..2d81118a 100644
|
||||
{
|
||||
struct token *token = alloc_object( &token_ops );
|
||||
if (token)
|
||||
@@ -630,6 +632,7 @@ static struct token *create_token( unsigned primary, const SID *user,
|
||||
@@ -637,6 +639,7 @@ static struct token *create_token( unsigned primary, const SID *user,
|
||||
}
|
||||
|
||||
token->source = source;
|
||||
@@ -102,7 +102,7 @@ index ccde0c2d..2d81118a 100644
|
||||
}
|
||||
return token;
|
||||
}
|
||||
@@ -685,7 +688,8 @@ struct token *token_duplicate( struct token *src_token, unsigned primary,
|
||||
@@ -692,7 +695,8 @@ struct token *token_duplicate( struct token *src_token, unsigned primary,
|
||||
NULL, 0, src_token->default_dacl,
|
||||
src_token->source, modified_id,
|
||||
impersonation_level,
|
||||
@@ -112,7 +112,7 @@ index ccde0c2d..2d81118a 100644
|
||||
if (!token) return token;
|
||||
|
||||
/* copy groups */
|
||||
@@ -890,7 +894,7 @@ struct token *token_create_admin( void )
|
||||
@@ -898,7 +902,7 @@ struct token *token_create_admin( void )
|
||||
static const TOKEN_SOURCE admin_source = {"SeMgr", {0, 0}};
|
||||
token = create_token( TRUE, user_sid, admin_groups, ARRAY_SIZE( admin_groups ),
|
||||
admin_privs, ARRAY_SIZE( admin_privs ), default_dacl,
|
||||
@@ -121,7 +121,7 @@ index ccde0c2d..2d81118a 100644
|
||||
/* we really need a primary group */
|
||||
assert( token->primary_group );
|
||||
}
|
||||
@@ -1524,6 +1528,26 @@ DECL_HANDLER(get_token_sid)
|
||||
@@ -1532,6 +1536,26 @@ DECL_HANDLER(get_token_sid)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -149,5 +149,5 @@ index ccde0c2d..2d81118a 100644
|
||||
DECL_HANDLER(get_token_groups)
|
||||
{
|
||||
--
|
||||
2.19.1
|
||||
2.27.0
|
||||
|
||||
|
@@ -1,4 +1,4 @@
|
||||
From 182f23825cd873fc2b4ee2ddb81b21d7194e60d2 Mon Sep 17 00:00:00 2001
|
||||
From cdf1f84a65198df1ac4162f868f35971e5e1a2a1 Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Michael=20M=C3=BCller?= <michael@fds-team.de>
|
||||
Date: Sat, 5 Aug 2017 01:45:29 +0200
|
||||
Subject: [PATCH] ntdll: Add function to create new tokens for elevation
|
||||
@@ -14,10 +14,10 @@ Subject: [PATCH] ntdll: Add function to create new tokens for elevation
|
||||
6 files changed, 117 insertions(+)
|
||||
|
||||
diff --git a/dlls/ntdll/ntdll.spec b/dlls/ntdll/ntdll.spec
|
||||
index 42ce9815489..401bdd61d21 100644
|
||||
index f604c8a3c35..850a40412d0 100644
|
||||
--- a/dlls/ntdll/ntdll.spec
|
||||
+++ b/dlls/ntdll/ntdll.spec
|
||||
@@ -1598,6 +1598,9 @@
|
||||
@@ -1599,6 +1599,9 @@
|
||||
# Virtual memory
|
||||
@ cdecl __wine_locked_recvmsg(long ptr long)
|
||||
|
||||
@@ -28,10 +28,10 @@ index 42ce9815489..401bdd61d21 100644
|
||||
@ cdecl wine_get_version()
|
||||
@ cdecl wine_get_build_id()
|
||||
diff --git a/dlls/ntdll/ntdll_misc.h b/dlls/ntdll/ntdll_misc.h
|
||||
index c8fbc1ae09d..2603b57be38 100644
|
||||
index 1f27cd100a7..769d6facc9f 100644
|
||||
--- a/dlls/ntdll/ntdll_misc.h
|
||||
+++ b/dlls/ntdll/ntdll_misc.h
|
||||
@@ -69,6 +69,9 @@ extern void init_locale( HMODULE module ) DECLSPEC_HIDDEN;
|
||||
@@ -68,6 +68,9 @@ extern void init_locale( HMODULE module ) DECLSPEC_HIDDEN;
|
||||
extern void init_user_process_params(void) DECLSPEC_HIDDEN;
|
||||
extern NTSTATUS restart_process( RTL_USER_PROCESS_PARAMETERS *params, NTSTATUS status ) DECLSPEC_HIDDEN;
|
||||
|
||||
@@ -40,7 +40,7 @@ index c8fbc1ae09d..2603b57be38 100644
|
||||
+
|
||||
/* server support */
|
||||
extern BOOL is_wow64 DECLSPEC_HIDDEN;
|
||||
extern NTSTATUS alloc_object_attributes( const OBJECT_ATTRIBUTES *attr, struct object_attributes **ret,
|
||||
|
||||
diff --git a/dlls/ntdll/process.c b/dlls/ntdll/process.c
|
||||
index 77ba5b371e2..3e91a1fa9c4 100644
|
||||
--- a/dlls/ntdll/process.c
|
||||
@@ -71,10 +71,10 @@ index 77ba5b371e2..3e91a1fa9c4 100644
|
||||
* restart_process
|
||||
*/
|
||||
diff --git a/server/protocol.def b/server/protocol.def
|
||||
index 9da597e2773..abfc744c960 100644
|
||||
index 4d37a0df348..56b52dd2231 100644
|
||||
--- a/server/protocol.def
|
||||
+++ b/server/protocol.def
|
||||
@@ -3583,6 +3583,14 @@ struct handle_info
|
||||
@@ -3581,6 +3581,14 @@ struct handle_info
|
||||
@END
|
||||
|
||||
|
||||
|
@@ -1,4 +1,4 @@
|
||||
From b7e3ca4678d073c92f950708c1be35f37fda86d0 Mon Sep 17 00:00:00 2001
|
||||
From f058e0e1425aab869a1a7d0db0446944af9bc8d6 Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Michael=20M=C3=BCller?= <michael@fds-team.de>
|
||||
Date: Sat, 5 Aug 2017 03:39:55 +0200
|
||||
Subject: [PATCH] ntdll: Implement process token elevation through manifests.
|
||||
@@ -12,7 +12,7 @@ Subject: [PATCH] ntdll: Implement process token elevation through manifests.
|
||||
5 files changed, 67 insertions(+)
|
||||
|
||||
diff --git a/dlls/ntdll/loader.c b/dlls/ntdll/loader.c
|
||||
index 3513102b6f0..3b68f6685d0 100644
|
||||
index 6290cbcb4e6..9a8f13901b2 100644
|
||||
--- a/dlls/ntdll/loader.c
|
||||
+++ b/dlls/ntdll/loader.c
|
||||
@@ -3489,6 +3489,32 @@ void WINAPI LdrInitializeThunk( CONTEXT *context, void **entry, ULONG_PTR unknow
|
||||
@@ -48,7 +48,7 @@ index 3513102b6f0..3b68f6685d0 100644
|
||||
/***********************************************************************
|
||||
* load_global_options
|
||||
*/
|
||||
@@ -3922,6 +3948,7 @@ void __wine_process_init(void)
|
||||
@@ -3900,6 +3926,7 @@ void __wine_process_init(void)
|
||||
'k','e','r','n','e','l','3','2','.','d','l','l',0};
|
||||
void (WINAPI *kernel32_start_process)(LPTHREAD_START_ROUTINE,void*) = NULL;
|
||||
RTL_USER_PROCESS_PARAMETERS *params;
|
||||
@@ -56,9 +56,9 @@ index 3513102b6f0..3b68f6685d0 100644
|
||||
WINE_MODREF *wm;
|
||||
NTSTATUS status;
|
||||
ANSI_STRING func_name;
|
||||
@@ -4032,6 +4059,16 @@ void __wine_process_init(void)
|
||||
|
||||
unix_funcs->virtual_set_large_address_space();
|
||||
@@ -4021,6 +4048,16 @@ void __wine_process_init(void)
|
||||
}
|
||||
#endif
|
||||
|
||||
+ /* elevate process if necessary */
|
||||
+ status = RtlQueryInformationActivationContext( 0, NULL, 0, RunlevelInformationInActivationContext,
|
||||
@@ -74,7 +74,7 @@ index 3513102b6f0..3b68f6685d0 100644
|
||||
RemoveEntryList( &wm->ldr.InLoadOrderLinks );
|
||||
InsertHeadList( &peb->LdrData->InLoadOrderModuleList, &wm->ldr.InLoadOrderLinks );
|
||||
diff --git a/server/process.c b/server/process.c
|
||||
index c414717a8d7..100cb424623 100644
|
||||
index 7875db09801..d7334ffc959 100644
|
||||
--- a/server/process.c
|
||||
+++ b/server/process.c
|
||||
@@ -1086,6 +1086,14 @@ int set_process_debug_flag( struct process *process, int flag )
|
||||
@@ -93,7 +93,7 @@ index c414717a8d7..100cb424623 100644
|
||||
DECL_HANDLER(new_process)
|
||||
{
|
||||
diff --git a/server/process.h b/server/process.h
|
||||
index fb29f21cb12..d0b7ec4987b 100644
|
||||
index 3944a67d571..3cbf70fda21 100644
|
||||
--- a/server/process.h
|
||||
+++ b/server/process.h
|
||||
@@ -129,6 +129,7 @@ extern void kill_console_processes( struct thread *renderer, int exit_code );
|
||||
@@ -103,12 +103,12 @@ index fb29f21cb12..d0b7ec4987b 100644
|
||||
+extern void replace_process_token( struct process *process, struct token *token );
|
||||
|
||||
/* console functions */
|
||||
extern void inherit_console( struct thread *parent_thread, struct process *parent,
|
||||
extern obj_handle_t inherit_console( struct thread *parent_thread, struct process *parent,
|
||||
diff --git a/server/protocol.def b/server/protocol.def
|
||||
index bc0d0723eb3..ec67ce7ab87 100644
|
||||
index b84d1d10004..65bcb99d486 100644
|
||||
--- a/server/protocol.def
|
||||
+++ b/server/protocol.def
|
||||
@@ -3737,6 +3737,13 @@ struct handle_info
|
||||
@@ -3526,6 +3526,13 @@ struct handle_info
|
||||
@END
|
||||
|
||||
|
||||
|
@@ -1,17 +1,25 @@
|
||||
From 6d4621ddba8139747345c05f6251bae9b3c68e39 Mon Sep 17 00:00:00 2001
|
||||
From e34d019222909281390f83149be755a4145024c4 Mon Sep 17 00:00:00 2001
|
||||
From: Sebastian Lackner <sebastian@fds-team.de>
|
||||
Date: Mon, 7 Aug 2017 15:28:33 +0200
|
||||
Subject: ntdll: Add semi-stub for TokenLinkedToken info class.
|
||||
Subject: [PATCH] ntdll: Add semi-stub for TokenLinkedToken info class.
|
||||
|
||||
---
|
||||
dlls/ntdll/nt.c | 28 +++++++++++++++++++++++++++-
|
||||
1 file changed, 27 insertions(+), 1 deletion(-)
|
||||
dlls/ntdll/unix/security.c | 30 +++++++++++++++++++++++++++++-
|
||||
1 file changed, 29 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/dlls/ntdll/nt.c b/dlls/ntdll/nt.c
|
||||
index 6f2b24e6ba4..99dba58b426 100644
|
||||
--- a/dlls/ntdll/nt.c
|
||||
+++ b/dlls/ntdll/nt.c
|
||||
@@ -366,7 +366,7 @@ NTSTATUS WINAPI NtQueryInformationToken(
|
||||
diff --git a/dlls/ntdll/unix/security.c b/dlls/ntdll/unix/security.c
|
||||
index f0057116dee..2769e5f6a7b 100644
|
||||
--- a/dlls/ntdll/unix/security.c
|
||||
+++ b/dlls/ntdll/unix/security.c
|
||||
@@ -138,6 +138,7 @@ NTSTATUS WINAPI NtDuplicateToken( HANDLE token, ACCESS_MASK access, OBJECT_ATTRI
|
||||
return status;
|
||||
}
|
||||
|
||||
+extern HANDLE CDECL __wine_create_default_token(BOOL admin);
|
||||
|
||||
/***********************************************************************
|
||||
* NtQueryInformationToken (NTDLL.@)
|
||||
@@ -166,7 +167,7 @@ NTSTATUS WINAPI NtQueryInformationToken( HANDLE token, TOKEN_INFORMATION_CLASS c
|
||||
0, /* TokenAuditPolicy */
|
||||
0, /* TokenOrigin */
|
||||
sizeof(TOKEN_ELEVATION_TYPE), /* TokenElevationType */
|
||||
@@ -20,14 +28,14 @@ index 6f2b24e6ba4..99dba58b426 100644
|
||||
sizeof(TOKEN_ELEVATION), /* TokenElevation */
|
||||
0, /* TokenHasRestrictions */
|
||||
0, /* TokenAccessInformation */
|
||||
@@ -607,6 +607,32 @@ NTSTATUS WINAPI NtQueryInformationToken(
|
||||
}
|
||||
@@ -401,6 +402,33 @@ NTSTATUS WINAPI NtQueryInformationToken( HANDLE token, TOKEN_INFORMATION_CLASS c
|
||||
SERVER_END_REQ;
|
||||
break;
|
||||
|
||||
+ case TokenLinkedToken:
|
||||
+ SERVER_START_REQ( get_token_elevation_type )
|
||||
+ {
|
||||
+ TOKEN_LINKED_TOKEN *linked_token = tokeninfo;
|
||||
+ TOKEN_LINKED_TOKEN *linked_token = info;
|
||||
+ req->handle = wine_server_obj_handle( token );
|
||||
+ status = wine_server_call( req );
|
||||
+ if (status == STATUS_SUCCESS)
|
||||
@@ -50,9 +58,10 @@ index 6f2b24e6ba4..99dba58b426 100644
|
||||
+ }
|
||||
+ SERVER_END_REQ;
|
||||
+ break;
|
||||
+
|
||||
case TokenElevation:
|
||||
SERVER_START_REQ( get_token_elevation_type )
|
||||
{
|
||||
--
|
||||
2.13.1
|
||||
2.27.0
|
||||
|
||||
|
@@ -1,4 +1,4 @@
|
||||
From a5c9b96c7b517d212260cb8567162425554ff613 Mon Sep 17 00:00:00 2001
|
||||
From 2674bbd626b4a9e46e5ab729cb47c81950efefea Mon Sep 17 00:00:00 2001
|
||||
From: Derek Lesho <dlesho@codeweavers.com>
|
||||
Date: Tue, 7 Jan 2020 14:22:49 -0600
|
||||
Subject: [PATCH] bcrypt: Implement BCryptSecretAgreement with libgcrypt.
|
||||
@@ -7,17 +7,17 @@ Signed-off-by: Derek Lesho <dlesho@codeweavers.com>
|
||||
---
|
||||
configure.ac | 14 ++
|
||||
dlls/bcrypt/Makefile.in | 1 +
|
||||
dlls/bcrypt/bcrypt_internal.h | 13 ++
|
||||
dlls/bcrypt/bcrypt_main.c | 86 +++++++++--
|
||||
dlls/bcrypt/bcrypt_internal.h | 6 +
|
||||
dlls/bcrypt/bcrypt_main.c | 54 ++++++-
|
||||
dlls/bcrypt/gcrypt.c | 264 ++++++++++++++++++++++++++++++++++
|
||||
dlls/bcrypt/gnutls.c | 9 ++
|
||||
dlls/bcrypt/macos.c | 6 +
|
||||
dlls/bcrypt/tests/bcrypt.c | 2 +-
|
||||
8 files changed, 384 insertions(+), 11 deletions(-)
|
||||
8 files changed, 350 insertions(+), 6 deletions(-)
|
||||
create mode 100644 dlls/bcrypt/gcrypt.c
|
||||
|
||||
diff --git a/configure.ac b/configure.ac
|
||||
index e3d63ed7501..beb86c23b45 100644
|
||||
index 928f8ebd1b1..f9db147e7d5 100644
|
||||
--- a/configure.ac
|
||||
+++ b/configure.ac
|
||||
@@ -47,6 +47,7 @@ AC_ARG_WITH(faudio, AS_HELP_STRING([--without-faudio],[do not use FAudio (XAu
|
||||
@@ -61,7 +61,7 @@ index dd6d4a76640..ea3486a4002 100644
|
||||
macos.c \
|
||||
md2.c \
|
||||
diff --git a/dlls/bcrypt/bcrypt_internal.h b/dlls/bcrypt/bcrypt_internal.h
|
||||
index 18343a6c749..27cd4950274 100644
|
||||
index 43be170d77f..6c93ed78389 100644
|
||||
--- a/dlls/bcrypt/bcrypt_internal.h
|
||||
+++ b/dlls/bcrypt/bcrypt_internal.h
|
||||
@@ -25,6 +25,9 @@
|
||||
@@ -74,20 +74,16 @@ index 18343a6c749..27cd4950274 100644
|
||||
#elif HAVE_COMMONCRYPTO_COMMONCRYPTOR_H
|
||||
#include <AvailabilityMacros.h>
|
||||
#include <CommonCrypto/CommonCryptor.h>
|
||||
@@ -161,6 +164,12 @@ struct algorithm
|
||||
ULONG flags;
|
||||
};
|
||||
|
||||
+struct secret
|
||||
+{
|
||||
@@ -243,6 +246,8 @@ struct key
|
||||
struct secret
|
||||
{
|
||||
struct object hdr;
|
||||
+ UCHAR *data;
|
||||
+ ULONG len;
|
||||
+};
|
||||
+
|
||||
#if defined(HAVE_GNUTLS_CIPHER_INIT)
|
||||
struct key_symmetric
|
||||
{
|
||||
@@ -258,6 +267,7 @@ NTSTATUS key_export_dsa_capi( struct key *, UCHAR *, ULONG, ULONG * ) DECLSPEC_H
|
||||
};
|
||||
|
||||
NTSTATUS get_alg_property( const struct algorithm *, const WCHAR *, UCHAR *, ULONG, ULONG * ) DECLSPEC_HIDDEN;
|
||||
@@ -264,6 +269,7 @@ NTSTATUS key_export_dsa_capi( struct key *, UCHAR *, ULONG, ULONG * ) DECLSPEC_H
|
||||
NTSTATUS key_export_ecc( struct key *, UCHAR *, ULONG, ULONG * ) DECLSPEC_HIDDEN;
|
||||
NTSTATUS key_import_dsa_capi( struct key *, UCHAR *, ULONG ) DECLSPEC_HIDDEN;
|
||||
NTSTATUS key_import_ecc( struct key *, UCHAR *, ULONG ) DECLSPEC_HIDDEN;
|
||||
@@ -95,16 +91,8 @@ index 18343a6c749..27cd4950274 100644
|
||||
|
||||
BOOL is_zero_vector( const UCHAR *, ULONG ) DECLSPEC_HIDDEN;
|
||||
BOOL is_equal_vector( const UCHAR *, ULONG, const UCHAR *, ULONG ) DECLSPEC_HIDDEN;
|
||||
@@ -265,4 +275,7 @@ BOOL is_equal_vector( const UCHAR *, ULONG, const UCHAR *, ULONG ) DECLSPEC_HIDD
|
||||
BOOL gnutls_initialize(void) DECLSPEC_HIDDEN;
|
||||
void gnutls_uninitialize(void) DECLSPEC_HIDDEN;
|
||||
|
||||
+BOOL gcrypt_initialize(void) DECLSPEC_HIDDEN;
|
||||
+void gcrypt_uninitialize(void) DECLSPEC_HIDDEN;
|
||||
+
|
||||
#endif /* __BCRYPT_INTERNAL_H */
|
||||
diff --git a/dlls/bcrypt/bcrypt_main.c b/dlls/bcrypt/bcrypt_main.c
|
||||
index fee40ebe8d7..f254571bbc2 100644
|
||||
index bea2001a677..65c28ca63e2 100644
|
||||
--- a/dlls/bcrypt/bcrypt_main.c
|
||||
+++ b/dlls/bcrypt/bcrypt_main.c
|
||||
@@ -1421,6 +1421,12 @@ NTSTATUS key_import_ecc( struct key *key, UCHAR *input, ULONG len )
|
||||
@@ -120,74 +108,60 @@ index fee40ebe8d7..f254571bbc2 100644
|
||||
#endif
|
||||
|
||||
NTSTATUS WINAPI BCryptGenerateSymmetricKey( BCRYPT_ALG_HANDLE algorithm, BCRYPT_KEY_HANDLE *handle,
|
||||
@@ -1833,27 +1839,81 @@ NTSTATUS WINAPI BCryptDeriveKeyPBKDF2( BCRYPT_ALG_HANDLE handle, UCHAR *pwd, ULO
|
||||
return STATUS_SUCCESS;
|
||||
}
|
||||
|
||||
-NTSTATUS WINAPI BCryptSecretAgreement(BCRYPT_KEY_HANDLE handle, BCRYPT_KEY_HANDLE key, BCRYPT_SECRET_HANDLE *secret, ULONG flags)
|
||||
+NTSTATUS WINAPI BCryptSecretAgreement(BCRYPT_KEY_HANDLE hPrivKey, BCRYPT_KEY_HANDLE hPubKey, BCRYPT_SECRET_HANDLE *secret_out, ULONG flags)
|
||||
{
|
||||
- FIXME( "%p, %p, %p, %08x\n", handle, key, secret, flags );
|
||||
+ struct key *privkey = hPrivKey;
|
||||
+ struct key *pubkey = hPubKey;
|
||||
+ struct secret *secret;
|
||||
@@ -1838,8 +1844,9 @@ NTSTATUS WINAPI BCryptSecretAgreement(BCRYPT_KEY_HANDLE privatekey, BCRYPT_KEY_H
|
||||
struct key *privkey = privatekey;
|
||||
struct key *pubkey = publickey;
|
||||
struct secret *secret;
|
||||
+ NTSTATUS status;
|
||||
|
||||
- if(secret)
|
||||
- *secret = (BCRYPT_SECRET_HANDLE *)0xDEADFEED;
|
||||
+ TRACE( "%p, %p, %p, %08x\n", hPrivKey, hPubKey, secret_out, flags );
|
||||
- FIXME( "%p, %p, %p, %08x\n", privatekey, publickey, handle, flags );
|
||||
+ TRACE( "%p, %p, %p, %08x\n", privatekey, publickey, handle, flags );
|
||||
|
||||
- return STATUS_SUCCESS;
|
||||
+ secret = heap_alloc( sizeof(*secret) );
|
||||
+
|
||||
+ if ((status = compute_secret_ecc(privkey, pubkey, secret)))
|
||||
if (!privkey || privkey->hdr.magic != MAGIC_KEY) return STATUS_INVALID_HANDLE;
|
||||
if (!pubkey || pubkey->hdr.magic != MAGIC_KEY) return STATUS_INVALID_HANDLE;
|
||||
@@ -1848,7 +1855,16 @@ NTSTATUS WINAPI BCryptSecretAgreement(BCRYPT_KEY_HANDLE privatekey, BCRYPT_KEY_H
|
||||
if (!(secret = heap_alloc_zero( sizeof(*secret) ))) return STATUS_NO_MEMORY;
|
||||
secret->hdr.magic = MAGIC_SECRET;
|
||||
|
||||
- *handle = secret;
|
||||
+ if ((status = compute_secret_ecc( privkey, pubkey, secret )))
|
||||
+ {
|
||||
+ heap_free(secret);
|
||||
+ *secret_out = NULL;
|
||||
+ heap_free( secret );
|
||||
+ *handle = NULL;
|
||||
+ }
|
||||
+ else
|
||||
+ {
|
||||
+ *secret_out = secret;
|
||||
+ *handle = secret;
|
||||
+ }
|
||||
+
|
||||
+ return status;
|
||||
}
|
||||
|
||||
-NTSTATUS WINAPI BCryptDestroySecret(BCRYPT_SECRET_HANDLE secret)
|
||||
+NTSTATUS WINAPI BCryptDestroySecret(BCRYPT_SECRET_HANDLE hSecret)
|
||||
{
|
||||
- FIXME( "%p\n", secret );
|
||||
+ struct secret *secret = hSecret;
|
||||
+
|
||||
+ TRACE( "%p\n", hSecret );
|
||||
+
|
||||
+ if (!hSecret)
|
||||
+ {
|
||||
+ return STATUS_INVALID_HANDLE;
|
||||
+ }
|
||||
+
|
||||
+ heap_free(secret->data);
|
||||
+ heap_free(secret);
|
||||
+
|
||||
return STATUS_SUCCESS;
|
||||
}
|
||||
|
||||
-NTSTATUS WINAPI BCryptDeriveKey(BCRYPT_SECRET_HANDLE secret, LPCWSTR kdf, BCryptBufferDesc *parameter,
|
||||
+NTSTATUS WINAPI BCryptDeriveKey(BCRYPT_SECRET_HANDLE hSecret, LPCWSTR deriv_func, BCryptBufferDesc *parameter,
|
||||
PUCHAR derived, ULONG derived_size, ULONG *result, ULONG flags)
|
||||
@@ -1856,10 +1872,11 @@ NTSTATUS WINAPI BCryptDestroySecret(BCRYPT_SECRET_HANDLE handle)
|
||||
{
|
||||
struct secret *secret = handle;
|
||||
|
||||
- FIXME( "%p\n", handle );
|
||||
+ TRACE( "%p\n", handle );
|
||||
|
||||
if (!secret || secret->hdr.magic != MAGIC_SECRET) return STATUS_INVALID_HANDLE;
|
||||
secret->hdr.magic = 0;
|
||||
+ heap_free( secret->data );
|
||||
heap_free( secret );
|
||||
return STATUS_SUCCESS;
|
||||
}
|
||||
@@ -1869,12 +1886,33 @@ NTSTATUS WINAPI BCryptDeriveKey(BCRYPT_SECRET_HANDLE handle, LPCWSTR kdf, BCrypt
|
||||
{
|
||||
struct secret *secret = handle;
|
||||
|
||||
- FIXME( "%p, %s, %p, %p, %d, %p, %08x\n", secret, debugstr_w(kdf), parameter, derived, derived_size, result, flags );
|
||||
+ TRACE( "%p, %s, %p, %p, %d, %p, %08x\n", secret, debugstr_w(kdf), parameter, derived, derived_size, result, flags );
|
||||
|
||||
if (!secret || secret->hdr.magic != MAGIC_SECRET) return STATUS_INVALID_HANDLE;
|
||||
if (!kdf) return STATUS_INVALID_PARAMETER;
|
||||
|
||||
- return STATUS_INTERNAL_ERROR;
|
||||
+ struct secret *secret = hSecret;
|
||||
+
|
||||
+ TRACE( "%p, %s, %p, %p, %d, %p, %08x\n", secret, debugstr_w(deriv_func), parameter, derived, derived_size, result, flags );
|
||||
+
|
||||
+ if (!hSecret)
|
||||
+ {
|
||||
+ return STATUS_INVALID_HANDLE;
|
||||
+ }
|
||||
+
|
||||
+ if (!(strcmpW(deriv_func, BCRYPT_KDF_RAW_SECRET)))
|
||||
+ if (!(strcmpW( kdf, BCRYPT_KDF_RAW_SECRET )))
|
||||
+ {
|
||||
+ ULONG n;
|
||||
+ ULONG secret_length = secret->len;
|
||||
@@ -207,12 +181,12 @@ index fee40ebe8d7..f254571bbc2 100644
|
||||
+ *result = n;
|
||||
+ return STATUS_SUCCESS;
|
||||
+ }
|
||||
+ FIXME( "Derivation function %s not supported.\n", debugstr_w(deriv_func) );
|
||||
+ FIXME( "Derivation function %s not supported.\n", debugstr_w(kdf) );
|
||||
+ return STATUS_NOT_IMPLEMENTED;
|
||||
}
|
||||
|
||||
BOOL WINAPI DllMain( HINSTANCE hinst, DWORD reason, LPVOID reserved )
|
||||
@@ -1865,6 +1925,9 @@ BOOL WINAPI DllMain( HINSTANCE hinst, DWORD reason, LPVOID reserved )
|
||||
@@ -1886,6 +1924,9 @@ BOOL WINAPI DllMain( HINSTANCE hinst, DWORD reason, LPVOID reserved )
|
||||
DisableThreadLibraryCalls( hinst );
|
||||
#ifdef HAVE_GNUTLS_CIPHER_INIT
|
||||
gnutls_initialize();
|
||||
@@ -222,7 +196,7 @@ index fee40ebe8d7..f254571bbc2 100644
|
||||
#endif
|
||||
break;
|
||||
|
||||
@@ -1872,6 +1935,9 @@ BOOL WINAPI DllMain( HINSTANCE hinst, DWORD reason, LPVOID reserved )
|
||||
@@ -1893,6 +1934,9 @@ BOOL WINAPI DllMain( HINSTANCE hinst, DWORD reason, LPVOID reserved )
|
||||
if (reserved) break;
|
||||
#ifdef HAVE_GNUTLS_CIPHER_INIT
|
||||
gnutls_uninitialize();
|
||||
@@ -503,10 +477,10 @@ index 00000000000..f882d61def8
|
||||
+}
|
||||
+#endif
|
||||
diff --git a/dlls/bcrypt/gnutls.c b/dlls/bcrypt/gnutls.c
|
||||
index d447e90a11e..7828fa5c792 100644
|
||||
index 19a00e2ee25..1e075fe9994 100644
|
||||
--- a/dlls/bcrypt/gnutls.c
|
||||
+++ b/dlls/bcrypt/gnutls.c
|
||||
@@ -1580,4 +1580,13 @@ NTSTATUS key_destroy( struct key *key )
|
||||
@@ -1585,4 +1585,13 @@ NTSTATUS key_destroy( struct key *key )
|
||||
heap_free( key );
|
||||
return STATUS_SUCCESS;
|
||||
}
|
||||
@@ -521,10 +495,10 @@ index d447e90a11e..7828fa5c792 100644
|
||||
+
|
||||
#endif
|
||||
diff --git a/dlls/bcrypt/macos.c b/dlls/bcrypt/macos.c
|
||||
index f635ba4bc8e..50cd5d83d1f 100644
|
||||
index 7f902535b8f..6c2a41a0725 100644
|
||||
--- a/dlls/bcrypt/macos.c
|
||||
+++ b/dlls/bcrypt/macos.c
|
||||
@@ -267,4 +267,10 @@ NTSTATUS key_destroy( struct key *key )
|
||||
@@ -279,4 +279,10 @@ NTSTATUS key_destroy( struct key *key )
|
||||
heap_free( key );
|
||||
return STATUS_SUCCESS;
|
||||
}
|
||||
@@ -536,7 +510,7 @@ index f635ba4bc8e..50cd5d83d1f 100644
|
||||
+}
|
||||
#endif
|
||||
diff --git a/dlls/bcrypt/tests/bcrypt.c b/dlls/bcrypt/tests/bcrypt.c
|
||||
index e4a99d63048..6ca26b3d6ba 100644
|
||||
index eb7a72e0ff4..a351aacf1f5 100644
|
||||
--- a/dlls/bcrypt/tests/bcrypt.c
|
||||
+++ b/dlls/bcrypt/tests/bcrypt.c
|
||||
@@ -2068,7 +2068,7 @@ static void test_ECDH(void)
|
||||
@@ -549,5 +523,5 @@ index e4a99d63048..6ca26b3d6ba 100644
|
||||
if (status != STATUS_SUCCESS)
|
||||
{
|
||||
--
|
||||
2.26.2
|
||||
2.27.0
|
||||
|
||||
|
@@ -1,4 +1,4 @@
|
||||
From d0c4ac467f5e85e29ae407b29b6a93c85f375fd3 Mon Sep 17 00:00:00 2001
|
||||
From d232882c571a14f4da8a134071a2125805ebd41f Mon Sep 17 00:00:00 2001
|
||||
From: Derek Lesho <dlesho@codeweavers.com>
|
||||
Date: Tue, 7 Jan 2020 14:22:49 -0600
|
||||
Subject: [PATCH] bcrypt: Implement BCRYPT_KDF_HASH.
|
||||
@@ -6,24 +6,22 @@ Subject: [PATCH] bcrypt: Implement BCRYPT_KDF_HASH.
|
||||
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=47699
|
||||
Signed-off-by: Derek Lesho <dlesho at codeweavers.com>
|
||||
---
|
||||
dlls/bcrypt/bcrypt_main.c | 110 +++++++++++++++++++++++++++++++++++++
|
||||
dlls/bcrypt/bcrypt_main.c | 108 ++++++++++++++++++++++++++++++++++++-
|
||||
dlls/bcrypt/tests/bcrypt.c | 2 +-
|
||||
2 files changed, 111 insertions(+), 1 deletion(-)
|
||||
2 files changed, 108 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/dlls/bcrypt/bcrypt_main.c b/dlls/bcrypt/bcrypt_main.c
|
||||
index 15b934247d..57d552a4c0 100644
|
||||
index 65c28ca63e2..6e7b52e93b0 100644
|
||||
--- a/dlls/bcrypt/bcrypt_main.c
|
||||
+++ b/dlls/bcrypt/bcrypt_main.c
|
||||
@@ -1773,6 +1773,116 @@ NTSTATUS WINAPI BCryptDeriveKey(BCRYPT_SECRET_HANDLE hSecret, LPCWSTR deriv_func
|
||||
return STATUS_INVALID_HANDLE;
|
||||
}
|
||||
@@ -1891,7 +1891,113 @@ NTSTATUS WINAPI BCryptDeriveKey(BCRYPT_SECRET_HANDLE handle, LPCWSTR kdf, BCrypt
|
||||
if (!secret || secret->hdr.magic != MAGIC_SECRET) return STATUS_INVALID_HANDLE;
|
||||
if (!kdf) return STATUS_INVALID_PARAMETER;
|
||||
|
||||
+ if (flags)
|
||||
+ {
|
||||
+ FIXME("flags ignored: %08x\n", flags);
|
||||
+ }
|
||||
- if (!(strcmpW( kdf, BCRYPT_KDF_RAW_SECRET )))
|
||||
+ if (flags) FIXME("flags ignored: %08x\n", flags);
|
||||
+
|
||||
+ if (!(strcmpW(deriv_func, BCRYPT_KDF_HASH)))
|
||||
+ if (!(strcmpW( kdf, BCRYPT_KDF_HASH )))
|
||||
+ {
|
||||
+ unsigned int i;
|
||||
+ BCryptBuffer *hash_algorithm = NULL;
|
||||
@@ -127,15 +125,15 @@ index 15b934247d..57d552a4c0 100644
|
||||
+
|
||||
+ return STATUS_SUCCESS;
|
||||
+ }
|
||||
+ else
|
||||
if (!(strcmpW(deriv_func, BCRYPT_KDF_RAW_SECRET)))
|
||||
+ else if (!(strcmpW( kdf, BCRYPT_KDF_RAW_SECRET )))
|
||||
{
|
||||
ULONG n;
|
||||
ULONG secret_length = secret->len;
|
||||
diff --git a/dlls/bcrypt/tests/bcrypt.c b/dlls/bcrypt/tests/bcrypt.c
|
||||
index d9509f2c49..edc59a8a97 100644
|
||||
index a351aacf1f5..5333b879817 100644
|
||||
--- a/dlls/bcrypt/tests/bcrypt.c
|
||||
+++ b/dlls/bcrypt/tests/bcrypt.c
|
||||
@@ -2084,7 +2084,7 @@ static void test_ECDH(void)
|
||||
@@ -2085,7 +2085,7 @@ static void test_ECDH(void)
|
||||
raw_secret_end:
|
||||
|
||||
status = pBCryptDeriveKey(secret, BCRYPT_KDF_HASH, &hash_params, NULL, 0, &size, 0);
|
||||
@@ -145,5 +143,5 @@ index d9509f2c49..edc59a8a97 100644
|
||||
if (status != STATUS_SUCCESS)
|
||||
{
|
||||
--
|
||||
2.24.1
|
||||
2.27.0
|
||||
|
||||
|
@@ -1,27 +1,26 @@
|
||||
From ddc5f6fd9dde7a5cdde0be59d4a9db9e086400a9 Mon Sep 17 00:00:00 2001
|
||||
From 3497a2faa4ebab67b65bcf99d4ed56baa70ddf96 Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Michael=20M=C3=BCller?= <michael@fds-team.de>
|
||||
Date: Sat, 12 Jul 2014 23:58:19 +0200
|
||||
Subject: comctl32: Preserve custom colors between subitems. (v2)
|
||||
Subject: [PATCH] comctl32: Preserve custom colors between subitems. (v2)
|
||||
|
||||
---
|
||||
dlls/comctl32/listview.c | 20 +++++++++-----------
|
||||
dlls/comctl32/tests/listview.c | 23 ++++++++++++++++++++---
|
||||
2 files changed, 29 insertions(+), 14 deletions(-)
|
||||
dlls/comctl32/listview.c | 15 +++++++++------
|
||||
1 file changed, 9 insertions(+), 6 deletions(-)
|
||||
|
||||
diff --git a/dlls/comctl32/listview.c b/dlls/comctl32/listview.c
|
||||
index 56e2563..a35f5f2 100644
|
||||
index dba16d13a4c..35cab333b7b 100644
|
||||
--- a/dlls/comctl32/listview.c
|
||||
+++ b/dlls/comctl32/listview.c
|
||||
@@ -1072,7 +1072,7 @@ static void prepaint_setup (const LISTVIEW_INFO *infoPtr, HDC hdc, NMLVCUSTOMDRA
|
||||
COLORREF backcolor, textcolor;
|
||||
@@ -1063,7 +1063,7 @@ static void prepaint_setup (const LISTVIEW_INFO *infoPtr, HDC hdc, const NMLVCUS
|
||||
textcolor = cd->clrText;
|
||||
|
||||
/* apparently, for selected items, we have to override the returned values */
|
||||
- if (!SubItem)
|
||||
+ if (!SubItem || (infoPtr->dwLvExStyle & LVS_EX_FULLROWSELECT))
|
||||
{
|
||||
if (lpnmlvcd->nmcd.uItemState & CDIS_SELECTED)
|
||||
if (cd->nmcd.uItemState & CDIS_SELECTED)
|
||||
{
|
||||
@@ -4784,6 +4784,7 @@ static BOOL LISTVIEW_DrawItem(LISTVIEW_INFO *infoPtr, HDC hdc, INT nItem, ITERAT
|
||||
@@ -4786,6 +4786,7 @@ static BOOL LISTVIEW_DrawItem(LISTVIEW_INFO *infoPtr, HDC hdc, INT nItem, ITERAT
|
||||
while (iterator_next(subitems))
|
||||
{
|
||||
DWORD subitemstage = CDRF_DODEFAULT;
|
||||
@@ -29,15 +28,9 @@ index 56e2563..a35f5f2 100644
|
||||
|
||||
/* We need to query for each subitem, item's data (subitem == 0) is already here at this point */
|
||||
if (subitems->nItem)
|
||||
@@ -4810,19 +4811,16 @@ static BOOL LISTVIEW_DrawItem(LISTVIEW_INFO *infoPtr, HDC hdc, INT nItem, ITERAT
|
||||
|
||||
@@ -4813,13 +4814,15 @@ static BOOL LISTVIEW_DrawItem(LISTVIEW_INFO *infoPtr, HDC hdc, INT nItem, ITERAT
|
||||
if (cdsubitemmode & CDRF_NOTIFYSUBITEMDRAW)
|
||||
subitemstage = notify_customdraw(infoPtr, CDDS_SUBITEM | CDDS_ITEMPREPAINT, &nmlvcd);
|
||||
- else
|
||||
- {
|
||||
- nmlvcd.clrTextBk = infoPtr->clrTextBk;
|
||||
- nmlvcd.clrText = infoPtr->clrText;
|
||||
- }
|
||||
|
||||
- if (subitems->nItem == 0 || (cdmode & CDRF_NOTIFYITEMDRAW))
|
||||
- prepaint_setup(infoPtr, hdc, &nmlvcd, FALSE);
|
||||
@@ -57,5 +50,5 @@ index 56e2563..a35f5f2 100644
|
||||
if (subitemstage & CDRF_NOTIFYPOSTPAINT)
|
||||
subitemstage = notify_customdraw(infoPtr, CDDS_SUBITEM | CDDS_ITEMPOSTPAINT, &nmlvcd);
|
||||
--
|
||||
2.9.0
|
||||
2.27.0
|
||||
|
||||
|
File diff suppressed because it is too large
Load Diff
@@ -1,494 +0,0 @@
|
||||
From 6233bb9da6cf391db945440ed68f089b31b65e04 Mon Sep 17 00:00:00 2001
|
||||
From: Alistair Leslie-Hughes <leslie_alistair@hotmail.com>
|
||||
Date: Sat, 24 Aug 2019 18:23:38 +1000
|
||||
Subject: [PATCH 03/27] dsdmo: Add IDirectSoundFXChorus support
|
||||
|
||||
---
|
||||
dlls/dsdmo/Makefile.in | 1 +
|
||||
dlls/dsdmo/chorus.c | 397 +++++++++++++++++++++++++++++++++++
|
||||
dlls/dsdmo/dsdmo_classes.idl | 10 +
|
||||
dlls/dsdmo/dsdmo_private.h | 1 +
|
||||
dlls/dsdmo/main.c | 14 ++
|
||||
5 files changed, 423 insertions(+)
|
||||
create mode 100644 dlls/dsdmo/chorus.c
|
||||
|
||||
diff --git a/dlls/dsdmo/Makefile.in b/dlls/dsdmo/Makefile.in
|
||||
index cb4f8f8a4b..34d0e89bf1 100644
|
||||
--- a/dlls/dsdmo/Makefile.in
|
||||
+++ b/dlls/dsdmo/Makefile.in
|
||||
@@ -3,6 +3,7 @@ IMPORTS = uuid
|
||||
EXTRADLLFLAGS = -mno-cygwin
|
||||
|
||||
C_SRCS = \
|
||||
+ chorus.c \
|
||||
echo.c \
|
||||
main.c
|
||||
|
||||
diff --git a/dlls/dsdmo/chorus.c b/dlls/dsdmo/chorus.c
|
||||
new file mode 100644
|
||||
index 0000000000..6d4076bcba
|
||||
--- /dev/null
|
||||
+++ b/dlls/dsdmo/chorus.c
|
||||
@@ -0,0 +1,397 @@
|
||||
+/*
|
||||
+ * Copyright 2019 Alistair Leslie-Hughes
|
||||
+ *
|
||||
+ * This library is free software; you can redistribute it and/or
|
||||
+ * modify it under the terms of the GNU Lesser General Public
|
||||
+ * License as published by the Free Software Foundation; either
|
||||
+ * version 2.1 of the License, or (at your option) any later version.
|
||||
+ *
|
||||
+ * This library is distributed in the hope that it will be useful,
|
||||
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
+ * Lesser General Public License for more details.
|
||||
+ *
|
||||
+ * You should have received a copy of the GNU Lesser General Public
|
||||
+ * License along with this library; if not, write to the Free Software
|
||||
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
|
||||
+ */
|
||||
+#define COBJMACROS
|
||||
+
|
||||
+#include "dsdmo_private.h"
|
||||
+
|
||||
+WINE_DEFAULT_DEBUG_CHANNEL(dsdmo);
|
||||
+
|
||||
+struct dmo_chorusfx
|
||||
+{
|
||||
+ IDirectSoundFXChorus IDirectSoundFXChorus_iface;
|
||||
+ IMediaObject IMediaObject_iface;
|
||||
+ IMediaObjectInPlace IMediaObjectInPlace_iface;
|
||||
+ LONG ref;
|
||||
+};
|
||||
+
|
||||
+static inline struct dmo_chorusfx *impl_from_IDirectSoundFXChorus(IDirectSoundFXChorus *iface)
|
||||
+{
|
||||
+ return CONTAINING_RECORD(iface, struct dmo_chorusfx, IDirectSoundFXChorus_iface);
|
||||
+}
|
||||
+
|
||||
+static inline struct dmo_chorusfx *impl_from_IMediaObject(IMediaObject *iface)
|
||||
+{
|
||||
+ return CONTAINING_RECORD(iface, struct dmo_chorusfx, IMediaObject_iface);
|
||||
+}
|
||||
+
|
||||
+static inline struct dmo_chorusfx *impl_from_IMediaObjectInPlace(IMediaObjectInPlace *iface)
|
||||
+{
|
||||
+ return CONTAINING_RECORD(iface, struct dmo_chorusfx, IMediaObjectInPlace_iface);
|
||||
+}
|
||||
+
|
||||
+static HRESULT WINAPI chorus_mediaobj_QueryInterface(IMediaObject *iface, REFIID riid, void **obj)
|
||||
+{
|
||||
+ struct dmo_chorusfx *This = impl_from_IMediaObject(iface);
|
||||
+ return IDirectSoundFXChorus_QueryInterface(&This->IDirectSoundFXChorus_iface, riid, obj);
|
||||
+}
|
||||
+
|
||||
+static ULONG WINAPI chorus_mediaobj_AddRef(IMediaObject *iface)
|
||||
+{
|
||||
+ struct dmo_chorusfx *This = impl_from_IMediaObject(iface);
|
||||
+ return IDirectSoundFXChorus_AddRef(&This->IDirectSoundFXChorus_iface);
|
||||
+}
|
||||
+
|
||||
+static ULONG WINAPI chorus_mediaobj_Release(IMediaObject *iface)
|
||||
+{
|
||||
+ struct dmo_chorusfx *This = impl_from_IMediaObject(iface);
|
||||
+ return IDirectSoundFXChorus_Release(&This->IDirectSoundFXChorus_iface);
|
||||
+}
|
||||
+
|
||||
+static HRESULT WINAPI chorus_mediaobj_GetStreamCount(IMediaObject *iface, DWORD *inputs, DWORD *outputs)
|
||||
+{
|
||||
+ struct dmo_chorusfx *This = impl_from_IMediaObject(iface);
|
||||
+ FIXME("%p, %p, %p\n", This, inputs, outputs);
|
||||
+ return E_NOTIMPL;
|
||||
+}
|
||||
+
|
||||
+static HRESULT WINAPI chorus_mediaobj_GetInputStreamInfo(IMediaObject *iface, DWORD index, DWORD *flags)
|
||||
+{
|
||||
+ struct dmo_chorusfx *This = impl_from_IMediaObject(iface);
|
||||
+ FIXME("%p, %d, %p\n", This, index, flags);
|
||||
+ return E_NOTIMPL;
|
||||
+}
|
||||
+
|
||||
+static HRESULT WINAPI chorus_mediaobj_GetOutputStreamInfo(IMediaObject *iface, DWORD index, DWORD *flags)
|
||||
+{
|
||||
+ struct dmo_chorusfx *This = impl_from_IMediaObject(iface);
|
||||
+ FIXME("%p, %d, %p\n", This, index, flags);
|
||||
+ return E_NOTIMPL;
|
||||
+}
|
||||
+
|
||||
+static HRESULT WINAPI chorus_mediaobj_GetInputType(IMediaObject *iface, DWORD index, DWORD type, DMO_MEDIA_TYPE *pmt)
|
||||
+{
|
||||
+ struct dmo_chorusfx *This = impl_from_IMediaObject(iface);
|
||||
+ FIXME("%p, %d, %d, %p\n", This, index, type, pmt);
|
||||
+ return E_NOTIMPL;
|
||||
+}
|
||||
+
|
||||
+static HRESULT WINAPI chorus_mediaobj_GetOutputType(IMediaObject *iface, DWORD index, DWORD type, DMO_MEDIA_TYPE *pmt)
|
||||
+{
|
||||
+ struct dmo_chorusfx *This = impl_from_IMediaObject(iface);
|
||||
+ FIXME("%p, %d, %d, %p\n", This, index, type, pmt);
|
||||
+ return E_NOTIMPL;
|
||||
+}
|
||||
+
|
||||
+static HRESULT WINAPI chorus_mediaobj_SetInputType(IMediaObject *iface, DWORD index, const DMO_MEDIA_TYPE *pmt, DWORD flags)
|
||||
+{
|
||||
+ struct dmo_chorusfx *This = impl_from_IMediaObject(iface);
|
||||
+ FIXME("%p, %d, %p, %x\n", This, index, pmt, flags);
|
||||
+ return S_OK;
|
||||
+}
|
||||
+
|
||||
+static HRESULT WINAPI chorus_mediaobj_SetOutputType(IMediaObject *iface, DWORD index, const DMO_MEDIA_TYPE *pmt, DWORD flags)
|
||||
+{
|
||||
+ struct dmo_chorusfx *This = impl_from_IMediaObject(iface);
|
||||
+ FIXME("%p, %d, %p, %x\n", This, index, pmt, flags);
|
||||
+ return S_OK;
|
||||
+}
|
||||
+
|
||||
+static HRESULT WINAPI chorus_mediaobj_GetInputCurrentType(IMediaObject *iface, DWORD index, DMO_MEDIA_TYPE *pmt)
|
||||
+{
|
||||
+ struct dmo_chorusfx *This = impl_from_IMediaObject(iface);
|
||||
+ FIXME("%p, %d, %p\n", This, index, pmt);
|
||||
+ return E_NOTIMPL;
|
||||
+}
|
||||
+
|
||||
+static HRESULT WINAPI chorus_mediaobj_GetOutputCurrentType(IMediaObject *iface, DWORD index, DMO_MEDIA_TYPE *pmt)
|
||||
+{
|
||||
+ struct dmo_chorusfx *This = impl_from_IMediaObject(iface);
|
||||
+ FIXME("%p, %d, %p\n", This, index, pmt);
|
||||
+ return E_NOTIMPL;
|
||||
+}
|
||||
+
|
||||
+static HRESULT WINAPI chorus_mediaobj_GetInputSizeInfo(IMediaObject *iface, DWORD index, DWORD *size, DWORD *ahead, DWORD *alignment)
|
||||
+{
|
||||
+ struct dmo_chorusfx *This = impl_from_IMediaObject(iface);
|
||||
+ FIXME("%p, %d, %p, %p, %p\n", This, index, size, ahead, alignment);
|
||||
+ return E_NOTIMPL;
|
||||
+}
|
||||
+
|
||||
+static HRESULT WINAPI chorus_mediaobj_GetOutputSizeInfo(IMediaObject *iface, DWORD index, DWORD *size, DWORD *alignment)
|
||||
+{
|
||||
+ struct dmo_chorusfx *This = impl_from_IMediaObject(iface);
|
||||
+ FIXME("%p, %d, %p, %p\n", This, index, size, alignment);
|
||||
+ return E_NOTIMPL;
|
||||
+}
|
||||
+
|
||||
+static HRESULT WINAPI chorus_mediaobj_GetInputMaxLatency(IMediaObject *iface, DWORD index, REFERENCE_TIME *latency)
|
||||
+{
|
||||
+ struct dmo_chorusfx *This = impl_from_IMediaObject(iface);
|
||||
+ FIXME("%p, %d, %p\n", This, index, latency);
|
||||
+ return E_NOTIMPL;
|
||||
+}
|
||||
+
|
||||
+static HRESULT WINAPI chorus_mediaobj_SetInputMaxLatency(IMediaObject *iface, DWORD index, REFERENCE_TIME latency)
|
||||
+{
|
||||
+ struct dmo_chorusfx *This = impl_from_IMediaObject(iface);
|
||||
+ FIXME("%p, %d, %s\n", This, index, wine_dbgstr_longlong(latency));
|
||||
+ return E_NOTIMPL;
|
||||
+}
|
||||
+
|
||||
+static HRESULT WINAPI chorus_mediaobj_Flush(IMediaObject *iface)
|
||||
+{
|
||||
+ struct dmo_chorusfx *This = impl_from_IMediaObject(iface);
|
||||
+ FIXME("%p\n", This);
|
||||
+ return E_NOTIMPL;
|
||||
+}
|
||||
+
|
||||
+static HRESULT WINAPI chorus_mediaobj_Discontinuity(IMediaObject *iface, DWORD index)
|
||||
+{
|
||||
+ struct dmo_chorusfx *This = impl_from_IMediaObject(iface);
|
||||
+ FIXME("%p, %d\n", This, index);
|
||||
+ return E_NOTIMPL;
|
||||
+}
|
||||
+
|
||||
+static HRESULT WINAPI chorus_mediaobj_AllocateStreamingResources(IMediaObject *iface)
|
||||
+{
|
||||
+ struct dmo_chorusfx *This = impl_from_IMediaObject(iface);
|
||||
+ FIXME("%p\n", This);
|
||||
+ return E_NOTIMPL;
|
||||
+}
|
||||
+
|
||||
+static HRESULT WINAPI chorus_mediaobj_FreeStreamingResources(IMediaObject *iface)
|
||||
+{
|
||||
+ struct dmo_chorusfx *This = impl_from_IMediaObject(iface);
|
||||
+ FIXME("%p\n", This);
|
||||
+ return E_NOTIMPL;
|
||||
+}
|
||||
+
|
||||
+static HRESULT WINAPI chorus_mediaobj_GetInputStatus(IMediaObject *iface, DWORD index, DWORD *flags)
|
||||
+{
|
||||
+ struct dmo_chorusfx *This = impl_from_IMediaObject(iface);
|
||||
+ FIXME("%p, %d, %p\n", This, index, flags);
|
||||
+ return E_NOTIMPL;
|
||||
+}
|
||||
+
|
||||
+static HRESULT WINAPI chorus_mediaobj_ProcessInput(IMediaObject *iface, DWORD index, IMediaBuffer *buffer,
|
||||
+ DWORD flags, REFERENCE_TIME timestamp, REFERENCE_TIME length)
|
||||
+{
|
||||
+ struct dmo_chorusfx *This = impl_from_IMediaObject(iface);
|
||||
+ FIXME("%p, %d, %p, %x, %s, %s\n", This, index, buffer, flags, wine_dbgstr_longlong(timestamp), wine_dbgstr_longlong(length));
|
||||
+ return E_NOTIMPL;
|
||||
+}
|
||||
+
|
||||
+static HRESULT WINAPI chorus_mediaobj_ProcessOutput(IMediaObject *iface, DWORD flags, DWORD count,
|
||||
+ DMO_OUTPUT_DATA_BUFFER *buffers, DWORD *status)
|
||||
+{
|
||||
+ struct dmo_chorusfx *This = impl_from_IMediaObject(iface);
|
||||
+ FIXME("%p, %x, %d, %p, %p\n", This, flags, count, buffers, status);
|
||||
+ return E_NOTIMPL;
|
||||
+}
|
||||
+
|
||||
+static HRESULT WINAPI chorus_mediaobj_Lock(IMediaObject *iface, LONG lock)
|
||||
+{
|
||||
+ struct dmo_chorusfx *This = impl_from_IMediaObject(iface);
|
||||
+ FIXME("%p, %d\n", This, lock);
|
||||
+ return E_NOTIMPL;
|
||||
+}
|
||||
+
|
||||
+static const IMediaObjectVtbl echo_mediaobjectVtbl =
|
||||
+{
|
||||
+ chorus_mediaobj_QueryInterface,
|
||||
+ chorus_mediaobj_AddRef,
|
||||
+ chorus_mediaobj_Release,
|
||||
+ chorus_mediaobj_GetStreamCount,
|
||||
+ chorus_mediaobj_GetInputStreamInfo,
|
||||
+ chorus_mediaobj_GetOutputStreamInfo,
|
||||
+ chorus_mediaobj_GetInputType,
|
||||
+ chorus_mediaobj_GetOutputType,
|
||||
+ chorus_mediaobj_SetInputType,
|
||||
+ chorus_mediaobj_SetOutputType,
|
||||
+ chorus_mediaobj_GetInputCurrentType,
|
||||
+ chorus_mediaobj_GetOutputCurrentType,
|
||||
+ chorus_mediaobj_GetInputSizeInfo,
|
||||
+ chorus_mediaobj_GetOutputSizeInfo,
|
||||
+ chorus_mediaobj_GetInputMaxLatency,
|
||||
+ chorus_mediaobj_SetInputMaxLatency,
|
||||
+ chorus_mediaobj_Flush,
|
||||
+ chorus_mediaobj_Discontinuity,
|
||||
+ chorus_mediaobj_AllocateStreamingResources,
|
||||
+ chorus_mediaobj_FreeStreamingResources,
|
||||
+ chorus_mediaobj_GetInputStatus,
|
||||
+ chorus_mediaobj_ProcessInput,
|
||||
+ chorus_mediaobj_ProcessOutput,
|
||||
+ chorus_mediaobj_Lock
|
||||
+};
|
||||
+
|
||||
+static HRESULT WINAPI chorus_mediainplace_QueryInterface(IMediaObjectInPlace *iface, REFIID riid, void **obj)
|
||||
+{
|
||||
+ struct dmo_chorusfx *This = impl_from_IMediaObjectInPlace(iface);
|
||||
+ return IDirectSoundFXChorus_QueryInterface(&This->IDirectSoundFXChorus_iface, riid, obj);
|
||||
+}
|
||||
+
|
||||
+static ULONG WINAPI chorus_mediainplace_AddRef(IMediaObjectInPlace *iface)
|
||||
+{
|
||||
+ struct dmo_chorusfx *This = impl_from_IMediaObjectInPlace(iface);
|
||||
+ return IDirectSoundFXChorus_AddRef(&This->IDirectSoundFXChorus_iface);
|
||||
+}
|
||||
+
|
||||
+static ULONG WINAPI chorus_mediainplace_Release(IMediaObjectInPlace *iface)
|
||||
+{
|
||||
+ struct dmo_chorusfx *This = impl_from_IMediaObjectInPlace(iface);
|
||||
+ return IDirectSoundFXChorus_Release(&This->IDirectSoundFXChorus_iface);
|
||||
+}
|
||||
+
|
||||
+static HRESULT WINAPI chorus_mediainplace_Process(IMediaObjectInPlace *iface, ULONG size, BYTE *data, REFERENCE_TIME start, DWORD flags)
|
||||
+{
|
||||
+ struct dmo_chorusfx *This = impl_from_IMediaObjectInPlace(iface);
|
||||
+ static BOOL once = 0;
|
||||
+ if(!once++)
|
||||
+ FIXME("%p, %d, %p, %s, %x\n", This, size, data, wine_dbgstr_longlong(start), flags);
|
||||
+ else
|
||||
+ TRACE("%p, %d, %p, %s, %x\n", This, size, data, wine_dbgstr_longlong(start), flags);
|
||||
+ return E_NOTIMPL;
|
||||
+}
|
||||
+
|
||||
+static HRESULT WINAPI chorus_mediainplace_Clone(IMediaObjectInPlace *iface, IMediaObjectInPlace **object)
|
||||
+{
|
||||
+ struct dmo_chorusfx *This = impl_from_IMediaObjectInPlace(iface);
|
||||
+ FIXME("%p, %p\n", This, object);
|
||||
+ return E_NOTIMPL;
|
||||
+}
|
||||
+
|
||||
+static HRESULT WINAPI chorus_mediainplace_GetLatency(IMediaObjectInPlace *iface, REFERENCE_TIME *latency)
|
||||
+{
|
||||
+ struct dmo_chorusfx *This = impl_from_IMediaObjectInPlace(iface);
|
||||
+ FIXME("%p, %p\n", This, latency);
|
||||
+ return E_NOTIMPL;
|
||||
+}
|
||||
+
|
||||
+static const IMediaObjectInPlaceVtbl echo_mediainplaceVtbl =
|
||||
+{
|
||||
+ chorus_mediainplace_QueryInterface,
|
||||
+ chorus_mediainplace_AddRef,
|
||||
+ chorus_mediainplace_Release,
|
||||
+ chorus_mediainplace_Process,
|
||||
+ chorus_mediainplace_Clone,
|
||||
+ chorus_mediainplace_GetLatency
|
||||
+};
|
||||
+
|
||||
+static HRESULT WINAPI chrousfx_QueryInterface(IDirectSoundFXChorus *iface, REFIID riid, void **ppv)
|
||||
+{
|
||||
+ struct dmo_chorusfx *This = impl_from_IDirectSoundFXChorus(iface);
|
||||
+
|
||||
+ TRACE("(%p)->(%s %p)\n", This, debugstr_guid(riid), ppv);
|
||||
+
|
||||
+ if (IsEqualGUID(riid, &IID_IUnknown) ||
|
||||
+ IsEqualGUID(riid, &IID_IDirectSoundFXChorus))
|
||||
+ {
|
||||
+ *ppv = &This->IDirectSoundFXChorus_iface;
|
||||
+ }
|
||||
+ else if(IsEqualGUID(riid, &IID_IMediaObject))
|
||||
+ {
|
||||
+ *ppv = &This->IMediaObject_iface;
|
||||
+ }
|
||||
+ else if(IsEqualGUID(riid, &IID_IMediaObjectInPlace))
|
||||
+ {
|
||||
+ *ppv = &This->IMediaObjectInPlace_iface;
|
||||
+ }
|
||||
+
|
||||
+ if(!*ppv)
|
||||
+ {
|
||||
+ FIXME("(%p)->(%s,%p),not found\n", This, debugstr_guid(riid), ppv);
|
||||
+ return E_NOINTERFACE;
|
||||
+ }
|
||||
+
|
||||
+ IUnknown_AddRef((IUnknown*)*ppv);
|
||||
+
|
||||
+ return S_OK;
|
||||
+}
|
||||
+
|
||||
+static ULONG WINAPI chrousfx_AddRef(IDirectSoundFXChorus *iface)
|
||||
+{
|
||||
+ struct dmo_chorusfx *This = impl_from_IDirectSoundFXChorus(iface);
|
||||
+ ULONG ref = InterlockedIncrement(&This->ref);
|
||||
+
|
||||
+ TRACE("(%p) ref=%u\n", This, ref);
|
||||
+
|
||||
+ return ref;
|
||||
+}
|
||||
+
|
||||
+static ULONG WINAPI chrousfx_Release(IDirectSoundFXChorus *iface)
|
||||
+{
|
||||
+ struct dmo_chorusfx *This = impl_from_IDirectSoundFXChorus(iface);
|
||||
+ ULONG ref = InterlockedDecrement(&This->ref);
|
||||
+
|
||||
+ TRACE("(%p) ref=%u\n", This, ref);
|
||||
+
|
||||
+ if (!ref)
|
||||
+ {
|
||||
+ heap_free(This);
|
||||
+ }
|
||||
+ return ref;
|
||||
+}
|
||||
+
|
||||
+static HRESULT WINAPI chrousfx_SetAllParameters(IDirectSoundFXChorus *iface, const DSFXChorus *chorus)
|
||||
+{
|
||||
+ struct dmo_chorusfx *This = impl_from_IDirectSoundFXChorus(iface);
|
||||
+ FIXME("(%p) %p\n", This, chorus);
|
||||
+
|
||||
+ return E_NOTIMPL;
|
||||
+}
|
||||
+
|
||||
+static HRESULT WINAPI chrousfx_GetAllParameters(IDirectSoundFXChorus *iface, DSFXChorus *chorus)
|
||||
+{
|
||||
+ struct dmo_chorusfx *This = impl_from_IDirectSoundFXChorus(iface);
|
||||
+ FIXME("(%p) %p\n", This, chorus);
|
||||
+
|
||||
+ return E_NOTIMPL;
|
||||
+}
|
||||
+
|
||||
+static const struct IDirectSoundFXChorusVtbl chorusfxVtbl =
|
||||
+{
|
||||
+ chrousfx_QueryInterface,
|
||||
+ chrousfx_AddRef,
|
||||
+ chrousfx_Release,
|
||||
+ chrousfx_SetAllParameters,
|
||||
+ chrousfx_GetAllParameters
|
||||
+};
|
||||
+
|
||||
+HRESULT WINAPI ChrousFactory_CreateInstance(IClassFactory *iface, IUnknown *outer, REFIID riid, void **ppv)
|
||||
+{
|
||||
+ struct dmo_chorusfx *object;
|
||||
+ HRESULT ret;
|
||||
+
|
||||
+ TRACE("(%p, %s, %p)\n", outer, debugstr_guid(riid), ppv);
|
||||
+
|
||||
+ *ppv = NULL;
|
||||
+
|
||||
+ object = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(*object));
|
||||
+ if (!object)
|
||||
+ return E_OUTOFMEMORY;
|
||||
+
|
||||
+ object->IDirectSoundFXChorus_iface.lpVtbl = &chorusfxVtbl;
|
||||
+ object->IMediaObject_iface.lpVtbl = &echo_mediaobjectVtbl;
|
||||
+ object->IMediaObjectInPlace_iface.lpVtbl = &echo_mediainplaceVtbl;
|
||||
+ object->ref = 1;
|
||||
+
|
||||
+ ret = chrousfx_QueryInterface(&object->IDirectSoundFXChorus_iface, riid, ppv);
|
||||
+ chrousfx_Release(&object->IDirectSoundFXChorus_iface);
|
||||
+
|
||||
+ return ret;
|
||||
+}
|
||||
diff --git a/dlls/dsdmo/dsdmo_classes.idl b/dlls/dsdmo/dsdmo_classes.idl
|
||||
index 649db8f61b..ba1a8f6ff4 100644
|
||||
--- a/dlls/dsdmo/dsdmo_classes.idl
|
||||
+++ b/dlls/dsdmo/dsdmo_classes.idl
|
||||
@@ -26,3 +26,13 @@
|
||||
coclass DirectSoundEchoDMO
|
||||
{
|
||||
}
|
||||
+
|
||||
+[
|
||||
+ uuid(efe6629c-81f7-4281-bd91-c9d604a95af6),
|
||||
+ threading(both),
|
||||
+ progid("Microsoft.DirectSoundChorusDMO.1"),
|
||||
+ vi_progid("Microsoft.DirectSoundChorusDMO")
|
||||
+]
|
||||
+coclass DirectSoundChorusDMO
|
||||
+{
|
||||
+}
|
||||
diff --git a/dlls/dsdmo/dsdmo_private.h b/dlls/dsdmo/dsdmo_private.h
|
||||
index 4abe5a9f60..cbe906e472 100644
|
||||
--- a/dlls/dsdmo/dsdmo_private.h
|
||||
+++ b/dlls/dsdmo/dsdmo_private.h
|
||||
@@ -28,5 +28,6 @@
|
||||
#include "dsound.h"
|
||||
|
||||
extern HRESULT WINAPI EchoFactory_CreateInstance(IClassFactory *iface, IUnknown *outer, REFIID riid, void **ppv) DECLSPEC_HIDDEN;
|
||||
+extern HRESULT WINAPI ChrousFactory_CreateInstance(IClassFactory *iface, IUnknown *outer, REFIID riid, void **ppv) DECLSPEC_HIDDEN;
|
||||
|
||||
#endif
|
||||
diff --git a/dlls/dsdmo/main.c b/dlls/dsdmo/main.c
|
||||
index d751f90dc9..5a89eaff39 100644
|
||||
--- a/dlls/dsdmo/main.c
|
||||
+++ b/dlls/dsdmo/main.c
|
||||
@@ -94,7 +94,16 @@ static const IClassFactoryVtbl EchoFactoryVtbl = {
|
||||
ClassFactory_LockServer
|
||||
};
|
||||
|
||||
+static const IClassFactoryVtbl ChrousFactoryVtbl = {
|
||||
+ ClassFactory_QueryInterface,
|
||||
+ ClassFactory_AddRef,
|
||||
+ ClassFactory_Release,
|
||||
+ ChrousFactory_CreateInstance,
|
||||
+ ClassFactory_LockServer
|
||||
+};
|
||||
+
|
||||
static IClassFactory echofx_factory = { &EchoFactoryVtbl };
|
||||
+static IClassFactory chorusfx_factory = { &ChrousFactoryVtbl };
|
||||
|
||||
/***********************************************************************
|
||||
* DllGetClassObject
|
||||
@@ -108,6 +117,11 @@ HRESULT WINAPI DllGetClassObject(REFCLSID rclsid, REFIID riid, LPVOID *ppv)
|
||||
TRACE("GUID_DSFX_STANDARD_ECHO\n");
|
||||
return IClassFactory_QueryInterface(&echofx_factory, riid, ppv);
|
||||
}
|
||||
+ else if(IsEqualGUID(&GUID_DSFX_STANDARD_CHORUS, rclsid))
|
||||
+ {
|
||||
+ TRACE("GUID_DSFX_STANDARD_CHORUS\n");
|
||||
+ return IClassFactory_QueryInterface(&chorusfx_factory, riid, ppv);
|
||||
+ }
|
||||
|
||||
FIXME("%s %s %p\n", debugstr_guid(rclsid), debugstr_guid(riid), ppv);
|
||||
return CLASS_E_CLASSNOTAVAILABLE;
|
||||
--
|
||||
2.17.1
|
||||
|
@@ -1,495 +0,0 @@
|
||||
From abb55212b7e4ed43526bfc24fa78715f9dafa3e2 Mon Sep 17 00:00:00 2001
|
||||
From: Alistair Leslie-Hughes <leslie_alistair@hotmail.com>
|
||||
Date: Sat, 24 Aug 2019 18:40:39 +1000
|
||||
Subject: [PATCH 04/27] dsdmo: Add IDirectSoundFXCompressor support
|
||||
|
||||
---
|
||||
dlls/dsdmo/Makefile.in | 1 +
|
||||
dlls/dsdmo/compressor.c | 397 +++++++++++++++++++++++++++++++++++
|
||||
dlls/dsdmo/dsdmo_classes.idl | 10 +
|
||||
dlls/dsdmo/dsdmo_private.h | 1 +
|
||||
dlls/dsdmo/main.c | 14 ++
|
||||
5 files changed, 423 insertions(+)
|
||||
create mode 100644 dlls/dsdmo/compressor.c
|
||||
|
||||
diff --git a/dlls/dsdmo/Makefile.in b/dlls/dsdmo/Makefile.in
|
||||
index 34d0e89bf1..d0b10ac4f9 100644
|
||||
--- a/dlls/dsdmo/Makefile.in
|
||||
+++ b/dlls/dsdmo/Makefile.in
|
||||
@@ -4,6 +4,7 @@ EXTRADLLFLAGS = -mno-cygwin
|
||||
|
||||
C_SRCS = \
|
||||
chorus.c \
|
||||
+ compressor.c \
|
||||
echo.c \
|
||||
main.c
|
||||
|
||||
diff --git a/dlls/dsdmo/compressor.c b/dlls/dsdmo/compressor.c
|
||||
new file mode 100644
|
||||
index 0000000000..1cf26c7437
|
||||
--- /dev/null
|
||||
+++ b/dlls/dsdmo/compressor.c
|
||||
@@ -0,0 +1,397 @@
|
||||
+/*
|
||||
+ * Copyright 2019 Alistair Leslie-Hughes
|
||||
+ *
|
||||
+ * This library is free software; you can redistribute it and/or
|
||||
+ * modify it under the terms of the GNU Lesser General Public
|
||||
+ * License as published by the Free Software Foundation; either
|
||||
+ * version 2.1 of the License, or (at your option) any later version.
|
||||
+ *
|
||||
+ * This library is distributed in the hope that it will be useful,
|
||||
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
+ * Lesser General Public License for more details.
|
||||
+ *
|
||||
+ * You should have received a copy of the GNU Lesser General Public
|
||||
+ * License along with this library; if not, write to the Free Software
|
||||
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
|
||||
+ */
|
||||
+#define COBJMACROS
|
||||
+
|
||||
+#include "dsdmo_private.h"
|
||||
+
|
||||
+WINE_DEFAULT_DEBUG_CHANNEL(dsdmo);
|
||||
+
|
||||
+struct dmo_compressorfx
|
||||
+{
|
||||
+ IDirectSoundFXCompressor IDirectSoundFXCompressor_iface;
|
||||
+ IMediaObject IMediaObject_iface;
|
||||
+ IMediaObjectInPlace IMediaObjectInPlace_iface;
|
||||
+ LONG ref;
|
||||
+};
|
||||
+
|
||||
+static inline struct dmo_compressorfx *impl_from_IDirectSoundFXCompressor(IDirectSoundFXCompressor *iface)
|
||||
+{
|
||||
+ return CONTAINING_RECORD(iface, struct dmo_compressorfx, IDirectSoundFXCompressor_iface);
|
||||
+}
|
||||
+
|
||||
+static inline struct dmo_compressorfx *impl_from_IMediaObject(IMediaObject *iface)
|
||||
+{
|
||||
+ return CONTAINING_RECORD(iface, struct dmo_compressorfx, IMediaObject_iface);
|
||||
+}
|
||||
+
|
||||
+static inline struct dmo_compressorfx *impl_from_IMediaObjectInPlace(IMediaObjectInPlace *iface)
|
||||
+{
|
||||
+ return CONTAINING_RECORD(iface, struct dmo_compressorfx, IMediaObjectInPlace_iface);
|
||||
+}
|
||||
+
|
||||
+static HRESULT WINAPI compressor_mediaobj_QueryInterface(IMediaObject *iface, REFIID riid, void **obj)
|
||||
+{
|
||||
+ struct dmo_compressorfx *This = impl_from_IMediaObject(iface);
|
||||
+ return IDirectSoundFXCompressor_QueryInterface(&This->IDirectSoundFXCompressor_iface, riid, obj);
|
||||
+}
|
||||
+
|
||||
+static ULONG WINAPI compressor_mediaobj_AddRef(IMediaObject *iface)
|
||||
+{
|
||||
+ struct dmo_compressorfx *This = impl_from_IMediaObject(iface);
|
||||
+ return IDirectSoundFXCompressor_AddRef(&This->IDirectSoundFXCompressor_iface);
|
||||
+}
|
||||
+
|
||||
+static ULONG WINAPI compressor_mediaobj_Release(IMediaObject *iface)
|
||||
+{
|
||||
+ struct dmo_compressorfx *This = impl_from_IMediaObject(iface);
|
||||
+ return IDirectSoundFXCompressor_Release(&This->IDirectSoundFXCompressor_iface);
|
||||
+}
|
||||
+
|
||||
+static HRESULT WINAPI compressor_mediaobj_GetStreamCount(IMediaObject *iface, DWORD *inputs, DWORD *outputs)
|
||||
+{
|
||||
+ struct dmo_compressorfx *This = impl_from_IMediaObject(iface);
|
||||
+ FIXME("%p, %p, %p\n", This, inputs, outputs);
|
||||
+ return E_NOTIMPL;
|
||||
+}
|
||||
+
|
||||
+static HRESULT WINAPI compressor_mediaobj_GetInputStreamInfo(IMediaObject *iface, DWORD index, DWORD *flags)
|
||||
+{
|
||||
+ struct dmo_compressorfx *This = impl_from_IMediaObject(iface);
|
||||
+ FIXME("%p, %d, %p\n", This, index, flags);
|
||||
+ return E_NOTIMPL;
|
||||
+}
|
||||
+
|
||||
+static HRESULT WINAPI compressor_mediaobj_GetOutputStreamInfo(IMediaObject *iface, DWORD index, DWORD *flags)
|
||||
+{
|
||||
+ struct dmo_compressorfx *This = impl_from_IMediaObject(iface);
|
||||
+ FIXME("%p, %d, %p\n", This, index, flags);
|
||||
+ return E_NOTIMPL;
|
||||
+}
|
||||
+
|
||||
+static HRESULT WINAPI compressor_mediaobj_GetInputType(IMediaObject *iface, DWORD index, DWORD type, DMO_MEDIA_TYPE *pmt)
|
||||
+{
|
||||
+ struct dmo_compressorfx *This = impl_from_IMediaObject(iface);
|
||||
+ FIXME("%p, %d, %d, %p\n", This, index, type, pmt);
|
||||
+ return E_NOTIMPL;
|
||||
+}
|
||||
+
|
||||
+static HRESULT WINAPI compressor_mediaobj_GetOutputType(IMediaObject *iface, DWORD index, DWORD type, DMO_MEDIA_TYPE *pmt)
|
||||
+{
|
||||
+ struct dmo_compressorfx *This = impl_from_IMediaObject(iface);
|
||||
+ FIXME("%p, %d, %d, %p\n", This, index, type, pmt);
|
||||
+ return E_NOTIMPL;
|
||||
+}
|
||||
+
|
||||
+static HRESULT WINAPI compressor_mediaobj_SetInputType(IMediaObject *iface, DWORD index, const DMO_MEDIA_TYPE *pmt, DWORD flags)
|
||||
+{
|
||||
+ struct dmo_compressorfx *This = impl_from_IMediaObject(iface);
|
||||
+ FIXME("%p, %d, %p, %x\n", This, index, pmt, flags);
|
||||
+ return S_OK;
|
||||
+}
|
||||
+
|
||||
+static HRESULT WINAPI compressor_mediaobj_SetOutputType(IMediaObject *iface, DWORD index, const DMO_MEDIA_TYPE *pmt, DWORD flags)
|
||||
+{
|
||||
+ struct dmo_compressorfx *This = impl_from_IMediaObject(iface);
|
||||
+ FIXME("%p, %d, %p, %x\n", This, index, pmt, flags);
|
||||
+ return S_OK;
|
||||
+}
|
||||
+
|
||||
+static HRESULT WINAPI compressor_mediaobj_GetInputCurrentType(IMediaObject *iface, DWORD index, DMO_MEDIA_TYPE *pmt)
|
||||
+{
|
||||
+ struct dmo_compressorfx *This = impl_from_IMediaObject(iface);
|
||||
+ FIXME("%p, %d, %p\n", This, index, pmt);
|
||||
+ return E_NOTIMPL;
|
||||
+}
|
||||
+
|
||||
+static HRESULT WINAPI compressor_mediaobj_GetOutputCurrentType(IMediaObject *iface, DWORD index, DMO_MEDIA_TYPE *pmt)
|
||||
+{
|
||||
+ struct dmo_compressorfx *This = impl_from_IMediaObject(iface);
|
||||
+ FIXME("%p, %d, %p\n", This, index, pmt);
|
||||
+ return E_NOTIMPL;
|
||||
+}
|
||||
+
|
||||
+static HRESULT WINAPI compressor_mediaobj_GetInputSizeInfo(IMediaObject *iface, DWORD index, DWORD *size, DWORD *ahead, DWORD *alignment)
|
||||
+{
|
||||
+ struct dmo_compressorfx *This = impl_from_IMediaObject(iface);
|
||||
+ FIXME("%p, %d, %p, %p, %p\n", This, index, size, ahead, alignment);
|
||||
+ return E_NOTIMPL;
|
||||
+}
|
||||
+
|
||||
+static HRESULT WINAPI compressor_mediaobj_GetOutputSizeInfo(IMediaObject *iface, DWORD index, DWORD *size, DWORD *alignment)
|
||||
+{
|
||||
+ struct dmo_compressorfx *This = impl_from_IMediaObject(iface);
|
||||
+ FIXME("%p, %d, %p, %p\n", This, index, size, alignment);
|
||||
+ return E_NOTIMPL;
|
||||
+}
|
||||
+
|
||||
+static HRESULT WINAPI compressor_mediaobj_GetInputMaxLatency(IMediaObject *iface, DWORD index, REFERENCE_TIME *latency)
|
||||
+{
|
||||
+ struct dmo_compressorfx *This = impl_from_IMediaObject(iface);
|
||||
+ FIXME("%p, %d, %p\n", This, index, latency);
|
||||
+ return E_NOTIMPL;
|
||||
+}
|
||||
+
|
||||
+static HRESULT WINAPI compressor_mediaobj_SetInputMaxLatency(IMediaObject *iface, DWORD index, REFERENCE_TIME latency)
|
||||
+{
|
||||
+ struct dmo_compressorfx *This = impl_from_IMediaObject(iface);
|
||||
+ FIXME("%p, %d, %s\n", This, index, wine_dbgstr_longlong(latency));
|
||||
+ return E_NOTIMPL;
|
||||
+}
|
||||
+
|
||||
+static HRESULT WINAPI compressor_mediaobj_Flush(IMediaObject *iface)
|
||||
+{
|
||||
+ struct dmo_compressorfx *This = impl_from_IMediaObject(iface);
|
||||
+ FIXME("%p\n", This);
|
||||
+ return E_NOTIMPL;
|
||||
+}
|
||||
+
|
||||
+static HRESULT WINAPI compressor_mediaobj_Discontinuity(IMediaObject *iface, DWORD index)
|
||||
+{
|
||||
+ struct dmo_compressorfx *This = impl_from_IMediaObject(iface);
|
||||
+ FIXME("%p, %d\n", This, index);
|
||||
+ return E_NOTIMPL;
|
||||
+}
|
||||
+
|
||||
+static HRESULT WINAPI compressor_mediaobj_AllocateStreamingResources(IMediaObject *iface)
|
||||
+{
|
||||
+ struct dmo_compressorfx *This = impl_from_IMediaObject(iface);
|
||||
+ FIXME("%p\n", This);
|
||||
+ return E_NOTIMPL;
|
||||
+}
|
||||
+
|
||||
+static HRESULT WINAPI compressor_mediaobj_FreeStreamingResources(IMediaObject *iface)
|
||||
+{
|
||||
+ struct dmo_compressorfx *This = impl_from_IMediaObject(iface);
|
||||
+ FIXME("%p\n", This);
|
||||
+ return E_NOTIMPL;
|
||||
+}
|
||||
+
|
||||
+static HRESULT WINAPI compressor_mediaobj_GetInputStatus(IMediaObject *iface, DWORD index, DWORD *flags)
|
||||
+{
|
||||
+ struct dmo_compressorfx *This = impl_from_IMediaObject(iface);
|
||||
+ FIXME("%p, %d, %p\n", This, index, flags);
|
||||
+ return E_NOTIMPL;
|
||||
+}
|
||||
+
|
||||
+static HRESULT WINAPI compressor_mediaobj_ProcessInput(IMediaObject *iface, DWORD index, IMediaBuffer *buffer,
|
||||
+ DWORD flags, REFERENCE_TIME timestamp, REFERENCE_TIME length)
|
||||
+{
|
||||
+ struct dmo_compressorfx *This = impl_from_IMediaObject(iface);
|
||||
+ FIXME("%p, %d, %p, %x, %s, %s\n", This, index, buffer, flags, wine_dbgstr_longlong(timestamp), wine_dbgstr_longlong(length));
|
||||
+ return E_NOTIMPL;
|
||||
+}
|
||||
+
|
||||
+static HRESULT WINAPI compressor_mediaobj_ProcessOutput(IMediaObject *iface, DWORD flags, DWORD count,
|
||||
+ DMO_OUTPUT_DATA_BUFFER *buffers, DWORD *status)
|
||||
+{
|
||||
+ struct dmo_compressorfx *This = impl_from_IMediaObject(iface);
|
||||
+ FIXME("%p, %x, %d, %p, %p\n", This, flags, count, buffers, status);
|
||||
+ return E_NOTIMPL;
|
||||
+}
|
||||
+
|
||||
+static HRESULT WINAPI compressor_mediaobj_Lock(IMediaObject *iface, LONG lock)
|
||||
+{
|
||||
+ struct dmo_compressorfx *This = impl_from_IMediaObject(iface);
|
||||
+ FIXME("%p, %d\n", This, lock);
|
||||
+ return E_NOTIMPL;
|
||||
+}
|
||||
+
|
||||
+static const IMediaObjectVtbl compressor_mediaobjectVtbl =
|
||||
+{
|
||||
+ compressor_mediaobj_QueryInterface,
|
||||
+ compressor_mediaobj_AddRef,
|
||||
+ compressor_mediaobj_Release,
|
||||
+ compressor_mediaobj_GetStreamCount,
|
||||
+ compressor_mediaobj_GetInputStreamInfo,
|
||||
+ compressor_mediaobj_GetOutputStreamInfo,
|
||||
+ compressor_mediaobj_GetInputType,
|
||||
+ compressor_mediaobj_GetOutputType,
|
||||
+ compressor_mediaobj_SetInputType,
|
||||
+ compressor_mediaobj_SetOutputType,
|
||||
+ compressor_mediaobj_GetInputCurrentType,
|
||||
+ compressor_mediaobj_GetOutputCurrentType,
|
||||
+ compressor_mediaobj_GetInputSizeInfo,
|
||||
+ compressor_mediaobj_GetOutputSizeInfo,
|
||||
+ compressor_mediaobj_GetInputMaxLatency,
|
||||
+ compressor_mediaobj_SetInputMaxLatency,
|
||||
+ compressor_mediaobj_Flush,
|
||||
+ compressor_mediaobj_Discontinuity,
|
||||
+ compressor_mediaobj_AllocateStreamingResources,
|
||||
+ compressor_mediaobj_FreeStreamingResources,
|
||||
+ compressor_mediaobj_GetInputStatus,
|
||||
+ compressor_mediaobj_ProcessInput,
|
||||
+ compressor_mediaobj_ProcessOutput,
|
||||
+ compressor_mediaobj_Lock
|
||||
+};
|
||||
+
|
||||
+static HRESULT WINAPI echo_mediainplace_QueryInterface(IMediaObjectInPlace *iface, REFIID riid, void **obj)
|
||||
+{
|
||||
+ struct dmo_compressorfx *This = impl_from_IMediaObjectInPlace(iface);
|
||||
+ return IDirectSoundFXCompressor_QueryInterface(&This->IDirectSoundFXCompressor_iface, riid, obj);
|
||||
+}
|
||||
+
|
||||
+static ULONG WINAPI echo_mediainplace_AddRef(IMediaObjectInPlace *iface)
|
||||
+{
|
||||
+ struct dmo_compressorfx *This = impl_from_IMediaObjectInPlace(iface);
|
||||
+ return IDirectSoundFXCompressor_AddRef(&This->IDirectSoundFXCompressor_iface);
|
||||
+}
|
||||
+
|
||||
+static ULONG WINAPI echo_mediainplace_Release(IMediaObjectInPlace *iface)
|
||||
+{
|
||||
+ struct dmo_compressorfx *This = impl_from_IMediaObjectInPlace(iface);
|
||||
+ return IDirectSoundFXCompressor_Release(&This->IDirectSoundFXCompressor_iface);
|
||||
+}
|
||||
+
|
||||
+static HRESULT WINAPI echo_mediainplace_Process(IMediaObjectInPlace *iface, ULONG size, BYTE *data, REFERENCE_TIME start, DWORD flags)
|
||||
+{
|
||||
+ struct dmo_compressorfx *This = impl_from_IMediaObjectInPlace(iface);
|
||||
+ static BOOL once = 0;
|
||||
+ if(!once++)
|
||||
+ FIXME("%p, %d, %p, %s, %x\n", This, size, data, wine_dbgstr_longlong(start), flags);
|
||||
+ else
|
||||
+ TRACE("%p, %d, %p, %s, %x\n", This, size, data, wine_dbgstr_longlong(start), flags);
|
||||
+ return E_NOTIMPL;
|
||||
+}
|
||||
+
|
||||
+static HRESULT WINAPI echo_mediainplace_Clone(IMediaObjectInPlace *iface, IMediaObjectInPlace **object)
|
||||
+{
|
||||
+ struct dmo_compressorfx *This = impl_from_IMediaObjectInPlace(iface);
|
||||
+ FIXME("%p, %p\n", This, object);
|
||||
+ return E_NOTIMPL;
|
||||
+}
|
||||
+
|
||||
+static HRESULT WINAPI echo_mediainplace_GetLatency(IMediaObjectInPlace *iface, REFERENCE_TIME *latency)
|
||||
+{
|
||||
+ struct dmo_compressorfx *This = impl_from_IMediaObjectInPlace(iface);
|
||||
+ FIXME("%p, %p\n", This, latency);
|
||||
+ return E_NOTIMPL;
|
||||
+}
|
||||
+
|
||||
+static const IMediaObjectInPlaceVtbl compressor_mediainplaceVtbl =
|
||||
+{
|
||||
+ echo_mediainplace_QueryInterface,
|
||||
+ echo_mediainplace_AddRef,
|
||||
+ echo_mediainplace_Release,
|
||||
+ echo_mediainplace_Process,
|
||||
+ echo_mediainplace_Clone,
|
||||
+ echo_mediainplace_GetLatency
|
||||
+};
|
||||
+
|
||||
+static HRESULT WINAPI compressorfx_QueryInterface(IDirectSoundFXCompressor *iface, REFIID riid, void **ppv)
|
||||
+{
|
||||
+ struct dmo_compressorfx *This = impl_from_IDirectSoundFXCompressor(iface);
|
||||
+
|
||||
+ TRACE("(%p)->(%s %p)\n", This, debugstr_guid(riid), ppv);
|
||||
+
|
||||
+ if (IsEqualGUID(riid, &IID_IUnknown) ||
|
||||
+ IsEqualGUID(riid, &IID_IDirectSoundFXCompressor))
|
||||
+ {
|
||||
+ *ppv = &This->IDirectSoundFXCompressor_iface;
|
||||
+ }
|
||||
+ else if(IsEqualGUID(riid, &IID_IMediaObject))
|
||||
+ {
|
||||
+ *ppv = &This->IMediaObject_iface;
|
||||
+ }
|
||||
+ else if(IsEqualGUID(riid, &IID_IMediaObjectInPlace))
|
||||
+ {
|
||||
+ *ppv = &This->IMediaObjectInPlace_iface;
|
||||
+ }
|
||||
+
|
||||
+ if(!*ppv)
|
||||
+ {
|
||||
+ FIXME("(%p)->(%s,%p),not found\n", This, debugstr_guid(riid), ppv);
|
||||
+ return E_NOINTERFACE;
|
||||
+ }
|
||||
+
|
||||
+ IUnknown_AddRef((IUnknown*)*ppv);
|
||||
+
|
||||
+ return S_OK;
|
||||
+}
|
||||
+
|
||||
+static ULONG WINAPI compressorfx_AddRef(IDirectSoundFXCompressor *iface)
|
||||
+{
|
||||
+ struct dmo_compressorfx *This = impl_from_IDirectSoundFXCompressor(iface);
|
||||
+ ULONG ref = InterlockedIncrement(&This->ref);
|
||||
+
|
||||
+ TRACE("(%p) ref=%u\n", This, ref);
|
||||
+
|
||||
+ return ref;
|
||||
+}
|
||||
+
|
||||
+static ULONG WINAPI compressorfx_Release(IDirectSoundFXCompressor *iface)
|
||||
+{
|
||||
+ struct dmo_compressorfx *This = impl_from_IDirectSoundFXCompressor(iface);
|
||||
+ ULONG ref = InterlockedDecrement(&This->ref);
|
||||
+
|
||||
+ TRACE("(%p) ref=%u\n", This, ref);
|
||||
+
|
||||
+ if (!ref)
|
||||
+ {
|
||||
+ heap_free(This);
|
||||
+ }
|
||||
+ return ref;
|
||||
+}
|
||||
+
|
||||
+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 echofxVtbl =
|
||||
+{
|
||||
+ compressorfx_QueryInterface,
|
||||
+ compressorfx_AddRef,
|
||||
+ compressorfx_Release,
|
||||
+ compressorfx_SetAllParameters,
|
||||
+ compressorfx_GetAllParameters
|
||||
+};
|
||||
+
|
||||
+HRESULT WINAPI CompressorFactory_CreateInstance(IClassFactory *iface, IUnknown *outer, REFIID riid, void **ppv)
|
||||
+{
|
||||
+ struct dmo_compressorfx *object;
|
||||
+ HRESULT ret;
|
||||
+
|
||||
+ TRACE("(%p, %s, %p)\n", outer, debugstr_guid(riid), ppv);
|
||||
+
|
||||
+ *ppv = NULL;
|
||||
+
|
||||
+ object = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(*object));
|
||||
+ if (!object)
|
||||
+ return E_OUTOFMEMORY;
|
||||
+
|
||||
+ object->IDirectSoundFXCompressor_iface.lpVtbl = &echofxVtbl;
|
||||
+ object->IMediaObject_iface.lpVtbl = &compressor_mediaobjectVtbl;
|
||||
+ object->IMediaObjectInPlace_iface.lpVtbl = &compressor_mediainplaceVtbl;
|
||||
+ object->ref = 1;
|
||||
+
|
||||
+ ret = compressorfx_QueryInterface(&object->IDirectSoundFXCompressor_iface, riid, ppv);
|
||||
+ compressorfx_Release(&object->IDirectSoundFXCompressor_iface);
|
||||
+
|
||||
+ return ret;
|
||||
+}
|
||||
diff --git a/dlls/dsdmo/dsdmo_classes.idl b/dlls/dsdmo/dsdmo_classes.idl
|
||||
index ba1a8f6ff4..f7f139de30 100644
|
||||
--- a/dlls/dsdmo/dsdmo_classes.idl
|
||||
+++ b/dlls/dsdmo/dsdmo_classes.idl
|
||||
@@ -36,3 +36,13 @@ coclass DirectSoundEchoDMO
|
||||
coclass DirectSoundChorusDMO
|
||||
{
|
||||
}
|
||||
+
|
||||
+[
|
||||
+ uuid(ef011f79-4000-406d-87af-bffb3fc39d57),
|
||||
+ threading(both),
|
||||
+ progid("Microsoft.DirectSoundCompressorDMO.1"),
|
||||
+ vi_progid("Microsoft.DirectSoundCompressorDMO")
|
||||
+]
|
||||
+coclass DirectSoundCompressorDMO
|
||||
+{
|
||||
+}
|
||||
diff --git a/dlls/dsdmo/dsdmo_private.h b/dlls/dsdmo/dsdmo_private.h
|
||||
index cbe906e472..96c0c061ee 100644
|
||||
--- a/dlls/dsdmo/dsdmo_private.h
|
||||
+++ b/dlls/dsdmo/dsdmo_private.h
|
||||
@@ -29,5 +29,6 @@
|
||||
|
||||
extern HRESULT WINAPI EchoFactory_CreateInstance(IClassFactory *iface, IUnknown *outer, REFIID riid, void **ppv) DECLSPEC_HIDDEN;
|
||||
extern HRESULT WINAPI ChrousFactory_CreateInstance(IClassFactory *iface, IUnknown *outer, REFIID riid, void **ppv) DECLSPEC_HIDDEN;
|
||||
+extern HRESULT WINAPI CompressorFactory_CreateInstance(IClassFactory *iface, IUnknown *outer, REFIID riid, void **ppv) DECLSPEC_HIDDEN;
|
||||
|
||||
#endif
|
||||
diff --git a/dlls/dsdmo/main.c b/dlls/dsdmo/main.c
|
||||
index 5a89eaff39..13d4af7adc 100644
|
||||
--- a/dlls/dsdmo/main.c
|
||||
+++ b/dlls/dsdmo/main.c
|
||||
@@ -102,8 +102,17 @@ static const IClassFactoryVtbl ChrousFactoryVtbl = {
|
||||
ClassFactory_LockServer
|
||||
};
|
||||
|
||||
+static const IClassFactoryVtbl CompressorFactoryVtbl = {
|
||||
+ ClassFactory_QueryInterface,
|
||||
+ ClassFactory_AddRef,
|
||||
+ ClassFactory_Release,
|
||||
+ CompressorFactory_CreateInstance,
|
||||
+ ClassFactory_LockServer
|
||||
+};
|
||||
+
|
||||
static IClassFactory echofx_factory = { &EchoFactoryVtbl };
|
||||
static IClassFactory chorusfx_factory = { &ChrousFactoryVtbl };
|
||||
+static IClassFactory compressorfx_factory = { &CompressorFactoryVtbl };
|
||||
|
||||
/***********************************************************************
|
||||
* DllGetClassObject
|
||||
@@ -122,6 +131,11 @@ HRESULT WINAPI DllGetClassObject(REFCLSID rclsid, REFIID riid, LPVOID *ppv)
|
||||
TRACE("GUID_DSFX_STANDARD_CHORUS\n");
|
||||
return IClassFactory_QueryInterface(&chorusfx_factory, riid, ppv);
|
||||
}
|
||||
+ else if(IsEqualGUID(&GUID_DSFX_STANDARD_COMPRESSOR, rclsid))
|
||||
+ {
|
||||
+ TRACE("GUID_DSFX_STANDARD_COMPRESSOR\n");
|
||||
+ return IClassFactory_QueryInterface(&compressorfx_factory, riid, ppv);
|
||||
+ }
|
||||
|
||||
FIXME("%s %s %p\n", debugstr_guid(rclsid), debugstr_guid(riid), ppv);
|
||||
return CLASS_E_CLASSNOTAVAILABLE;
|
||||
--
|
||||
2.17.1
|
||||
|
@@ -1,496 +0,0 @@
|
||||
From 63f04f4a7272534796dd9b942a6dd0fe874699d2 Mon Sep 17 00:00:00 2001
|
||||
From: Alistair Leslie-Hughes <leslie_alistair@hotmail.com>
|
||||
Date: Sun, 25 Aug 2019 15:00:07 +1000
|
||||
Subject: [PATCH] dsdmo: Add IDirectSoundFXDistortion support
|
||||
|
||||
---
|
||||
dlls/dsdmo/Makefile.in | 1 +
|
||||
dlls/dsdmo/distortion.c | 397 +++++++++++++++++++++++++++++++++++
|
||||
dlls/dsdmo/dsdmo_classes.idl | 10 +
|
||||
dlls/dsdmo/dsdmo_private.h | 1 +
|
||||
dlls/dsdmo/main.c | 14 ++
|
||||
5 files changed, 423 insertions(+)
|
||||
create mode 100644 dlls/dsdmo/distortion.c
|
||||
|
||||
diff --git a/dlls/dsdmo/Makefile.in b/dlls/dsdmo/Makefile.in
|
||||
index d0b10ac4f9..0a1efa0462 100644
|
||||
--- a/dlls/dsdmo/Makefile.in
|
||||
+++ b/dlls/dsdmo/Makefile.in
|
||||
@@ -5,6 +5,7 @@ EXTRADLLFLAGS = -mno-cygwin
|
||||
C_SRCS = \
|
||||
chorus.c \
|
||||
compressor.c \
|
||||
+ distortion.c \
|
||||
echo.c \
|
||||
main.c
|
||||
|
||||
diff --git a/dlls/dsdmo/distortion.c b/dlls/dsdmo/distortion.c
|
||||
new file mode 100644
|
||||
index 0000000000..92e498b6f1
|
||||
--- /dev/null
|
||||
+++ b/dlls/dsdmo/distortion.c
|
||||
@@ -0,0 +1,397 @@
|
||||
+/*
|
||||
+ * Copyright 2019 Alistair Leslie-Hughes
|
||||
+ *
|
||||
+ * This library is free software; you can redistribute it and/or
|
||||
+ * modify it under the terms of the GNU Lesser General Public
|
||||
+ * License as published by the Free Software Foundation; either
|
||||
+ * version 2.1 of the License, or (at your option) any later version.
|
||||
+ *
|
||||
+ * This library is distributed in the hope that it will be useful,
|
||||
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
+ * Lesser General Public License for more details.
|
||||
+ *
|
||||
+ * You should have received a copy of the GNU Lesser General Public
|
||||
+ * License along with this library; if not, write to the Free Software
|
||||
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
|
||||
+ */
|
||||
+#define COBJMACROS
|
||||
+
|
||||
+#include "dsdmo_private.h"
|
||||
+
|
||||
+WINE_DEFAULT_DEBUG_CHANNEL(dsdmo);
|
||||
+
|
||||
+struct dmo_distortionfx
|
||||
+{
|
||||
+ IDirectSoundFXDistortion IDirectSoundFXDistortion_iface;
|
||||
+ IMediaObject IMediaObject_iface;
|
||||
+ IMediaObjectInPlace IMediaObjectInPlace_iface;
|
||||
+ LONG ref;
|
||||
+};
|
||||
+
|
||||
+static inline struct dmo_distortionfx *impl_from_IDirectSoundFXDistortion(IDirectSoundFXDistortion *iface)
|
||||
+{
|
||||
+ return CONTAINING_RECORD(iface, struct dmo_distortionfx, IDirectSoundFXDistortion_iface);
|
||||
+}
|
||||
+
|
||||
+static inline struct dmo_distortionfx *impl_from_IMediaObject(IMediaObject *iface)
|
||||
+{
|
||||
+ return CONTAINING_RECORD(iface, struct dmo_distortionfx, IMediaObject_iface);
|
||||
+}
|
||||
+
|
||||
+static inline struct dmo_distortionfx *impl_from_IMediaObjectInPlace(IMediaObjectInPlace *iface)
|
||||
+{
|
||||
+ return CONTAINING_RECORD(iface, struct dmo_distortionfx, IMediaObjectInPlace_iface);
|
||||
+}
|
||||
+
|
||||
+static HRESULT WINAPI distortionfx_mediaobj_QueryInterface(IMediaObject *iface, REFIID riid, void **obj)
|
||||
+{
|
||||
+ struct dmo_distortionfx *This = impl_from_IMediaObject(iface);
|
||||
+ return IDirectSoundFXDistortion_QueryInterface(&This->IDirectSoundFXDistortion_iface, riid, obj);
|
||||
+}
|
||||
+
|
||||
+static ULONG WINAPI distortionfx_mediaobj_AddRef(IMediaObject *iface)
|
||||
+{
|
||||
+ struct dmo_distortionfx *This = impl_from_IMediaObject(iface);
|
||||
+ return IDirectSoundFXDistortion_AddRef(&This->IDirectSoundFXDistortion_iface);
|
||||
+}
|
||||
+
|
||||
+static ULONG WINAPI distortionfx_mediaobj_Release(IMediaObject *iface)
|
||||
+{
|
||||
+ struct dmo_distortionfx *This = impl_from_IMediaObject(iface);
|
||||
+ return IDirectSoundFXDistortion_Release(&This->IDirectSoundFXDistortion_iface);
|
||||
+}
|
||||
+
|
||||
+static HRESULT WINAPI distortionfx_mediaobj_GetStreamCount(IMediaObject *iface, DWORD *inputs, DWORD *outputs)
|
||||
+{
|
||||
+ struct dmo_distortionfx *This = impl_from_IMediaObject(iface);
|
||||
+ FIXME("%p, %p, %p\n", This, inputs, outputs);
|
||||
+ return E_NOTIMPL;
|
||||
+}
|
||||
+
|
||||
+static HRESULT WINAPI distortionfx_mediaobj_GetInputStreamInfo(IMediaObject *iface, DWORD index, DWORD *flags)
|
||||
+{
|
||||
+ struct dmo_distortionfx *This = impl_from_IMediaObject(iface);
|
||||
+ FIXME("%p, %d, %p\n", This, index, flags);
|
||||
+ return E_NOTIMPL;
|
||||
+}
|
||||
+
|
||||
+static HRESULT WINAPI distortionfx_mediaobj_GetOutputStreamInfo(IMediaObject *iface, DWORD index, DWORD *flags)
|
||||
+{
|
||||
+ struct dmo_distortionfx *This = impl_from_IMediaObject(iface);
|
||||
+ FIXME("%p, %d, %p\n", This, index, flags);
|
||||
+ return E_NOTIMPL;
|
||||
+}
|
||||
+
|
||||
+static HRESULT WINAPI distortionfx_mediaobj_GetInputType(IMediaObject *iface, DWORD index, DWORD type, DMO_MEDIA_TYPE *pmt)
|
||||
+{
|
||||
+ struct dmo_distortionfx *This = impl_from_IMediaObject(iface);
|
||||
+ FIXME("%p, %d, %d, %p\n", This, index, type, pmt);
|
||||
+ return E_NOTIMPL;
|
||||
+}
|
||||
+
|
||||
+static HRESULT WINAPI distortionfx_mediaobj_GetOutputType(IMediaObject *iface, DWORD index, DWORD type, DMO_MEDIA_TYPE *pmt)
|
||||
+{
|
||||
+ struct dmo_distortionfx *This = impl_from_IMediaObject(iface);
|
||||
+ FIXME("%p, %d, %d, %p\n", This, index, type, pmt);
|
||||
+ return E_NOTIMPL;
|
||||
+}
|
||||
+
|
||||
+static HRESULT WINAPI distortionfx_mediaobj_SetInputType(IMediaObject *iface, DWORD index, const DMO_MEDIA_TYPE *pmt, DWORD flags)
|
||||
+{
|
||||
+ struct dmo_distortionfx *This = impl_from_IMediaObject(iface);
|
||||
+ FIXME("%p, %d, %p, %x\n", This, index, pmt, flags);
|
||||
+ return S_OK;
|
||||
+}
|
||||
+
|
||||
+static HRESULT WINAPI distortionfx_mediaobj_SetOutputType(IMediaObject *iface, DWORD index, const DMO_MEDIA_TYPE *pmt, DWORD flags)
|
||||
+{
|
||||
+ struct dmo_distortionfx *This = impl_from_IMediaObject(iface);
|
||||
+ FIXME("%p, %d, %p, %x\n", This, index, pmt, flags);
|
||||
+ return S_OK;
|
||||
+}
|
||||
+
|
||||
+static HRESULT WINAPI distortionfx_mediaobj_GetInputCurrentType(IMediaObject *iface, DWORD index, DMO_MEDIA_TYPE *pmt)
|
||||
+{
|
||||
+ struct dmo_distortionfx *This = impl_from_IMediaObject(iface);
|
||||
+ FIXME("%p, %d, %p\n", This, index, pmt);
|
||||
+ return E_NOTIMPL;
|
||||
+}
|
||||
+
|
||||
+static HRESULT WINAPI distortionfx_mediaobj_GetOutputCurrentType(IMediaObject *iface, DWORD index, DMO_MEDIA_TYPE *pmt)
|
||||
+{
|
||||
+ struct dmo_distortionfx *This = impl_from_IMediaObject(iface);
|
||||
+ FIXME("%p, %d, %p\n", This, index, pmt);
|
||||
+ return E_NOTIMPL;
|
||||
+}
|
||||
+
|
||||
+static HRESULT WINAPI distortionfx_mediaobj_GetInputSizeInfo(IMediaObject *iface, DWORD index, DWORD *size, DWORD *ahead, DWORD *alignment)
|
||||
+{
|
||||
+ struct dmo_distortionfx *This = impl_from_IMediaObject(iface);
|
||||
+ FIXME("%p, %d, %p, %p, %p\n", This, index, size, ahead, alignment);
|
||||
+ return E_NOTIMPL;
|
||||
+}
|
||||
+
|
||||
+static HRESULT WINAPI distortionfx_mediaobj_GetOutputSizeInfo(IMediaObject *iface, DWORD index, DWORD *size, DWORD *alignment)
|
||||
+{
|
||||
+ struct dmo_distortionfx *This = impl_from_IMediaObject(iface);
|
||||
+ FIXME("%p, %d, %p, %p\n", This, index, size, alignment);
|
||||
+ return E_NOTIMPL;
|
||||
+}
|
||||
+
|
||||
+static HRESULT WINAPI distortionfx_mediaobj_GetInputMaxLatency(IMediaObject *iface, DWORD index, REFERENCE_TIME *latency)
|
||||
+{
|
||||
+ struct dmo_distortionfx *This = impl_from_IMediaObject(iface);
|
||||
+ FIXME("%p, %d, %p\n", This, index, latency);
|
||||
+ return E_NOTIMPL;
|
||||
+}
|
||||
+
|
||||
+static HRESULT WINAPI distortionfx_mediaobj_SetInputMaxLatency(IMediaObject *iface, DWORD index, REFERENCE_TIME latency)
|
||||
+{
|
||||
+ struct dmo_distortionfx *This = impl_from_IMediaObject(iface);
|
||||
+ FIXME("%p, %d, %s\n", This, index, wine_dbgstr_longlong(latency));
|
||||
+ return E_NOTIMPL;
|
||||
+}
|
||||
+
|
||||
+static HRESULT WINAPI distortionfx_mediaobj_Flush(IMediaObject *iface)
|
||||
+{
|
||||
+ struct dmo_distortionfx *This = impl_from_IMediaObject(iface);
|
||||
+ FIXME("%p\n", This);
|
||||
+ return E_NOTIMPL;
|
||||
+}
|
||||
+
|
||||
+static HRESULT WINAPI distortionfx_mediaobj_Discontinuity(IMediaObject *iface, DWORD index)
|
||||
+{
|
||||
+ struct dmo_distortionfx *This = impl_from_IMediaObject(iface);
|
||||
+ FIXME("%p, %d\n", This, index);
|
||||
+ return E_NOTIMPL;
|
||||
+}
|
||||
+
|
||||
+static HRESULT WINAPI distortionfx_mediaobj_AllocateStreamingResources(IMediaObject *iface)
|
||||
+{
|
||||
+ struct dmo_distortionfx *This = impl_from_IMediaObject(iface);
|
||||
+ FIXME("%p\n", This);
|
||||
+ return E_NOTIMPL;
|
||||
+}
|
||||
+
|
||||
+static HRESULT WINAPI distortionfx_mediaobj_FreeStreamingResources(IMediaObject *iface)
|
||||
+{
|
||||
+ struct dmo_distortionfx *This = impl_from_IMediaObject(iface);
|
||||
+ FIXME("%p\n", This);
|
||||
+ return E_NOTIMPL;
|
||||
+}
|
||||
+
|
||||
+static HRESULT WINAPI distortionfx_mediaobj_GetInputStatus(IMediaObject *iface, DWORD index, DWORD *flags)
|
||||
+{
|
||||
+ struct dmo_distortionfx *This = impl_from_IMediaObject(iface);
|
||||
+ FIXME("%p, %d, %p\n", This, index, flags);
|
||||
+ return E_NOTIMPL;
|
||||
+}
|
||||
+
|
||||
+static HRESULT WINAPI distortionfx_mediaobj_ProcessInput(IMediaObject *iface, DWORD index, IMediaBuffer *buffer,
|
||||
+ DWORD flags, REFERENCE_TIME timestamp, REFERENCE_TIME length)
|
||||
+{
|
||||
+ struct dmo_distortionfx *This = impl_from_IMediaObject(iface);
|
||||
+ FIXME("%p, %d, %p, %x, %s, %s\n", This, index, buffer, flags, wine_dbgstr_longlong(timestamp), wine_dbgstr_longlong(length));
|
||||
+ return E_NOTIMPL;
|
||||
+}
|
||||
+
|
||||
+static HRESULT WINAPI distortionfx_mediaobj_ProcessOutput(IMediaObject *iface, DWORD flags, DWORD count,
|
||||
+ DMO_OUTPUT_DATA_BUFFER *buffers, DWORD *status)
|
||||
+{
|
||||
+ struct dmo_distortionfx *This = impl_from_IMediaObject(iface);
|
||||
+ FIXME("%p, %x, %d, %p, %p\n", This, flags, count, buffers, status);
|
||||
+ return E_NOTIMPL;
|
||||
+}
|
||||
+
|
||||
+static HRESULT WINAPI distortionfx_mediaobj_Lock(IMediaObject *iface, LONG lock)
|
||||
+{
|
||||
+ struct dmo_distortionfx *This = impl_from_IMediaObject(iface);
|
||||
+ FIXME("%p, %d\n", This, lock);
|
||||
+ return E_NOTIMPL;
|
||||
+}
|
||||
+
|
||||
+static const IMediaObjectVtbl distortionfx_mediaobjectVtbl =
|
||||
+{
|
||||
+ distortionfx_mediaobj_QueryInterface,
|
||||
+ distortionfx_mediaobj_AddRef,
|
||||
+ distortionfx_mediaobj_Release,
|
||||
+ distortionfx_mediaobj_GetStreamCount,
|
||||
+ distortionfx_mediaobj_GetInputStreamInfo,
|
||||
+ distortionfx_mediaobj_GetOutputStreamInfo,
|
||||
+ distortionfx_mediaobj_GetInputType,
|
||||
+ distortionfx_mediaobj_GetOutputType,
|
||||
+ distortionfx_mediaobj_SetInputType,
|
||||
+ distortionfx_mediaobj_SetOutputType,
|
||||
+ distortionfx_mediaobj_GetInputCurrentType,
|
||||
+ distortionfx_mediaobj_GetOutputCurrentType,
|
||||
+ distortionfx_mediaobj_GetInputSizeInfo,
|
||||
+ distortionfx_mediaobj_GetOutputSizeInfo,
|
||||
+ distortionfx_mediaobj_GetInputMaxLatency,
|
||||
+ distortionfx_mediaobj_SetInputMaxLatency,
|
||||
+ distortionfx_mediaobj_Flush,
|
||||
+ distortionfx_mediaobj_Discontinuity,
|
||||
+ distortionfx_mediaobj_AllocateStreamingResources,
|
||||
+ distortionfx_mediaobj_FreeStreamingResources,
|
||||
+ distortionfx_mediaobj_GetInputStatus,
|
||||
+ distortionfx_mediaobj_ProcessInput,
|
||||
+ distortionfx_mediaobj_ProcessOutput,
|
||||
+ distortionfx_mediaobj_Lock
|
||||
+};
|
||||
+
|
||||
+static HRESULT WINAPI distortionfx_mediainplace_QueryInterface(IMediaObjectInPlace *iface, REFIID riid, void **obj)
|
||||
+{
|
||||
+ struct dmo_distortionfx *This = impl_from_IMediaObjectInPlace(iface);
|
||||
+ return IDirectSoundFXDistortion_QueryInterface(&This->IDirectSoundFXDistortion_iface, riid, obj);
|
||||
+}
|
||||
+
|
||||
+static ULONG WINAPI distortionfx_mediainplace_AddRef(IMediaObjectInPlace *iface)
|
||||
+{
|
||||
+ struct dmo_distortionfx *This = impl_from_IMediaObjectInPlace(iface);
|
||||
+ return IDirectSoundFXDistortion_AddRef(&This->IDirectSoundFXDistortion_iface);
|
||||
+}
|
||||
+
|
||||
+static ULONG WINAPI distortionfx_mediainplace_Release(IMediaObjectInPlace *iface)
|
||||
+{
|
||||
+ struct dmo_distortionfx *This = impl_from_IMediaObjectInPlace(iface);
|
||||
+ return IDirectSoundFXDistortion_Release(&This->IDirectSoundFXDistortion_iface);
|
||||
+}
|
||||
+
|
||||
+static HRESULT WINAPI distortionfx_mediainplace_Process(IMediaObjectInPlace *iface, ULONG size, BYTE *data, REFERENCE_TIME start, DWORD flags)
|
||||
+{
|
||||
+ struct dmo_distortionfx *This = impl_from_IMediaObjectInPlace(iface);
|
||||
+ static BOOL once = 0;
|
||||
+ if(!once++)
|
||||
+ FIXME("%p, %d, %p, %s, %x\n", This, size, data, wine_dbgstr_longlong(start), flags);
|
||||
+ else
|
||||
+ TRACE("%p, %d, %p, %s, %x\n", This, size, data, wine_dbgstr_longlong(start), flags);
|
||||
+ return E_NOTIMPL;
|
||||
+}
|
||||
+
|
||||
+static HRESULT WINAPI distortionfx_mediainplace_Clone(IMediaObjectInPlace *iface, IMediaObjectInPlace **object)
|
||||
+{
|
||||
+ struct dmo_distortionfx *This = impl_from_IMediaObjectInPlace(iface);
|
||||
+ FIXME("%p, %p\n", This, object);
|
||||
+ return E_NOTIMPL;
|
||||
+}
|
||||
+
|
||||
+static HRESULT WINAPI distortionfx_mediainplace_GetLatency(IMediaObjectInPlace *iface, REFERENCE_TIME *latency)
|
||||
+{
|
||||
+ struct dmo_distortionfx *This = impl_from_IMediaObjectInPlace(iface);
|
||||
+ FIXME("%p, %p\n", This, latency);
|
||||
+ return E_NOTIMPL;
|
||||
+}
|
||||
+
|
||||
+static const IMediaObjectInPlaceVtbl distortionfx_mediainplaceVtbl =
|
||||
+{
|
||||
+ distortionfx_mediainplace_QueryInterface,
|
||||
+ distortionfx_mediainplace_AddRef,
|
||||
+ distortionfx_mediainplace_Release,
|
||||
+ distortionfx_mediainplace_Process,
|
||||
+ distortionfx_mediainplace_Clone,
|
||||
+ distortionfx_mediainplace_GetLatency
|
||||
+};
|
||||
+
|
||||
+static HRESULT WINAPI distortionfx_QueryInterface(IDirectSoundFXDistortion *iface, REFIID riid, void **ppv)
|
||||
+{
|
||||
+ struct dmo_distortionfx *This = impl_from_IDirectSoundFXDistortion(iface);
|
||||
+
|
||||
+ TRACE("(%p)->(%s %p)\n", This, debugstr_guid(riid), ppv);
|
||||
+
|
||||
+ if (IsEqualGUID(riid, &IID_IUnknown) ||
|
||||
+ IsEqualGUID(riid, &IID_IDirectSoundFXDistortion))
|
||||
+ {
|
||||
+ *ppv = &This->IDirectSoundFXDistortion_iface;
|
||||
+ }
|
||||
+ else if(IsEqualGUID(riid, &IID_IMediaObject))
|
||||
+ {
|
||||
+ *ppv = &This->IMediaObject_iface;
|
||||
+ }
|
||||
+ else if(IsEqualGUID(riid, &IID_IMediaObjectInPlace))
|
||||
+ {
|
||||
+ *ppv = &This->IMediaObjectInPlace_iface;
|
||||
+ }
|
||||
+
|
||||
+ if(!*ppv)
|
||||
+ {
|
||||
+ FIXME("(%p)->(%s,%p),not found\n", This, debugstr_guid(riid), ppv);
|
||||
+ return E_NOINTERFACE;
|
||||
+ }
|
||||
+
|
||||
+ IUnknown_AddRef((IUnknown*)*ppv);
|
||||
+
|
||||
+ return S_OK;
|
||||
+}
|
||||
+
|
||||
+static ULONG WINAPI distortionfx_AddRef(IDirectSoundFXDistortion *iface)
|
||||
+{
|
||||
+ struct dmo_distortionfx *This = impl_from_IDirectSoundFXDistortion(iface);
|
||||
+ ULONG ref = InterlockedIncrement(&This->ref);
|
||||
+
|
||||
+ TRACE("(%p) ref=%u\n", This, ref);
|
||||
+
|
||||
+ return ref;
|
||||
+}
|
||||
+
|
||||
+static ULONG WINAPI distortionfx_Release(IDirectSoundFXDistortion *iface)
|
||||
+{
|
||||
+ struct dmo_distortionfx *This = impl_from_IDirectSoundFXDistortion(iface);
|
||||
+ ULONG ref = InterlockedDecrement(&This->ref);
|
||||
+
|
||||
+ TRACE("(%p) ref=%u\n", This, ref);
|
||||
+
|
||||
+ if (!ref)
|
||||
+ {
|
||||
+ heap_free(This);
|
||||
+ }
|
||||
+ return ref;
|
||||
+}
|
||||
+
|
||||
+static HRESULT WINAPI distortionfx_SetAllParameters(IDirectSoundFXDistortion *iface, const DSFXDistortion *distortion)
|
||||
+{
|
||||
+ struct dmo_distortionfx *This = impl_from_IDirectSoundFXDistortion(iface);
|
||||
+ FIXME("(%p) %p\n", This, distortion);
|
||||
+
|
||||
+ return E_NOTIMPL;
|
||||
+}
|
||||
+
|
||||
+static HRESULT WINAPI distortionfx_GetAllParameters(IDirectSoundFXDistortion *iface, DSFXDistortion *distortion)
|
||||
+{
|
||||
+ struct dmo_distortionfx *This = impl_from_IDirectSoundFXDistortion(iface);
|
||||
+ FIXME("(%p) %p\n", This, distortion);
|
||||
+
|
||||
+ return E_NOTIMPL;
|
||||
+}
|
||||
+
|
||||
+static const struct IDirectSoundFXDistortionVtbl distortionfxVtbl =
|
||||
+{
|
||||
+ distortionfx_QueryInterface,
|
||||
+ distortionfx_AddRef,
|
||||
+ distortionfx_Release,
|
||||
+ distortionfx_SetAllParameters,
|
||||
+ distortionfx_GetAllParameters
|
||||
+};
|
||||
+
|
||||
+HRESULT WINAPI DistortionFactory_CreateInstance(IClassFactory *iface, IUnknown *outer, REFIID riid, void **ppv)
|
||||
+{
|
||||
+ struct dmo_distortionfx *object;
|
||||
+ HRESULT ret;
|
||||
+
|
||||
+ TRACE("(%p, %s, %p)\n", outer, debugstr_guid(riid), ppv);
|
||||
+
|
||||
+ *ppv = NULL;
|
||||
+
|
||||
+ object = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(*object));
|
||||
+ if (!object)
|
||||
+ return E_OUTOFMEMORY;
|
||||
+
|
||||
+ object->IDirectSoundFXDistortion_iface.lpVtbl = &distortionfxVtbl;
|
||||
+ object->IMediaObject_iface.lpVtbl = &distortionfx_mediaobjectVtbl;
|
||||
+ object->IMediaObjectInPlace_iface.lpVtbl = &distortionfx_mediainplaceVtbl;
|
||||
+ object->ref = 1;
|
||||
+
|
||||
+ ret = distortionfx_QueryInterface(&object->IDirectSoundFXDistortion_iface, riid, ppv);
|
||||
+ distortionfx_Release(&object->IDirectSoundFXDistortion_iface);
|
||||
+
|
||||
+ return ret;
|
||||
+}
|
||||
diff --git a/dlls/dsdmo/dsdmo_classes.idl b/dlls/dsdmo/dsdmo_classes.idl
|
||||
index f7f139de30..8060d4c2af 100644
|
||||
--- a/dlls/dsdmo/dsdmo_classes.idl
|
||||
+++ b/dlls/dsdmo/dsdmo_classes.idl
|
||||
@@ -46,3 +46,13 @@ coclass DirectSoundChorusDMO
|
||||
coclass DirectSoundCompressorDMO
|
||||
{
|
||||
}
|
||||
+
|
||||
+[
|
||||
+ uuid(ef114c90-cd1d-484e-96e5-09cfaf912a21),
|
||||
+ threading(both),
|
||||
+ progid("Microsoft.DirectSoundDistortionDMO.1"),
|
||||
+ vi_progid("Microsoft.DirectSoundDistortionDMO")
|
||||
+]
|
||||
+coclass DirectSoundDistortionDMO
|
||||
+{
|
||||
+}
|
||||
diff --git a/dlls/dsdmo/dsdmo_private.h b/dlls/dsdmo/dsdmo_private.h
|
||||
index 96c0c061ee..03186366c6 100644
|
||||
--- a/dlls/dsdmo/dsdmo_private.h
|
||||
+++ b/dlls/dsdmo/dsdmo_private.h
|
||||
@@ -30,5 +30,6 @@
|
||||
extern HRESULT WINAPI EchoFactory_CreateInstance(IClassFactory *iface, IUnknown *outer, REFIID riid, void **ppv) DECLSPEC_HIDDEN;
|
||||
extern HRESULT WINAPI ChrousFactory_CreateInstance(IClassFactory *iface, IUnknown *outer, REFIID riid, void **ppv) DECLSPEC_HIDDEN;
|
||||
extern HRESULT WINAPI CompressorFactory_CreateInstance(IClassFactory *iface, IUnknown *outer, REFIID riid, void **ppv) DECLSPEC_HIDDEN;
|
||||
+extern HRESULT WINAPI DistortionFactory_CreateInstance(IClassFactory *iface, IUnknown *outer, REFIID riid, void **ppv) DECLSPEC_HIDDEN;
|
||||
|
||||
#endif
|
||||
diff --git a/dlls/dsdmo/main.c b/dlls/dsdmo/main.c
|
||||
index 539626973d..a7671a5095 100644
|
||||
--- a/dlls/dsdmo/main.c
|
||||
+++ b/dlls/dsdmo/main.c
|
||||
@@ -107,9 +107,18 @@ static const IClassFactoryVtbl CompressorFactoryVtbl = {
|
||||
ClassFactory_LockServer
|
||||
};
|
||||
|
||||
+static const IClassFactoryVtbl DistortionFactoryVtbl = {
|
||||
+ ClassFactory_QueryInterface,
|
||||
+ ClassFactory_AddRef,
|
||||
+ ClassFactory_Release,
|
||||
+ DistortionFactory_CreateInstance,
|
||||
+ ClassFactory_LockServer
|
||||
+};
|
||||
+
|
||||
static IClassFactory echofx_factory = { &EchoFactoryVtbl };
|
||||
static IClassFactory chorusfx_factory = { &ChrousFactoryVtbl };
|
||||
static IClassFactory compressorfx_factory = { &CompressorFactoryVtbl };
|
||||
+static IClassFactory distortionfx_factory = { &DistortionFactoryVtbl };
|
||||
|
||||
/***********************************************************************
|
||||
* DllGetClassObject
|
||||
@@ -133,6 +142,11 @@ HRESULT WINAPI DllGetClassObject(REFCLSID rclsid, REFIID riid, LPVOID *ppv)
|
||||
TRACE("GUID_DSFX_STANDARD_COMPRESSOR\n");
|
||||
return IClassFactory_QueryInterface(&compressorfx_factory, riid, ppv);
|
||||
}
|
||||
+ else if(IsEqualGUID(&GUID_DSFX_STANDARD_DISTORTION, rclsid))
|
||||
+ {
|
||||
+ TRACE("GUID_DSFX_STANDARD_DISTORTION\n");
|
||||
+ return IClassFactory_QueryInterface(&distortionfx_factory, riid, ppv);
|
||||
+ }
|
||||
|
||||
FIXME("%s %s %p\n", debugstr_guid(rclsid), debugstr_guid(riid), ppv);
|
||||
return CLASS_E_CLASSNOTAVAILABLE;
|
||||
--
|
||||
2.17.1
|
||||
|
@@ -1,497 +0,0 @@
|
||||
From aa9c0ccf2a014880c1bf469bf349d8d0e0eba83b Mon Sep 17 00:00:00 2001
|
||||
From: Alistair Leslie-Hughes <leslie_alistair@hotmail.com>
|
||||
Date: Sun, 25 Aug 2019 16:51:33 +1000
|
||||
Subject: [PATCH] dsdmo: Add IDirectSoundFXFlanger support
|
||||
|
||||
---
|
||||
dlls/dsdmo/Makefile.in | 1 +
|
||||
dlls/dsdmo/dsdmo_classes.idl | 10 +
|
||||
dlls/dsdmo/dsdmo_private.h | 1 +
|
||||
dlls/dsdmo/flanger.c | 397 +++++++++++++++++++++++++++++++++++
|
||||
dlls/dsdmo/main.c | 14 ++
|
||||
5 files changed, 423 insertions(+)
|
||||
create mode 100644 dlls/dsdmo/flanger.c
|
||||
|
||||
diff --git a/dlls/dsdmo/Makefile.in b/dlls/dsdmo/Makefile.in
|
||||
index 0a1efa0462c..2c4a0eabbd9 100644
|
||||
--- a/dlls/dsdmo/Makefile.in
|
||||
+++ b/dlls/dsdmo/Makefile.in
|
||||
@@ -7,6 +7,7 @@ C_SRCS = \
|
||||
compressor.c \
|
||||
distortion.c \
|
||||
echo.c \
|
||||
+ flanger.c \
|
||||
main.c
|
||||
|
||||
IDL_SRCS = dsdmo_classes.idl
|
||||
diff --git a/dlls/dsdmo/dsdmo_classes.idl b/dlls/dsdmo/dsdmo_classes.idl
|
||||
index 8060d4c2af3..48d1f96e888 100644
|
||||
--- a/dlls/dsdmo/dsdmo_classes.idl
|
||||
+++ b/dlls/dsdmo/dsdmo_classes.idl
|
||||
@@ -56,3 +56,13 @@ coclass DirectSoundCompressorDMO
|
||||
coclass DirectSoundDistortionDMO
|
||||
{
|
||||
}
|
||||
+
|
||||
+[
|
||||
+ uuid(efca3d92-dfd8-4672-a603-7420894bad98),
|
||||
+ threading(both),
|
||||
+ progid("Microsoft.DirectSoundFlangerDMO.1"),
|
||||
+ vi_progid("Microsoft.DirectSoundFlangerDMO")
|
||||
+]
|
||||
+coclass DirectSoundFlangerDMO
|
||||
+{
|
||||
+}
|
||||
diff --git a/dlls/dsdmo/dsdmo_private.h b/dlls/dsdmo/dsdmo_private.h
|
||||
index 03186366c64..027fb6e177f 100644
|
||||
--- a/dlls/dsdmo/dsdmo_private.h
|
||||
+++ b/dlls/dsdmo/dsdmo_private.h
|
||||
@@ -31,5 +31,6 @@ extern HRESULT WINAPI EchoFactory_CreateInstance(IClassFactory *iface, IUnknown
|
||||
extern HRESULT WINAPI ChrousFactory_CreateInstance(IClassFactory *iface, IUnknown *outer, REFIID riid, void **ppv) DECLSPEC_HIDDEN;
|
||||
extern HRESULT WINAPI CompressorFactory_CreateInstance(IClassFactory *iface, IUnknown *outer, REFIID riid, void **ppv) DECLSPEC_HIDDEN;
|
||||
extern HRESULT WINAPI DistortionFactory_CreateInstance(IClassFactory *iface, IUnknown *outer, REFIID riid, void **ppv) DECLSPEC_HIDDEN;
|
||||
+extern HRESULT WINAPI FlangerFactory_CreateInstance(IClassFactory *iface, IUnknown *outer, REFIID riid, void **ppv) DECLSPEC_HIDDEN;
|
||||
|
||||
#endif
|
||||
diff --git a/dlls/dsdmo/flanger.c b/dlls/dsdmo/flanger.c
|
||||
new file mode 100644
|
||||
index 00000000000..ea70bc929ba
|
||||
--- /dev/null
|
||||
+++ b/dlls/dsdmo/flanger.c
|
||||
@@ -0,0 +1,397 @@
|
||||
+/*
|
||||
+ * Copyright 2019 Alistair Leslie-Hughes
|
||||
+ *
|
||||
+ * This library is free software; you can redistribute it and/or
|
||||
+ * modify it under the terms of the GNU Lesser General Public
|
||||
+ * License as published by the Free Software Foundation; either
|
||||
+ * version 2.1 of the License, or (at your option) any later version.
|
||||
+ *
|
||||
+ * This library is distributed in the hope that it will be useful,
|
||||
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
+ * Lesser General Public License for more details.
|
||||
+ *
|
||||
+ * You should have received a copy of the GNU Lesser General Public
|
||||
+ * License along with this library; if not, write to the Free Software
|
||||
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
|
||||
+ */
|
||||
+#define COBJMACROS
|
||||
+
|
||||
+#include "dsdmo_private.h"
|
||||
+
|
||||
+WINE_DEFAULT_DEBUG_CHANNEL(dsdmo);
|
||||
+
|
||||
+struct dmo_flangerfx
|
||||
+{
|
||||
+ IDirectSoundFXFlanger IDirectSoundFXFlanger_iface;
|
||||
+ IMediaObject IMediaObject_iface;
|
||||
+ IMediaObjectInPlace IMediaObjectInPlace_iface;
|
||||
+ LONG ref;
|
||||
+};
|
||||
+
|
||||
+static inline struct dmo_flangerfx *impl_from_IDirectSoundFXFlanger(IDirectSoundFXFlanger *iface)
|
||||
+{
|
||||
+ return CONTAINING_RECORD(iface, struct dmo_flangerfx, IDirectSoundFXFlanger_iface);
|
||||
+}
|
||||
+
|
||||
+static inline struct dmo_flangerfx *impl_from_IMediaObject(IMediaObject *iface)
|
||||
+{
|
||||
+ return CONTAINING_RECORD(iface, struct dmo_flangerfx, IMediaObject_iface);
|
||||
+}
|
||||
+
|
||||
+static inline struct dmo_flangerfx *impl_from_IMediaObjectInPlace(IMediaObjectInPlace *iface)
|
||||
+{
|
||||
+ return CONTAINING_RECORD(iface, struct dmo_flangerfx, IMediaObjectInPlace_iface);
|
||||
+}
|
||||
+
|
||||
+static HRESULT WINAPI flanger_mediaobj_QueryInterface(IMediaObject *iface, REFIID riid, void **obj)
|
||||
+{
|
||||
+ struct dmo_flangerfx *This = impl_from_IMediaObject(iface);
|
||||
+ return IDirectSoundFXFlanger_QueryInterface(&This->IDirectSoundFXFlanger_iface, riid, obj);
|
||||
+}
|
||||
+
|
||||
+static ULONG WINAPI flanger_mediaobj_AddRef(IMediaObject *iface)
|
||||
+{
|
||||
+ struct dmo_flangerfx *This = impl_from_IMediaObject(iface);
|
||||
+ return IDirectSoundFXFlanger_AddRef(&This->IDirectSoundFXFlanger_iface);
|
||||
+}
|
||||
+
|
||||
+static ULONG WINAPI flanger_mediaobj_Release(IMediaObject *iface)
|
||||
+{
|
||||
+ struct dmo_flangerfx *This = impl_from_IMediaObject(iface);
|
||||
+ return IDirectSoundFXFlanger_Release(&This->IDirectSoundFXFlanger_iface);
|
||||
+}
|
||||
+
|
||||
+static HRESULT WINAPI flanger_mediaobj_GetStreamCount(IMediaObject *iface, DWORD *inputs, DWORD *outputs)
|
||||
+{
|
||||
+ struct dmo_flangerfx *This = impl_from_IMediaObject(iface);
|
||||
+ FIXME("%p, %p, %p\n", This, inputs, outputs);
|
||||
+ return E_NOTIMPL;
|
||||
+}
|
||||
+
|
||||
+static HRESULT WINAPI flanger_mediaobj_GetInputStreamInfo(IMediaObject *iface, DWORD index, DWORD *flags)
|
||||
+{
|
||||
+ struct dmo_flangerfx *This = impl_from_IMediaObject(iface);
|
||||
+ FIXME("%p, %d, %p\n", This, index, flags);
|
||||
+ return E_NOTIMPL;
|
||||
+}
|
||||
+
|
||||
+static HRESULT WINAPI flanger_mediaobj_GetOutputStreamInfo(IMediaObject *iface, DWORD index, DWORD *flags)
|
||||
+{
|
||||
+ struct dmo_flangerfx *This = impl_from_IMediaObject(iface);
|
||||
+ FIXME("%p, %d, %p\n", This, index, flags);
|
||||
+ return E_NOTIMPL;
|
||||
+}
|
||||
+
|
||||
+static HRESULT WINAPI flanger_mediaobj_GetInputType(IMediaObject *iface, DWORD index, DWORD type, DMO_MEDIA_TYPE *pmt)
|
||||
+{
|
||||
+ struct dmo_flangerfx *This = impl_from_IMediaObject(iface);
|
||||
+ FIXME("%p, %d, %d, %p\n", This, index, type, pmt);
|
||||
+ return E_NOTIMPL;
|
||||
+}
|
||||
+
|
||||
+static HRESULT WINAPI flanger_mediaobj_GetOutputType(IMediaObject *iface, DWORD index, DWORD type, DMO_MEDIA_TYPE *pmt)
|
||||
+{
|
||||
+ struct dmo_flangerfx *This = impl_from_IMediaObject(iface);
|
||||
+ FIXME("%p, %d, %d, %p\n", This, index, type, pmt);
|
||||
+ return E_NOTIMPL;
|
||||
+}
|
||||
+
|
||||
+static HRESULT WINAPI flanger_mediaobj_SetInputType(IMediaObject *iface, DWORD index, const DMO_MEDIA_TYPE *pmt, DWORD flags)
|
||||
+{
|
||||
+ struct dmo_flangerfx *This = impl_from_IMediaObject(iface);
|
||||
+ FIXME("%p, %d, %p, %x\n", This, index, pmt, flags);
|
||||
+ return S_OK;
|
||||
+}
|
||||
+
|
||||
+static HRESULT WINAPI flanger_mediaobj_SetOutputType(IMediaObject *iface, DWORD index, const DMO_MEDIA_TYPE *pmt, DWORD flags)
|
||||
+{
|
||||
+ struct dmo_flangerfx *This = impl_from_IMediaObject(iface);
|
||||
+ FIXME("%p, %d, %p, %x\n", This, index, pmt, flags);
|
||||
+ return S_OK;
|
||||
+}
|
||||
+
|
||||
+static HRESULT WINAPI flanger_mediaobj_GetInputCurrentType(IMediaObject *iface, DWORD index, DMO_MEDIA_TYPE *pmt)
|
||||
+{
|
||||
+ struct dmo_flangerfx *This = impl_from_IMediaObject(iface);
|
||||
+ FIXME("%p, %d, %p\n", This, index, pmt);
|
||||
+ return E_NOTIMPL;
|
||||
+}
|
||||
+
|
||||
+static HRESULT WINAPI flanger_mediaobj_GetOutputCurrentType(IMediaObject *iface, DWORD index, DMO_MEDIA_TYPE *pmt)
|
||||
+{
|
||||
+ struct dmo_flangerfx *This = impl_from_IMediaObject(iface);
|
||||
+ FIXME("%p, %d, %p\n", This, index, pmt);
|
||||
+ return E_NOTIMPL;
|
||||
+}
|
||||
+
|
||||
+static HRESULT WINAPI flanger_mediaobj_GetInputSizeInfo(IMediaObject *iface, DWORD index, DWORD *size, DWORD *ahead, DWORD *alignment)
|
||||
+{
|
||||
+ struct dmo_flangerfx *This = impl_from_IMediaObject(iface);
|
||||
+ FIXME("%p, %d, %p, %p, %p\n", This, index, size, ahead, alignment);
|
||||
+ return E_NOTIMPL;
|
||||
+}
|
||||
+
|
||||
+static HRESULT WINAPI flanger_mediaobj_GetOutputSizeInfo(IMediaObject *iface, DWORD index, DWORD *size, DWORD *alignment)
|
||||
+{
|
||||
+ struct dmo_flangerfx *This = impl_from_IMediaObject(iface);
|
||||
+ FIXME("%p, %d, %p, %p\n", This, index, size, alignment);
|
||||
+ return E_NOTIMPL;
|
||||
+}
|
||||
+
|
||||
+static HRESULT WINAPI flanger_mediaobj_GetInputMaxLatency(IMediaObject *iface, DWORD index, REFERENCE_TIME *latency)
|
||||
+{
|
||||
+ struct dmo_flangerfx *This = impl_from_IMediaObject(iface);
|
||||
+ FIXME("%p, %d, %p\n", This, index, latency);
|
||||
+ return E_NOTIMPL;
|
||||
+}
|
||||
+
|
||||
+static HRESULT WINAPI flanger_mediaobj_SetInputMaxLatency(IMediaObject *iface, DWORD index, REFERENCE_TIME latency)
|
||||
+{
|
||||
+ struct dmo_flangerfx *This = impl_from_IMediaObject(iface);
|
||||
+ FIXME("%p, %d, %s\n", This, index, wine_dbgstr_longlong(latency));
|
||||
+ return E_NOTIMPL;
|
||||
+}
|
||||
+
|
||||
+static HRESULT WINAPI flanger_mediaobj_Flush(IMediaObject *iface)
|
||||
+{
|
||||
+ struct dmo_flangerfx *This = impl_from_IMediaObject(iface);
|
||||
+ FIXME("%p\n", This);
|
||||
+ return E_NOTIMPL;
|
||||
+}
|
||||
+
|
||||
+static HRESULT WINAPI flanger_mediaobj_Discontinuity(IMediaObject *iface, DWORD index)
|
||||
+{
|
||||
+ struct dmo_flangerfx *This = impl_from_IMediaObject(iface);
|
||||
+ FIXME("%p, %d\n", This, index);
|
||||
+ return E_NOTIMPL;
|
||||
+}
|
||||
+
|
||||
+static HRESULT WINAPI flanger_mediaobj_AllocateStreamingResources(IMediaObject *iface)
|
||||
+{
|
||||
+ struct dmo_flangerfx *This = impl_from_IMediaObject(iface);
|
||||
+ FIXME("%p\n", This);
|
||||
+ return E_NOTIMPL;
|
||||
+}
|
||||
+
|
||||
+static HRESULT WINAPI flanger_mediaobj_FreeStreamingResources(IMediaObject *iface)
|
||||
+{
|
||||
+ struct dmo_flangerfx *This = impl_from_IMediaObject(iface);
|
||||
+ FIXME("%p\n", This);
|
||||
+ return E_NOTIMPL;
|
||||
+}
|
||||
+
|
||||
+static HRESULT WINAPI flanger_mediaobj_GetInputStatus(IMediaObject *iface, DWORD index, DWORD *flags)
|
||||
+{
|
||||
+ struct dmo_flangerfx *This = impl_from_IMediaObject(iface);
|
||||
+ FIXME("%p, %d, %p\n", This, index, flags);
|
||||
+ return E_NOTIMPL;
|
||||
+}
|
||||
+
|
||||
+static HRESULT WINAPI flanger_mediaobj_ProcessInput(IMediaObject *iface, DWORD index, IMediaBuffer *buffer,
|
||||
+ DWORD flags, REFERENCE_TIME timestamp, REFERENCE_TIME length)
|
||||
+{
|
||||
+ struct dmo_flangerfx *This = impl_from_IMediaObject(iface);
|
||||
+ FIXME("%p, %d, %p, %x, %s, %s\n", This, index, buffer, flags, wine_dbgstr_longlong(timestamp), wine_dbgstr_longlong(length));
|
||||
+ return E_NOTIMPL;
|
||||
+}
|
||||
+
|
||||
+static HRESULT WINAPI flanger_mediaobj_ProcessOutput(IMediaObject *iface, DWORD flags, DWORD count,
|
||||
+ DMO_OUTPUT_DATA_BUFFER *buffers, DWORD *status)
|
||||
+{
|
||||
+ struct dmo_flangerfx *This = impl_from_IMediaObject(iface);
|
||||
+ FIXME("%p, %x, %d, %p, %p\n", This, flags, count, buffers, status);
|
||||
+ return E_NOTIMPL;
|
||||
+}
|
||||
+
|
||||
+static HRESULT WINAPI flanger_mediaobj_Lock(IMediaObject *iface, LONG lock)
|
||||
+{
|
||||
+ struct dmo_flangerfx *This = impl_from_IMediaObject(iface);
|
||||
+ FIXME("%p, %d\n", This, lock);
|
||||
+ return E_NOTIMPL;
|
||||
+}
|
||||
+
|
||||
+static const IMediaObjectVtbl flanger_mediaobjectVtbl =
|
||||
+{
|
||||
+ flanger_mediaobj_QueryInterface,
|
||||
+ flanger_mediaobj_AddRef,
|
||||
+ flanger_mediaobj_Release,
|
||||
+ flanger_mediaobj_GetStreamCount,
|
||||
+ flanger_mediaobj_GetInputStreamInfo,
|
||||
+ flanger_mediaobj_GetOutputStreamInfo,
|
||||
+ flanger_mediaobj_GetInputType,
|
||||
+ flanger_mediaobj_GetOutputType,
|
||||
+ flanger_mediaobj_SetInputType,
|
||||
+ flanger_mediaobj_SetOutputType,
|
||||
+ flanger_mediaobj_GetInputCurrentType,
|
||||
+ flanger_mediaobj_GetOutputCurrentType,
|
||||
+ flanger_mediaobj_GetInputSizeInfo,
|
||||
+ flanger_mediaobj_GetOutputSizeInfo,
|
||||
+ flanger_mediaobj_GetInputMaxLatency,
|
||||
+ flanger_mediaobj_SetInputMaxLatency,
|
||||
+ flanger_mediaobj_Flush,
|
||||
+ flanger_mediaobj_Discontinuity,
|
||||
+ flanger_mediaobj_AllocateStreamingResources,
|
||||
+ flanger_mediaobj_FreeStreamingResources,
|
||||
+ flanger_mediaobj_GetInputStatus,
|
||||
+ flanger_mediaobj_ProcessInput,
|
||||
+ flanger_mediaobj_ProcessOutput,
|
||||
+ flanger_mediaobj_Lock
|
||||
+};
|
||||
+
|
||||
+static HRESULT WINAPI flanger_mediainplace_QueryInterface(IMediaObjectInPlace *iface, REFIID riid, void **obj)
|
||||
+{
|
||||
+ struct dmo_flangerfx *This = impl_from_IMediaObjectInPlace(iface);
|
||||
+ return IDirectSoundFXFlanger_QueryInterface(&This->IDirectSoundFXFlanger_iface, riid, obj);
|
||||
+}
|
||||
+
|
||||
+static ULONG WINAPI flanger_mediainplace_AddRef(IMediaObjectInPlace *iface)
|
||||
+{
|
||||
+ struct dmo_flangerfx *This = impl_from_IMediaObjectInPlace(iface);
|
||||
+ return IDirectSoundFXFlanger_AddRef(&This->IDirectSoundFXFlanger_iface);
|
||||
+}
|
||||
+
|
||||
+static ULONG WINAPI flanger_mediainplace_Release(IMediaObjectInPlace *iface)
|
||||
+{
|
||||
+ struct dmo_flangerfx *This = impl_from_IMediaObjectInPlace(iface);
|
||||
+ return IDirectSoundFXFlanger_Release(&This->IDirectSoundFXFlanger_iface);
|
||||
+}
|
||||
+
|
||||
+static HRESULT WINAPI flanger_mediainplace_Process(IMediaObjectInPlace *iface, ULONG size, BYTE *data, REFERENCE_TIME start, DWORD flags)
|
||||
+{
|
||||
+ struct dmo_flangerfx *This = impl_from_IMediaObjectInPlace(iface);
|
||||
+ static BOOL once = 0;
|
||||
+ if(!once++)
|
||||
+ FIXME("%p, %d, %p, %s, %x\n", This, size, data, wine_dbgstr_longlong(start), flags);
|
||||
+ else
|
||||
+ TRACE("%p, %d, %p, %s, %x\n", This, size, data, wine_dbgstr_longlong(start), flags);
|
||||
+ return E_NOTIMPL;
|
||||
+}
|
||||
+
|
||||
+static HRESULT WINAPI flanger_mediainplace_Clone(IMediaObjectInPlace *iface, IMediaObjectInPlace **object)
|
||||
+{
|
||||
+ struct dmo_flangerfx *This = impl_from_IMediaObjectInPlace(iface);
|
||||
+ FIXME("%p, %p\n", This, object);
|
||||
+ return E_NOTIMPL;
|
||||
+}
|
||||
+
|
||||
+static HRESULT WINAPI flanger_mediainplace_GetLatency(IMediaObjectInPlace *iface, REFERENCE_TIME *latency)
|
||||
+{
|
||||
+ struct dmo_flangerfx *This = impl_from_IMediaObjectInPlace(iface);
|
||||
+ FIXME("%p, %p\n", This, latency);
|
||||
+ return E_NOTIMPL;
|
||||
+}
|
||||
+
|
||||
+static const IMediaObjectInPlaceVtbl flanger_mediainplaceVtbl =
|
||||
+{
|
||||
+ flanger_mediainplace_QueryInterface,
|
||||
+ flanger_mediainplace_AddRef,
|
||||
+ flanger_mediainplace_Release,
|
||||
+ flanger_mediainplace_Process,
|
||||
+ flanger_mediainplace_Clone,
|
||||
+ flanger_mediainplace_GetLatency
|
||||
+};
|
||||
+
|
||||
+static HRESULT WINAPI flangerfx_QueryInterface(IDirectSoundFXFlanger *iface, REFIID riid, void **ppv)
|
||||
+{
|
||||
+ struct dmo_flangerfx *This = impl_from_IDirectSoundFXFlanger(iface);
|
||||
+
|
||||
+ TRACE("(%p)->(%s %p)\n", This, debugstr_guid(riid), ppv);
|
||||
+
|
||||
+ if (IsEqualGUID(riid, &IID_IUnknown) ||
|
||||
+ IsEqualGUID(riid, &IID_IDirectSoundFXFlanger))
|
||||
+ {
|
||||
+ *ppv = &This->IDirectSoundFXFlanger_iface;
|
||||
+ }
|
||||
+ else if(IsEqualGUID(riid, &IID_IMediaObject))
|
||||
+ {
|
||||
+ *ppv = &This->IMediaObject_iface;
|
||||
+ }
|
||||
+ else if(IsEqualGUID(riid, &IID_IMediaObjectInPlace))
|
||||
+ {
|
||||
+ *ppv = &This->IMediaObjectInPlace_iface;
|
||||
+ }
|
||||
+
|
||||
+ if(!*ppv)
|
||||
+ {
|
||||
+ FIXME("(%p)->(%s,%p),not found\n", This, debugstr_guid(riid), ppv);
|
||||
+ return E_NOINTERFACE;
|
||||
+ }
|
||||
+
|
||||
+ IUnknown_AddRef((IUnknown*)*ppv);
|
||||
+
|
||||
+ return S_OK;
|
||||
+}
|
||||
+
|
||||
+static ULONG WINAPI flangerfx_AddRef(IDirectSoundFXFlanger *iface)
|
||||
+{
|
||||
+ struct dmo_flangerfx *This = impl_from_IDirectSoundFXFlanger(iface);
|
||||
+ ULONG ref = InterlockedIncrement(&This->ref);
|
||||
+
|
||||
+ TRACE("(%p) ref=%u\n", This, ref);
|
||||
+
|
||||
+ return ref;
|
||||
+}
|
||||
+
|
||||
+static ULONG WINAPI flangerfx_Release(IDirectSoundFXFlanger *iface)
|
||||
+{
|
||||
+ struct dmo_flangerfx *This = impl_from_IDirectSoundFXFlanger(iface);
|
||||
+ ULONG ref = InterlockedDecrement(&This->ref);
|
||||
+
|
||||
+ TRACE("(%p) ref=%u\n", This, ref);
|
||||
+
|
||||
+ if (!ref)
|
||||
+ {
|
||||
+ heap_free(This);
|
||||
+ }
|
||||
+ return ref;
|
||||
+}
|
||||
+
|
||||
+static HRESULT WINAPI flangerfx_SetAllParameters(IDirectSoundFXFlanger *iface, const DSFXFlanger *flanger)
|
||||
+{
|
||||
+ struct dmo_flangerfx *This = impl_from_IDirectSoundFXFlanger(iface);
|
||||
+ FIXME("(%p) %p\n", This, flanger);
|
||||
+
|
||||
+ return E_NOTIMPL;
|
||||
+}
|
||||
+
|
||||
+static HRESULT WINAPI flangerfx_GetAllParameters(IDirectSoundFXFlanger *iface, DSFXFlanger *flanger)
|
||||
+{
|
||||
+ struct dmo_flangerfx *This = impl_from_IDirectSoundFXFlanger(iface);
|
||||
+ FIXME("(%p) %p\n", This, flanger);
|
||||
+
|
||||
+ return E_NOTIMPL;
|
||||
+}
|
||||
+
|
||||
+static const struct IDirectSoundFXFlangerVtbl flangerfxVtbl =
|
||||
+{
|
||||
+ flangerfx_QueryInterface,
|
||||
+ flangerfx_AddRef,
|
||||
+ flangerfx_Release,
|
||||
+ flangerfx_SetAllParameters,
|
||||
+ flangerfx_GetAllParameters
|
||||
+};
|
||||
+
|
||||
+HRESULT WINAPI FlangerFactory_CreateInstance(IClassFactory *iface, IUnknown *outer, REFIID riid, void **ppv)
|
||||
+{
|
||||
+ struct dmo_flangerfx *object;
|
||||
+ HRESULT ret;
|
||||
+
|
||||
+ TRACE("(%p, %s, %p)\n", outer, debugstr_guid(riid), ppv);
|
||||
+
|
||||
+ *ppv = NULL;
|
||||
+
|
||||
+ object = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(*object));
|
||||
+ if (!object)
|
||||
+ return E_OUTOFMEMORY;
|
||||
+
|
||||
+ object->IDirectSoundFXFlanger_iface.lpVtbl = &flangerfxVtbl;
|
||||
+ object->IMediaObject_iface.lpVtbl = &flanger_mediaobjectVtbl;
|
||||
+ object->IMediaObjectInPlace_iface.lpVtbl = &flanger_mediainplaceVtbl;
|
||||
+ object->ref = 1;
|
||||
+
|
||||
+ ret = flangerfx_QueryInterface(&object->IDirectSoundFXFlanger_iface, riid, ppv);
|
||||
+ flangerfx_Release(&object->IDirectSoundFXFlanger_iface);
|
||||
+
|
||||
+ return ret;
|
||||
+}
|
||||
diff --git a/dlls/dsdmo/main.c b/dlls/dsdmo/main.c
|
||||
index a7671a5095c..8ea1b625ea1 100644
|
||||
--- a/dlls/dsdmo/main.c
|
||||
+++ b/dlls/dsdmo/main.c
|
||||
@@ -115,10 +115,19 @@ static const IClassFactoryVtbl DistortionFactoryVtbl = {
|
||||
ClassFactory_LockServer
|
||||
};
|
||||
|
||||
+static const IClassFactoryVtbl FlangerFactoryVtbl = {
|
||||
+ ClassFactory_QueryInterface,
|
||||
+ ClassFactory_AddRef,
|
||||
+ ClassFactory_Release,
|
||||
+ FlangerFactory_CreateInstance,
|
||||
+ ClassFactory_LockServer
|
||||
+};
|
||||
+
|
||||
static IClassFactory echofx_factory = { &EchoFactoryVtbl };
|
||||
static IClassFactory chorusfx_factory = { &ChrousFactoryVtbl };
|
||||
static IClassFactory compressorfx_factory = { &CompressorFactoryVtbl };
|
||||
static IClassFactory distortionfx_factory = { &DistortionFactoryVtbl };
|
||||
+static IClassFactory flangerfx_factory = { &FlangerFactoryVtbl };
|
||||
|
||||
/***********************************************************************
|
||||
* DllGetClassObject
|
||||
@@ -147,6 +156,11 @@ HRESULT WINAPI DllGetClassObject(REFCLSID rclsid, REFIID riid, LPVOID *ppv)
|
||||
TRACE("GUID_DSFX_STANDARD_DISTORTION\n");
|
||||
return IClassFactory_QueryInterface(&distortionfx_factory, riid, ppv);
|
||||
}
|
||||
+ else if(IsEqualGUID(&GUID_DSFX_STANDARD_FLANGER, rclsid))
|
||||
+ {
|
||||
+ TRACE("GUID_DSFX_STANDARD_FLANGER\n");
|
||||
+ return IClassFactory_QueryInterface(&flangerfx_factory, riid, ppv);
|
||||
+ }
|
||||
|
||||
FIXME("%s %s %p\n", debugstr_guid(rclsid), debugstr_guid(riid), ppv);
|
||||
return CLASS_E_CLASSNOTAVAILABLE;
|
||||
--
|
||||
2.17.1
|
||||
|
@@ -1,498 +0,0 @@
|
||||
From 333193fd90ac8673052b1bb983b656bbfea5c6a8 Mon Sep 17 00:00:00 2001
|
||||
From: Alistair Leslie-Hughes <leslie_alistair@hotmail.com>
|
||||
Date: Mon, 26 Aug 2019 09:03:54 +1000
|
||||
Subject: [PATCH] dsdmo: Add IDirectSoundFXGargle support.
|
||||
|
||||
---
|
||||
dlls/dsdmo/Makefile.in | 1 +
|
||||
dlls/dsdmo/dsdmo_classes.idl | 10 +
|
||||
dlls/dsdmo/dsdmo_private.h | 1 +
|
||||
dlls/dsdmo/gargle.c | 397 +++++++++++++++++++++++++++++++++++
|
||||
dlls/dsdmo/main.c | 14 ++
|
||||
5 files changed, 423 insertions(+)
|
||||
create mode 100644 dlls/dsdmo/gargle.c
|
||||
|
||||
diff --git a/dlls/dsdmo/Makefile.in b/dlls/dsdmo/Makefile.in
|
||||
index 2c4a0eabbd9..7b021a4c4f9 100644
|
||||
--- a/dlls/dsdmo/Makefile.in
|
||||
+++ b/dlls/dsdmo/Makefile.in
|
||||
@@ -8,6 +8,7 @@ C_SRCS = \
|
||||
distortion.c \
|
||||
echo.c \
|
||||
flanger.c \
|
||||
+ gargle.c \
|
||||
main.c
|
||||
|
||||
IDL_SRCS = dsdmo_classes.idl
|
||||
diff --git a/dlls/dsdmo/dsdmo_classes.idl b/dlls/dsdmo/dsdmo_classes.idl
|
||||
index 48d1f96e888..f114f4831b9 100644
|
||||
--- a/dlls/dsdmo/dsdmo_classes.idl
|
||||
+++ b/dlls/dsdmo/dsdmo_classes.idl
|
||||
@@ -66,3 +66,13 @@ coclass DirectSoundDistortionDMO
|
||||
coclass DirectSoundFlangerDMO
|
||||
{
|
||||
}
|
||||
+
|
||||
+[
|
||||
+ uuid(dafd8210-5711-4b91-9fe3-f75b7ae279bf),
|
||||
+ threading(both),
|
||||
+ progid("Microsoft.DirectSoundGargleDMO.1"),
|
||||
+ vi_progid("Microsoft.DirectSoundGargleDMO")
|
||||
+]
|
||||
+coclass DirectSoundGargleDMO
|
||||
+{
|
||||
+}
|
||||
diff --git a/dlls/dsdmo/dsdmo_private.h b/dlls/dsdmo/dsdmo_private.h
|
||||
index 027fb6e177f..313c66ba3df 100644
|
||||
--- a/dlls/dsdmo/dsdmo_private.h
|
||||
+++ b/dlls/dsdmo/dsdmo_private.h
|
||||
@@ -32,5 +32,6 @@ extern HRESULT WINAPI ChrousFactory_CreateInstance(IClassFactory *iface, IUnknow
|
||||
extern HRESULT WINAPI CompressorFactory_CreateInstance(IClassFactory *iface, IUnknown *outer, REFIID riid, void **ppv) DECLSPEC_HIDDEN;
|
||||
extern HRESULT WINAPI DistortionFactory_CreateInstance(IClassFactory *iface, IUnknown *outer, REFIID riid, void **ppv) DECLSPEC_HIDDEN;
|
||||
extern HRESULT WINAPI FlangerFactory_CreateInstance(IClassFactory *iface, IUnknown *outer, REFIID riid, void **ppv) DECLSPEC_HIDDEN;
|
||||
+extern HRESULT WINAPI GargleFactory_CreateInstance(IClassFactory *iface, IUnknown *outer, REFIID riid, void **ppv) DECLSPEC_HIDDEN;
|
||||
|
||||
#endif
|
||||
diff --git a/dlls/dsdmo/gargle.c b/dlls/dsdmo/gargle.c
|
||||
new file mode 100644
|
||||
index 00000000000..7ad1e30b67b
|
||||
--- /dev/null
|
||||
+++ b/dlls/dsdmo/gargle.c
|
||||
@@ -0,0 +1,397 @@
|
||||
+/*
|
||||
+ * Copyright 2019 Alistair Leslie-Hughes
|
||||
+ *
|
||||
+ * This library is free software; you can redistribute it and/or
|
||||
+ * modify it under the terms of the GNU Lesser General Public
|
||||
+ * License as published by the Free Software Foundation; either
|
||||
+ * version 2.1 of the License, or (at your option) any later version.
|
||||
+ *
|
||||
+ * This library is distributed in the hope that it will be useful,
|
||||
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
+ * Lesser General Public License for more details.
|
||||
+ *
|
||||
+ * You should have received a copy of the GNU Lesser General Public
|
||||
+ * License along with this library; if not, write to the Free Software
|
||||
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
|
||||
+ */
|
||||
+#define COBJMACROS
|
||||
+
|
||||
+#include "dsdmo_private.h"
|
||||
+
|
||||
+WINE_DEFAULT_DEBUG_CHANNEL(dsdmo);
|
||||
+
|
||||
+struct dmo_garglefx
|
||||
+{
|
||||
+ IDirectSoundFXGargle IDirectSoundFXGargle_iface;
|
||||
+ IMediaObject IMediaObject_iface;
|
||||
+ IMediaObjectInPlace IMediaObjectInPlace_iface;
|
||||
+ LONG ref;
|
||||
+};
|
||||
+
|
||||
+static inline struct dmo_garglefx *impl_from_IDirectSoundFXGargle(IDirectSoundFXGargle *iface)
|
||||
+{
|
||||
+ return CONTAINING_RECORD(iface, struct dmo_garglefx, IDirectSoundFXGargle_iface);
|
||||
+}
|
||||
+
|
||||
+static inline struct dmo_garglefx *impl_from_IMediaObject(IMediaObject *iface)
|
||||
+{
|
||||
+ return CONTAINING_RECORD(iface, struct dmo_garglefx, IMediaObject_iface);
|
||||
+}
|
||||
+
|
||||
+static inline struct dmo_garglefx *impl_from_IMediaObjectInPlace(IMediaObjectInPlace *iface)
|
||||
+{
|
||||
+ return CONTAINING_RECORD(iface, struct dmo_garglefx, IMediaObjectInPlace_iface);
|
||||
+}
|
||||
+
|
||||
+static HRESULT WINAPI gargle_mediaobj_QueryInterface(IMediaObject *iface, REFIID riid, void **obj)
|
||||
+{
|
||||
+ struct dmo_garglefx *This = impl_from_IMediaObject(iface);
|
||||
+ return IDirectSoundFXGargle_QueryInterface(&This->IDirectSoundFXGargle_iface, riid, obj);
|
||||
+}
|
||||
+
|
||||
+static ULONG WINAPI gargle_mediaobj_AddRef(IMediaObject *iface)
|
||||
+{
|
||||
+ struct dmo_garglefx *This = impl_from_IMediaObject(iface);
|
||||
+ return IDirectSoundFXGargle_AddRef(&This->IDirectSoundFXGargle_iface);
|
||||
+}
|
||||
+
|
||||
+static ULONG WINAPI gargle_mediaobj_Release(IMediaObject *iface)
|
||||
+{
|
||||
+ struct dmo_garglefx *This = impl_from_IMediaObject(iface);
|
||||
+ return IDirectSoundFXGargle_Release(&This->IDirectSoundFXGargle_iface);
|
||||
+}
|
||||
+
|
||||
+static HRESULT WINAPI gargle_mediaobj_GetStreamCount(IMediaObject *iface, DWORD *inputs, DWORD *outputs)
|
||||
+{
|
||||
+ struct dmo_garglefx *This = impl_from_IMediaObject(iface);
|
||||
+ FIXME("%p, %p, %p\n", This, inputs, outputs);
|
||||
+ return E_NOTIMPL;
|
||||
+}
|
||||
+
|
||||
+static HRESULT WINAPI gargle_mediaobj_GetInputStreamInfo(IMediaObject *iface, DWORD index, DWORD *flags)
|
||||
+{
|
||||
+ struct dmo_garglefx *This = impl_from_IMediaObject(iface);
|
||||
+ FIXME("%p, %d, %p\n", This, index, flags);
|
||||
+ return E_NOTIMPL;
|
||||
+}
|
||||
+
|
||||
+static HRESULT WINAPI gargle_mediaobj_GetOutputStreamInfo(IMediaObject *iface, DWORD index, DWORD *flags)
|
||||
+{
|
||||
+ struct dmo_garglefx *This = impl_from_IMediaObject(iface);
|
||||
+ FIXME("%p, %d, %p\n", This, index, flags);
|
||||
+ return E_NOTIMPL;
|
||||
+}
|
||||
+
|
||||
+static HRESULT WINAPI gargle_mediaobj_GetInputType(IMediaObject *iface, DWORD index, DWORD type, DMO_MEDIA_TYPE *pmt)
|
||||
+{
|
||||
+ struct dmo_garglefx *This = impl_from_IMediaObject(iface);
|
||||
+ FIXME("%p, %d, %d, %p\n", This, index, type, pmt);
|
||||
+ return E_NOTIMPL;
|
||||
+}
|
||||
+
|
||||
+static HRESULT WINAPI gargle_mediaobj_GetOutputType(IMediaObject *iface, DWORD index, DWORD type, DMO_MEDIA_TYPE *pmt)
|
||||
+{
|
||||
+ struct dmo_garglefx *This = impl_from_IMediaObject(iface);
|
||||
+ FIXME("%p, %d, %d, %p\n", This, index, type, pmt);
|
||||
+ return E_NOTIMPL;
|
||||
+}
|
||||
+
|
||||
+static HRESULT WINAPI gargle_mediaobj_SetInputType(IMediaObject *iface, DWORD index, const DMO_MEDIA_TYPE *pmt, DWORD flags)
|
||||
+{
|
||||
+ struct dmo_garglefx *This = impl_from_IMediaObject(iface);
|
||||
+ FIXME("%p, %d, %p, %x\n", This, index, pmt, flags);
|
||||
+ return S_OK;
|
||||
+}
|
||||
+
|
||||
+static HRESULT WINAPI gargle_mediaobj_SetOutputType(IMediaObject *iface, DWORD index, const DMO_MEDIA_TYPE *pmt, DWORD flags)
|
||||
+{
|
||||
+ struct dmo_garglefx *This = impl_from_IMediaObject(iface);
|
||||
+ FIXME("%p, %d, %p, %x\n", This, index, pmt, flags);
|
||||
+ return S_OK;
|
||||
+}
|
||||
+
|
||||
+static HRESULT WINAPI gargle_mediaobj_GetInputCurrentType(IMediaObject *iface, DWORD index, DMO_MEDIA_TYPE *pmt)
|
||||
+{
|
||||
+ struct dmo_garglefx *This = impl_from_IMediaObject(iface);
|
||||
+ FIXME("%p, %d, %p\n", This, index, pmt);
|
||||
+ return E_NOTIMPL;
|
||||
+}
|
||||
+
|
||||
+static HRESULT WINAPI gargle_mediaobj_GetOutputCurrentType(IMediaObject *iface, DWORD index, DMO_MEDIA_TYPE *pmt)
|
||||
+{
|
||||
+ struct dmo_garglefx *This = impl_from_IMediaObject(iface);
|
||||
+ FIXME("%p, %d, %p\n", This, index, pmt);
|
||||
+ return E_NOTIMPL;
|
||||
+}
|
||||
+
|
||||
+static HRESULT WINAPI gargle_mediaobj_GetInputSizeInfo(IMediaObject *iface, DWORD index, DWORD *size, DWORD *ahead, DWORD *alignment)
|
||||
+{
|
||||
+ struct dmo_garglefx *This = impl_from_IMediaObject(iface);
|
||||
+ FIXME("%p, %d, %p, %p, %p\n", This, index, size, ahead, alignment);
|
||||
+ return E_NOTIMPL;
|
||||
+}
|
||||
+
|
||||
+static HRESULT WINAPI gargle_mediaobj_GetOutputSizeInfo(IMediaObject *iface, DWORD index, DWORD *size, DWORD *alignment)
|
||||
+{
|
||||
+ struct dmo_garglefx *This = impl_from_IMediaObject(iface);
|
||||
+ FIXME("%p, %d, %p, %p\n", This, index, size, alignment);
|
||||
+ return E_NOTIMPL;
|
||||
+}
|
||||
+
|
||||
+static HRESULT WINAPI gargle_mediaobj_GetInputMaxLatency(IMediaObject *iface, DWORD index, REFERENCE_TIME *latency)
|
||||
+{
|
||||
+ struct dmo_garglefx *This = impl_from_IMediaObject(iface);
|
||||
+ FIXME("%p, %d, %p\n", This, index, latency);
|
||||
+ return E_NOTIMPL;
|
||||
+}
|
||||
+
|
||||
+static HRESULT WINAPI gargle_mediaobj_SetInputMaxLatency(IMediaObject *iface, DWORD index, REFERENCE_TIME latency)
|
||||
+{
|
||||
+ struct dmo_garglefx *This = impl_from_IMediaObject(iface);
|
||||
+ FIXME("%p, %d, %s\n", This, index, wine_dbgstr_longlong(latency));
|
||||
+ return E_NOTIMPL;
|
||||
+}
|
||||
+
|
||||
+static HRESULT WINAPI gargle_mediaobj_Flush(IMediaObject *iface)
|
||||
+{
|
||||
+ struct dmo_garglefx *This = impl_from_IMediaObject(iface);
|
||||
+ FIXME("%p\n", This);
|
||||
+ return E_NOTIMPL;
|
||||
+}
|
||||
+
|
||||
+static HRESULT WINAPI gargle_mediaobj_Discontinuity(IMediaObject *iface, DWORD index)
|
||||
+{
|
||||
+ struct dmo_garglefx *This = impl_from_IMediaObject(iface);
|
||||
+ FIXME("%p, %d\n", This, index);
|
||||
+ return E_NOTIMPL;
|
||||
+}
|
||||
+
|
||||
+static HRESULT WINAPI gargle_mediaobj_AllocateStreamingResources(IMediaObject *iface)
|
||||
+{
|
||||
+ struct dmo_garglefx *This = impl_from_IMediaObject(iface);
|
||||
+ FIXME("%p\n", This);
|
||||
+ return E_NOTIMPL;
|
||||
+}
|
||||
+
|
||||
+static HRESULT WINAPI gargle_mediaobj_FreeStreamingResources(IMediaObject *iface)
|
||||
+{
|
||||
+ struct dmo_garglefx *This = impl_from_IMediaObject(iface);
|
||||
+ FIXME("%p\n", This);
|
||||
+ return E_NOTIMPL;
|
||||
+}
|
||||
+
|
||||
+static HRESULT WINAPI gargle_mediaobj_GetInputStatus(IMediaObject *iface, DWORD index, DWORD *flags)
|
||||
+{
|
||||
+ struct dmo_garglefx *This = impl_from_IMediaObject(iface);
|
||||
+ FIXME("%p, %d, %p\n", This, index, flags);
|
||||
+ return E_NOTIMPL;
|
||||
+}
|
||||
+
|
||||
+static HRESULT WINAPI gargle_mediaobj_ProcessInput(IMediaObject *iface, DWORD index, IMediaBuffer *buffer,
|
||||
+ DWORD flags, REFERENCE_TIME timestamp, REFERENCE_TIME length)
|
||||
+{
|
||||
+ struct dmo_garglefx *This = impl_from_IMediaObject(iface);
|
||||
+ FIXME("%p, %d, %p, %x, %s, %s\n", This, index, buffer, flags, wine_dbgstr_longlong(timestamp), wine_dbgstr_longlong(length));
|
||||
+ return E_NOTIMPL;
|
||||
+}
|
||||
+
|
||||
+static HRESULT WINAPI gargle_mediaobj_ProcessOutput(IMediaObject *iface, DWORD flags, DWORD count,
|
||||
+ DMO_OUTPUT_DATA_BUFFER *buffers, DWORD *status)
|
||||
+{
|
||||
+ struct dmo_garglefx *This = impl_from_IMediaObject(iface);
|
||||
+ FIXME("%p, %x, %d, %p, %p\n", This, flags, count, buffers, status);
|
||||
+ return E_NOTIMPL;
|
||||
+}
|
||||
+
|
||||
+static HRESULT WINAPI gargle_mediaobj_Lock(IMediaObject *iface, LONG lock)
|
||||
+{
|
||||
+ struct dmo_garglefx *This = impl_from_IMediaObject(iface);
|
||||
+ FIXME("%p, %d\n", This, lock);
|
||||
+ return E_NOTIMPL;
|
||||
+}
|
||||
+
|
||||
+static const IMediaObjectVtbl gargle_mediaobjectVtbl =
|
||||
+{
|
||||
+ gargle_mediaobj_QueryInterface,
|
||||
+ gargle_mediaobj_AddRef,
|
||||
+ gargle_mediaobj_Release,
|
||||
+ gargle_mediaobj_GetStreamCount,
|
||||
+ gargle_mediaobj_GetInputStreamInfo,
|
||||
+ gargle_mediaobj_GetOutputStreamInfo,
|
||||
+ gargle_mediaobj_GetInputType,
|
||||
+ gargle_mediaobj_GetOutputType,
|
||||
+ gargle_mediaobj_SetInputType,
|
||||
+ gargle_mediaobj_SetOutputType,
|
||||
+ gargle_mediaobj_GetInputCurrentType,
|
||||
+ gargle_mediaobj_GetOutputCurrentType,
|
||||
+ gargle_mediaobj_GetInputSizeInfo,
|
||||
+ gargle_mediaobj_GetOutputSizeInfo,
|
||||
+ gargle_mediaobj_GetInputMaxLatency,
|
||||
+ gargle_mediaobj_SetInputMaxLatency,
|
||||
+ gargle_mediaobj_Flush,
|
||||
+ gargle_mediaobj_Discontinuity,
|
||||
+ gargle_mediaobj_AllocateStreamingResources,
|
||||
+ gargle_mediaobj_FreeStreamingResources,
|
||||
+ gargle_mediaobj_GetInputStatus,
|
||||
+ gargle_mediaobj_ProcessInput,
|
||||
+ gargle_mediaobj_ProcessOutput,
|
||||
+ gargle_mediaobj_Lock
|
||||
+};
|
||||
+
|
||||
+static HRESULT WINAPI gargle_mediainplace_QueryInterface(IMediaObjectInPlace *iface, REFIID riid, void **obj)
|
||||
+{
|
||||
+ struct dmo_garglefx *This = impl_from_IMediaObjectInPlace(iface);
|
||||
+ return IDirectSoundFXGargle_QueryInterface(&This->IDirectSoundFXGargle_iface, riid, obj);
|
||||
+}
|
||||
+
|
||||
+static ULONG WINAPI gargle_mediainplace_AddRef(IMediaObjectInPlace *iface)
|
||||
+{
|
||||
+ struct dmo_garglefx *This = impl_from_IMediaObjectInPlace(iface);
|
||||
+ return IDirectSoundFXGargle_AddRef(&This->IDirectSoundFXGargle_iface);
|
||||
+}
|
||||
+
|
||||
+static ULONG WINAPI gargle_mediainplace_Release(IMediaObjectInPlace *iface)
|
||||
+{
|
||||
+ struct dmo_garglefx *This = impl_from_IMediaObjectInPlace(iface);
|
||||
+ return IDirectSoundFXGargle_Release(&This->IDirectSoundFXGargle_iface);
|
||||
+}
|
||||
+
|
||||
+static HRESULT WINAPI gargle_mediainplace_Process(IMediaObjectInPlace *iface, ULONG size, BYTE *data, REFERENCE_TIME start, DWORD flags)
|
||||
+{
|
||||
+ struct dmo_garglefx *This = impl_from_IMediaObjectInPlace(iface);
|
||||
+ static BOOL once = 0;
|
||||
+ if(!once++)
|
||||
+ FIXME("%p, %d, %p, %s, %x\n", This, size, data, wine_dbgstr_longlong(start), flags);
|
||||
+ else
|
||||
+ TRACE("%p, %d, %p, %s, %x\n", This, size, data, wine_dbgstr_longlong(start), flags);
|
||||
+ return E_NOTIMPL;
|
||||
+}
|
||||
+
|
||||
+static HRESULT WINAPI gargle_mediainplace_Clone(IMediaObjectInPlace *iface, IMediaObjectInPlace **object)
|
||||
+{
|
||||
+ struct dmo_garglefx *This = impl_from_IMediaObjectInPlace(iface);
|
||||
+ FIXME("%p, %p\n", This, object);
|
||||
+ return E_NOTIMPL;
|
||||
+}
|
||||
+
|
||||
+static HRESULT WINAPI gargle_mediainplace_GetLatency(IMediaObjectInPlace *iface, REFERENCE_TIME *latency)
|
||||
+{
|
||||
+ struct dmo_garglefx *This = impl_from_IMediaObjectInPlace(iface);
|
||||
+ FIXME("%p, %p\n", This, latency);
|
||||
+ return E_NOTIMPL;
|
||||
+}
|
||||
+
|
||||
+static const IMediaObjectInPlaceVtbl gargle_mediainplaceVtbl =
|
||||
+{
|
||||
+ gargle_mediainplace_QueryInterface,
|
||||
+ gargle_mediainplace_AddRef,
|
||||
+ gargle_mediainplace_Release,
|
||||
+ gargle_mediainplace_Process,
|
||||
+ gargle_mediainplace_Clone,
|
||||
+ gargle_mediainplace_GetLatency
|
||||
+};
|
||||
+
|
||||
+static HRESULT WINAPI garglefx_QueryInterface(IDirectSoundFXGargle *iface, REFIID riid, void **ppv)
|
||||
+{
|
||||
+ struct dmo_garglefx *This = impl_from_IDirectSoundFXGargle(iface);
|
||||
+
|
||||
+ TRACE("(%p)->(%s %p)\n", This, debugstr_guid(riid), ppv);
|
||||
+
|
||||
+ if (IsEqualGUID(riid, &IID_IUnknown) ||
|
||||
+ IsEqualGUID(riid, &IID_IDirectSoundFXGargle))
|
||||
+ {
|
||||
+ *ppv = &This->IDirectSoundFXGargle_iface;
|
||||
+ }
|
||||
+ else if(IsEqualGUID(riid, &IID_IMediaObject))
|
||||
+ {
|
||||
+ *ppv = &This->IMediaObject_iface;
|
||||
+ }
|
||||
+ else if(IsEqualGUID(riid, &IID_IMediaObjectInPlace))
|
||||
+ {
|
||||
+ *ppv = &This->IMediaObjectInPlace_iface;
|
||||
+ }
|
||||
+
|
||||
+ if(!*ppv)
|
||||
+ {
|
||||
+ FIXME("(%p)->(%s,%p),not found\n", This, debugstr_guid(riid), ppv);
|
||||
+ return E_NOINTERFACE;
|
||||
+ }
|
||||
+
|
||||
+ IUnknown_AddRef((IUnknown*)*ppv);
|
||||
+
|
||||
+ return S_OK;
|
||||
+}
|
||||
+
|
||||
+static ULONG WINAPI garglefx_AddRef(IDirectSoundFXGargle *iface)
|
||||
+{
|
||||
+ struct dmo_garglefx *This = impl_from_IDirectSoundFXGargle(iface);
|
||||
+ ULONG ref = InterlockedIncrement(&This->ref);
|
||||
+
|
||||
+ TRACE("(%p) ref=%u\n", This, ref);
|
||||
+
|
||||
+ return ref;
|
||||
+}
|
||||
+
|
||||
+static ULONG WINAPI garglefx_Release(IDirectSoundFXGargle *iface)
|
||||
+{
|
||||
+ struct dmo_garglefx *This = impl_from_IDirectSoundFXGargle(iface);
|
||||
+ ULONG ref = InterlockedDecrement(&This->ref);
|
||||
+
|
||||
+ TRACE("(%p) ref=%u\n", This, ref);
|
||||
+
|
||||
+ if (!ref)
|
||||
+ {
|
||||
+ heap_free(This);
|
||||
+ }
|
||||
+ return ref;
|
||||
+}
|
||||
+
|
||||
+static HRESULT WINAPI garglefx_SetAllParameters(IDirectSoundFXGargle *iface, const DSFXGargle *gargle)
|
||||
+{
|
||||
+ struct dmo_garglefx *This = impl_from_IDirectSoundFXGargle(iface);
|
||||
+ FIXME("(%p) %p\n", This, gargle);
|
||||
+
|
||||
+ return E_NOTIMPL;
|
||||
+}
|
||||
+
|
||||
+static HRESULT WINAPI garglefx_GetAllParameters(IDirectSoundFXGargle *iface, DSFXGargle *gargle)
|
||||
+{
|
||||
+ struct dmo_garglefx *This = impl_from_IDirectSoundFXGargle(iface);
|
||||
+ FIXME("(%p) %p\n", This, gargle);
|
||||
+
|
||||
+ return E_NOTIMPL;
|
||||
+}
|
||||
+
|
||||
+static const struct IDirectSoundFXGargleVtbl garglefxVtbl =
|
||||
+{
|
||||
+ garglefx_QueryInterface,
|
||||
+ garglefx_AddRef,
|
||||
+ garglefx_Release,
|
||||
+ garglefx_SetAllParameters,
|
||||
+ garglefx_GetAllParameters
|
||||
+};
|
||||
+
|
||||
+HRESULT WINAPI GargleFactory_CreateInstance(IClassFactory *iface, IUnknown *outer, REFIID riid, void **ppv)
|
||||
+{
|
||||
+ struct dmo_garglefx *object;
|
||||
+ HRESULT ret;
|
||||
+
|
||||
+ TRACE("(%p, %s, %p)\n", outer, debugstr_guid(riid), ppv);
|
||||
+
|
||||
+ *ppv = NULL;
|
||||
+
|
||||
+ object = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(*object));
|
||||
+ if (!object)
|
||||
+ return E_OUTOFMEMORY;
|
||||
+
|
||||
+ object->IDirectSoundFXGargle_iface.lpVtbl = &garglefxVtbl;
|
||||
+ object->IMediaObject_iface.lpVtbl = &gargle_mediaobjectVtbl;
|
||||
+ object->IMediaObjectInPlace_iface.lpVtbl = &gargle_mediainplaceVtbl;
|
||||
+ object->ref = 1;
|
||||
+
|
||||
+ ret = garglefx_QueryInterface(&object->IDirectSoundFXGargle_iface, riid, ppv);
|
||||
+ garglefx_Release(&object->IDirectSoundFXGargle_iface);
|
||||
+
|
||||
+ return ret;
|
||||
+}
|
||||
diff --git a/dlls/dsdmo/main.c b/dlls/dsdmo/main.c
|
||||
index 8ea1b625ea1..74c3c08ee22 100644
|
||||
--- a/dlls/dsdmo/main.c
|
||||
+++ b/dlls/dsdmo/main.c
|
||||
@@ -123,11 +123,20 @@ static const IClassFactoryVtbl FlangerFactoryVtbl = {
|
||||
ClassFactory_LockServer
|
||||
};
|
||||
|
||||
+static const IClassFactoryVtbl GargleFactoryVtbl = {
|
||||
+ ClassFactory_QueryInterface,
|
||||
+ ClassFactory_AddRef,
|
||||
+ ClassFactory_Release,
|
||||
+ GargleFactory_CreateInstance,
|
||||
+ ClassFactory_LockServer
|
||||
+};
|
||||
+
|
||||
static IClassFactory echofx_factory = { &EchoFactoryVtbl };
|
||||
static IClassFactory chorusfx_factory = { &ChrousFactoryVtbl };
|
||||
static IClassFactory compressorfx_factory = { &CompressorFactoryVtbl };
|
||||
static IClassFactory distortionfx_factory = { &DistortionFactoryVtbl };
|
||||
static IClassFactory flangerfx_factory = { &FlangerFactoryVtbl };
|
||||
+static IClassFactory garglefx_factory = { &GargleFactoryVtbl };
|
||||
|
||||
/***********************************************************************
|
||||
* DllGetClassObject
|
||||
@@ -161,6 +170,11 @@ HRESULT WINAPI DllGetClassObject(REFCLSID rclsid, REFIID riid, LPVOID *ppv)
|
||||
TRACE("GUID_DSFX_STANDARD_FLANGER\n");
|
||||
return IClassFactory_QueryInterface(&flangerfx_factory, riid, ppv);
|
||||
}
|
||||
+ else if(IsEqualGUID(&GUID_DSFX_STANDARD_GARGLE, rclsid))
|
||||
+ {
|
||||
+ TRACE("GUID_DSFX_STANDARD_GARGLE\n");
|
||||
+ return IClassFactory_QueryInterface(&garglefx_factory, riid, ppv);
|
||||
+ }
|
||||
|
||||
FIXME("%s %s %p\n", debugstr_guid(rclsid), debugstr_guid(riid), ppv);
|
||||
return CLASS_E_CLASSNOTAVAILABLE;
|
||||
--
|
||||
2.17.1
|
||||
|
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@@ -1,70 +0,0 @@
|
||||
From cc8299d2dea6d96d8460adf855548c58c3497d55 Mon Sep 17 00:00:00 2001
|
||||
From: Alistair Leslie-Hughes <leslie_alistair@hotmail.com>
|
||||
Date: Tue, 3 Sep 2019 09:03:16 +1000
|
||||
Subject: [PATCH 11/27] dsdmo: Implement IDirectSoundFXEcho GetAllParameters.
|
||||
|
||||
---
|
||||
dlls/dsdmo/echo.c | 18 ++++++++++++++++--
|
||||
dlls/dsound/tests/dsound8.c | 2 +-
|
||||
2 files changed, 17 insertions(+), 3 deletions(-)
|
||||
|
||||
diff --git a/dlls/dsdmo/echo.c b/dlls/dsdmo/echo.c
|
||||
index 3e8b0be115..e9add8a019 100644
|
||||
--- a/dlls/dsdmo/echo.c
|
||||
+++ b/dlls/dsdmo/echo.c
|
||||
@@ -27,6 +27,8 @@ struct dmo_echofx
|
||||
IMediaObject IMediaObject_iface;
|
||||
IMediaObjectInPlace IMediaObjectInPlace_iface;
|
||||
LONG ref;
|
||||
+
|
||||
+ DSFXEcho params;
|
||||
};
|
||||
|
||||
static inline struct dmo_echofx *impl_from_IDirectSoundFXEcho(IDirectSoundFXEcho *iface)
|
||||
@@ -358,9 +360,15 @@ static HRESULT WINAPI echofx_SetAllParameters(IDirectSoundFXEcho *iface, const D
|
||||
static HRESULT WINAPI echofx_GetAllParameters(IDirectSoundFXEcho *iface, DSFXEcho *echo)
|
||||
{
|
||||
struct dmo_echofx *This = impl_from_IDirectSoundFXEcho(iface);
|
||||
- FIXME("(%p) %p\n", This, echo);
|
||||
|
||||
- return E_NOTIMPL;
|
||||
+ TRACE("(%p) %p\n", This, echo);
|
||||
+
|
||||
+ if(!echo)
|
||||
+ return E_INVALIDARG;
|
||||
+
|
||||
+ *echo = This->params;
|
||||
+
|
||||
+ return S_OK;
|
||||
}
|
||||
|
||||
static const struct IDirectSoundFXEchoVtbl echofxVtbl =
|
||||
@@ -390,6 +398,12 @@ HRESULT WINAPI EchoFactory_CreateInstance(IClassFactory *iface, IUnknown *outer,
|
||||
object->IMediaObjectInPlace_iface.lpVtbl = &echo_mediainplaceVtbl;
|
||||
object->ref = 1;
|
||||
|
||||
+ object->params.fWetDryMix = 50.0f;
|
||||
+ object->params.fFeedback = 50.0f;
|
||||
+ object->params.fLeftDelay = 500.0f;
|
||||
+ object->params.fRightDelay = 500.0f;
|
||||
+ object->params.lPanDelay = 0;
|
||||
+
|
||||
ret = echofx_QueryInterface(&object->IDirectSoundFXEcho_iface, riid, ppv);
|
||||
echofx_Release(&object->IDirectSoundFXEcho_iface);
|
||||
|
||||
diff --git a/dlls/dsound/tests/dsound8.c b/dlls/dsound/tests/dsound8.c
|
||||
index 6ed32abbcb..244f2f98e8 100644
|
||||
--- a/dlls/dsound/tests/dsound8.c
|
||||
+++ b/dlls/dsound/tests/dsound8.c
|
||||
@@ -1387,7 +1387,7 @@ static void test_echo_parameters(IDirectSoundBuffer8 *secondary8)
|
||||
DSFXEcho params;
|
||||
|
||||
rc = IDirectSoundFXEcho_GetAllParameters(echo, ¶ms);
|
||||
- todo_wine ok(rc == DS_OK, "Failed: %08x\n", rc);
|
||||
+ ok(rc == DS_OK, "Failed: %08x\n", rc);
|
||||
if (rc == DS_OK )
|
||||
{
|
||||
ok(params.fWetDryMix == 50.0f, "got %f\n", params.fWetDryMix);
|
||||
--
|
||||
2.17.1
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user