Wine: Version bump incl. pulseaudio,EVE,D3 patches

This commit is contained in:
Stefan Reimer 2012-04-29 14:24:02 -07:00
parent 2e04a99e53
commit 55509db6e7
5 changed files with 377 additions and 615 deletions

View File

@ -1,14 +1,15 @@
AUX AcceptEX.patch 2315 RMD160 7fd16659d4c3b24b4fc41ca2300959e2fc430ea7 SHA1 113dee9a99589580d8482610e0fdbc8535218a07 SHA256 2045b0c6931c3cb9b51107b53d5629eb732a7f4ee3d817b19064b9b24b7599e7
AUX GetExtendedTcpTable.patch 21551 RMD160 dc811ae2d612e91ba7e75c26a4f836df74be30d3 SHA1 d3991c38a2ca63bb61525a54e8629cbda7e4b796 SHA256 619be5c6d13ed7b14bfa0b20be402d2e440318429a34c1f9044676dc6250d458
AUX pulseaudio.patch 99783 RMD160 667509a570bd422d8b7c390451294bb47902289d SHA1 4a9c40daede96368f6841e9897047f4464398b14 SHA256 be851e7fc33ef3744a2517a4d185f7a0b969a0edd321af43e63648c71184ed57
AUX msvcr_eve.patch 1618 RMD160 746cc393725b50a4af8ee42bc2d46ec5abf55b43 SHA1 054891ded59398f0e2073af6ba5106c82ef0477f SHA256 e84065733ac736413af3c22fd25bc5e1b9edd40fbd4ceaa6e72102ccac88611d
AUX pulseaudio.patch 109370 RMD160 a7412efb915018d657ae329aeed2b907e285425c SHA1 bcf663862186bb62a6ccefb85297c6b218b06087 SHA256 71e28f02a9a3d341e123303ad7ff2ee63aaa33945cd6d40fdb2986b9a393a4a1
AUX reset_stencil.patch 984 RMD160 e95dca101ccfabcfb9f244c2a36a8a01b2408588 SHA1 e0599e9ca851ea6a6c16db187eb8dd00580a4460 SHA256 bf1cd3f1fa4875b1a73d57c6c924a5de08edd3aab56142c68655f92646268ae8
AUX wine-1.1.15-winegcc.patch 1556 RMD160 ca7e0df0a45507e7d31ed81c5712111b83ed9bfa SHA1 4b155fe7cb5e831b7f92757d52aa1ab12569b232 SHA256 dbd89db561d7583faf317d795b8c11231575d885e21c6414add39079604dbd0d
AUX wine-1.4_rc2-multilib-portage.patch 1256 RMD160 6445df9cc97ad523f54de256f37810366a0693fd SHA1 8d0d794f74952a53d38c75a8cb586f784a3b9357 SHA256 9d0acd304d11d1bf73f56699754aaa1bfe1facba90648ee330fdbe08d9ff4938
DIST wine-1.4.tar.bz2 20035856 RMD160 ee523c4cf15984197487432790c0e5bbba3ec495 SHA1 ce5d56b9b949c01dde663ab39739ffcfb41a73c4 SHA256 99a437bb8bd350bb1499d59183635e58217e73d631379c43cfd0d6020428ee65
DIST wine-1.5.1.tar.bz2 20078739 RMD160 5f99f9ab2cfd3ceb4648dffde20714deb2d80fa2 SHA1 0f44ea5f9fbdc07186c77dfa619bd4d0f1b07825 SHA256 6dc578f9afb3c9a0f2b773bbe09af20578ac6fa514dd0712ecc5d05c766045e6
DIST wine-1.5.3.tar.bz2 20171697 RMD160 89ed1f6dfff017f50f75667b6449ee01668c9ba0 SHA1 74fa5886301a9c1bb4de1bd868677a4d668f299f SHA256 d3e8e484cbc2c4888bc880d0b0c8b52299d36a5cecc96d9367b59142345a1206
DIST wine_gecko-1.4-x86.msi 14732288 RMD160 02363538a77a954f2bf1014b28ec1ed8fe2d1b6e SHA1 c30aa99621e98336eb4b7e2074118b8af8ea2ad5 SHA256 b30e0ac29a91a6fc40c73b5b760a56360a1d5323282545e32efaa40c75d8986d
DIST wine_gecko-1.4-x86_64.msi 14980096 RMD160 5613e27d474085c31b53c868ed020445bdee37ae SHA1 bf0aaf56a8cf9abd75be02b56b05e5c4e9a4df93 SHA256 ceab7f1866e85175ed4cd3b5d081ee4f77c8d32ac7adf489a19c1f7329187219
DIST wine_gecko-1.5-x86.msi 15950848 RMD160 691e4e96abf2bd17a6d55f8bb784c40e23b0ff9c SHA1 07b2bc74d03c885bb39124a7641715314cd3ae71 SHA256 2e372a1b87ff2a22ad5127400ece4b09e55591d9f84e00bb562d294898a49b5c
DIST wine_gecko-1.5-x86_64.msi 16345088 RMD160 e5557156e11ebcc78529c655e5b93081e9bd5b9c SHA1 80a3b36c30bb79a11889879392fdc1fcda9ca165 SHA256 762e80b41e6922849b28299dc5810a28634d484fe73fb7ca52804460588a1730
EBUILD wine-1.4.ebuild 6236 RMD160 aea6af88d59cfcb02d72c1194a85b26d59fd40a4 SHA1 c03b0d215b10f4d5f6230796a9becf2925693f49 SHA256 8e6ed9bdaa8ff6f89d72f0eccc580a689fbc8aae8692c481893a1a5aa307cea4
EBUILD wine-1.5.1.ebuild 6389 RMD160 210be55f12fe344254085f9c11d15f52068f4313 SHA1 ea694b11f66b62069874a89e61b1c49a69a43c10 SHA256 d0f0511e2e14054c8e25f1915bf4535074777dcd09e18431b8debe1cc8b99984
EBUILD wine-1.5.3.ebuild 6457 RMD160 510a2c21caafe3b1a41259737b4d815c14c512d0 SHA1 3821e77267e186277454ed0b154fb0a722f7d6dc SHA256 efe20f12e96794102acd305e7e240b4f8ebe075160d3217eb3c285f21f48d866

View File

@ -1,540 +0,0 @@
From 5154c12213cc2c960d8596660687add13d3421c7 Mon Sep 17 00:00:00 2001
From: William Pettersson <william.pettersson@gmail.com>
Date: Thu, 22 Mar 2012 22:20:40 +1000
Subject: [PATCH] GetExtendedTcpTable
Adds support for TCP_TABLE_OWNER_PID_ALL
in GetExtendedTcpTable.
---
dlls/iphlpapi/iphlpapi_main.c | 27 +++++-
dlls/iphlpapi/ipstats.c | 209 ++++++++++++++++++++++++++++++----------
dlls/iphlpapi/ipstats.h | 2 +
include/wine/server_protocol.h | 19 ++++-
server/process.c | 18 ++++
server/protocol.def | 8 ++
server/request.h | 6 +
server/trace.c | 13 +++
8 files changed, 248 insertions(+), 54 deletions(-)
diff --git a/dlls/iphlpapi/iphlpapi_main.c b/dlls/iphlpapi/iphlpapi_main.c
index a569041..f54cb50 100644
--- a/dlls/iphlpapi/iphlpapi_main.c
+++ b/dlls/iphlpapi/iphlpapi_main.c
@@ -1883,15 +1883,36 @@ DWORD WINAPI GetTcpTable(PMIB_TCPTABLE pTcpTable, PDWORD pdwSize, BOOL bOrder)
DWORD WINAPI GetExtendedTcpTable(PVOID pTcpTable, PDWORD pdwSize, BOOL bOrder,
ULONG ulAf, TCP_TABLE_CLASS TableClass, ULONG Reserved)
{
+ DWORD table_size;
+ VOID *table;
+ DWORD ret;
+
TRACE("pTcpTable %p, pdwSize %p, bOrder %d, ulAf %u, TableClass %u, Reserved %u\n",
pTcpTable, pdwSize, bOrder, ulAf, TableClass, Reserved);
- if (ulAf == AF_INET6 || TableClass != TCP_TABLE_BASIC_ALL)
+ if (!pdwSize) return ERROR_INVALID_PARAMETER;
+
+ if (ulAf == AF_INET6)
{
- FIXME("ulAf = %u, TableClass = %u not supportted\n", ulAf, TableClass);
+ FIXME("AF_INET6 not supported\n");
return ERROR_NOT_SUPPORTED;
}
- return GetTcpTable(pTcpTable, pdwSize, bOrder);
+
+ ret = tcp_build_table(GetProcessHeap(), 0, &table, &table_size, bOrder, TableClass);
+ if (!ret) {
+ if (!pTcpTable || *pdwSize < table_size) {
+ *pdwSize = table_size;
+ ret = ERROR_INSUFFICIENT_BUFFER;
+ }
+ else {
+ *pdwSize = table_size;
+ memcpy(pTcpTable, table, table_size);
+ }
+ HeapFree(GetProcessHeap(), 0, table);
+ }
+
+ TRACE("returning %d\n", ret);
+ return ret;
}
/******************************************************************
diff --git a/dlls/iphlpapi/ipstats.c b/dlls/iphlpapi/ipstats.c
index db475fb..704160e 100644
--- a/dlls/iphlpapi/ipstats.c
+++ b/dlls/iphlpapi/ipstats.c
@@ -27,6 +27,7 @@
#include <string.h>
#include <errno.h>
#include <sys/types.h>
+#include <dirent.h>
#ifdef HAVE_ALIAS_H
#include <alias.h>
#endif
@@ -1617,15 +1618,17 @@ DWORD WINAPI AllocateAndGetUdpTableFromStack(PMIB_UDPTABLE *ppUdpTable, BOOL bOr
}
-static MIB_TCPTABLE *append_tcp_row( HANDLE heap, DWORD flags, MIB_TCPTABLE *table,
- DWORD *count, const MIB_TCPROW *row )
+static VOID *append_tcp_row( HANDLE heap, DWORD flags, VOID *table, DWORD *count,
+ const VOID *row, DWORD row_size, DWORD table_struct_size )
{
- if (table->dwNumEntries >= *count)
+ DWORD dwNumEntries = *(DWORD *)table;
+
+ if (dwNumEntries >= *count)
{
- MIB_TCPTABLE *new_table;
- DWORD new_count = table->dwNumEntries * 2;
+ VOID *new_table;
+ DWORD new_count = dwNumEntries * 2;
- if (!(new_table = HeapReAlloc( heap, flags, table, FIELD_OFFSET(MIB_TCPTABLE, table[new_count] ))))
+ if (!(new_table = HeapReAlloc( heap, flags, table, table_struct_size + row_size*new_count )))
{
HeapFree( heap, 0, table );
return NULL;
@@ -1633,7 +1636,8 @@ static MIB_TCPTABLE *append_tcp_row( HANDLE heap, DWORD flags, MIB_TCPTABLE *tab
*count = new_count;
table = new_table;
}
- memcpy( &table->table[table->dwNumEntries++], row, sizeof(*row) );
+ memcpy( (CHAR *)table + sizeof(DWORD) + dwNumEntries*row_size, row, row_size );
+ *(DWORD *)table = dwNumEntries+1;
return table;
}
@@ -1674,38 +1678,34 @@ static int compare_tcp_rows(const void *a, const void *b)
}
-/******************************************************************
- * AllocateAndGetTcpTableFromStack (IPHLPAPI.@)
- *
- * Get the TCP connection table.
- * Like GetTcpTable(), but allocate the returned table from heap.
- *
- * PARAMS
- * ppTcpTable [Out] pointer into which the MIB_TCPTABLE is
- * allocated and returned.
- * bOrder [In] whether to sort the table
- * heap [In] heap from which the table is allocated
- * flags [In] flags to HeapAlloc
- *
- * RETURNS
- * ERROR_INVALID_PARAMETER if ppTcpTable is NULL, whatever GetTcpTable()
- * returns otherwise.
- */
-DWORD WINAPI AllocateAndGetTcpTableFromStack( PMIB_TCPTABLE *ppTcpTable, BOOL bOrder,
- HANDLE heap, DWORD flags)
+#include "wine/server.h"
+#define STATUS_SUCCESS 0
+DWORD tcp_build_table(HANDLE heap, DWORD flags, VOID **table, DWORD *table_size, BOOL bOrder,
+ TCP_TABLE_CLASS TableClass)
{
- MIB_TCPTABLE *table;
- MIB_TCPROW row;
- DWORD ret = NO_ERROR, count = 16;
-
- TRACE("table %p, bOrder %d, heap %p, flags 0x%08x\n", ppTcpTable, bOrder, heap, flags);
+ DWORD ret = NO_ERROR, row_size, table_struct_size;
+ MIB_TCPROW_OWNER_PID row;
+ DWORD count = 16;
- if (!ppTcpTable) return ERROR_INVALID_PARAMETER;
+ switch(TableClass)
+ {
+ case TCP_TABLE_BASIC_ALL:
+ row_size = sizeof(MIB_TCPROW);
+ table_struct_size = sizeof(MIB_TCPTABLE)-row_size;
+ break;
+ case TCP_TABLE_OWNER_PID_ALL:
+ row_size = sizeof(MIB_TCPROW_OWNER_PID);
+ table_struct_size = sizeof(MIB_TCPTABLE_OWNER_PID)-row_size;
+ break;
+ default:
+ FIXME("TableClass = %u not supported\n", TableClass);
+ return ERROR_NOT_SUPPORTED;
+ }
- if (!(table = HeapAlloc( heap, flags, FIELD_OFFSET(MIB_TCPTABLE, table[count] ))))
+ if (!(*table = HeapAlloc( heap, flags, table_struct_size+row_size*count )))
return ERROR_OUTOFMEMORY;
- table->dwNumEntries = 0;
+ *(DWORD *)*table = 0;
#ifdef __linux__
{
@@ -1720,14 +1720,86 @@ DWORD WINAPI AllocateAndGetTcpTableFromStack( PMIB_TCPTABLE *ppTcpTable, BOOL bO
ptr = fgets(buf, sizeof(buf), fp);
while ((ptr = fgets(buf, sizeof(buf), fp)))
{
- if (sscanf( ptr, "%x: %x:%x %x:%x %x", &dummy, &row.dwLocalAddr, &row.dwLocalPort,
- &row.dwRemoteAddr, &row.dwRemotePort, &row.u.dwState ) != 6)
+ int inode;
+ int status = 0; /* STATUS_SUCCESS if the corresponding row
+ * has a wine-pid. */
+
+ if (sscanf( ptr, "%x: %x:%x %x:%x %x %*s %*s %*s %*s %*s %d", &dummy, &row.dwLocalAddr, &row.dwLocalPort,
+ &row.dwRemoteAddr, &row.dwRemotePort, &row.dwState, &inode ) != 7)
continue;
- row.dwLocalPort = htons( row.dwLocalPort );
- row.dwRemotePort = htons( row.dwRemotePort );
- row.u.State = TCPStateToMIBState( row.u.dwState );
- if (!(table = append_tcp_row( heap, flags, table, &count, &row )))
- break;
+ if (inode)
+ {
+ char fdDir[40];
+ char socketName[40];
+ DIR *proc;
+ struct dirent *procEnt;
+ int unix_pid=0;
+ sprintf(socketName,"socket:[%d]",inode);
+
+ /* To find the unix PID owning an inode,
+ * we traverse /proc, look inside each
+ * process directory, and read symbolic
+ * links in the fd subdirectory until
+ * we find one that matches socketName.
+ * We then check that this unix_pid
+ * actually corresponds to a wine-pid. */
+
+ if ( (proc = opendir("/proc")))
+ {
+ while ((procEnt = readdir(proc)))
+ {
+ if ((procEnt->d_name[0] >= '0') &&(procEnt->d_name[0] <= '9'))
+ {
+ DIR *fds;
+ struct dirent *ent;
+ sprintf(fdDir, "/proc/%d/fd", atoi(procEnt->d_name));
+ if ((fds = opendir(fdDir)))
+ {
+ while (( ent = readdir(fds) ) )
+ {
+ char fdLinkName[40];
+ char fdName[40];
+ int len;
+ sprintf(fdLinkName, "/proc/%s/fd/%s", procEnt->d_name, ent->d_name);
+ if ( (len = readlink(fdLinkName, fdName, 40)) > 0 )
+ {
+ fdName[len]='\0';
+ if ( (len == strlen(socketName)) && (strncmp(socketName,fdName, len) == 0))
+ {
+ unix_pid = atoi(procEnt->d_name);
+ SERVER_START_REQ( find_process )
+ {
+ req->unix_pid = unix_pid;
+ status = wine_server_call( req );
+ if (status == STATUS_SUCCESS)
+ row.dwOwningPid = reply->pid;
+ }
+ SERVER_END_REQ;
+ if (status == STATUS_SUCCESS)
+ {
+ closedir(fds);
+ closedir(proc);
+ goto found_pid;
+ }
+ }
+ }
+ }
+ closedir(fds);
+ }
+ }
+ }
+ closedir(proc);
+ }
+ }
+found_pid:
+ if (status == STATUS_SUCCESS)
+ {
+ row.dwLocalPort = htons( row.dwLocalPort );
+ row.dwRemotePort = htons( row.dwRemotePort );
+ row.dwState = TCPStateToMIBState( row.dwState );
+ if (!(*table = append_tcp_row( heap, flags, *table, &count, &row, row_size, table_struct_size )))
+ break;
+ }
}
fclose( fp );
}
@@ -1749,8 +1821,8 @@ DWORD WINAPI AllocateAndGetTcpTableFromStack( PMIB_TCPTABLE *ppTcpTable, BOOL bO
row.dwLocalPort = htons( entry->tcpConnLocalPort );
row.dwRemoteAddr = entry->tcpConnRemAddress;
row.dwRemotePort = htons( entry->tcpConnRemPort );
- row.u.dwState = entry->tcpConnState;
- if (!(table = append_tcp_row( heap, flags, table, &count, &row ))) break;
+ row.dwState = entry->tcpConnState;
+ if (!(*table = append_tcp_row( heap, flags, *table, &count, &row, row_size, table_struct_size ))) break;
}
HeapFree( GetProcessHeap(), 0, data );
}
@@ -1828,8 +1900,8 @@ DWORD WINAPI AllocateAndGetTcpTableFromStack( PMIB_TCPTABLE *ppTcpTable, BOOL bO
row.dwLocalPort = pINData->inp_lport;
row.dwRemoteAddr = pINData->inp_faddr.s_addr;
row.dwRemotePort = pINData->inp_fport;
- row.u.State = TCPStateToMIBState (pTCPData->t_state);
- if (!(table = append_tcp_row( heap, flags, table, &count, &row ))) break;
+ row.dwState = TCPStateToMIBState (pTCPData->t_state);
+ if (!(*table = append_tcp_row( heap, flags, *table, &count, &row, row_size, table_struct_size ))) break;
}
done:
@@ -1840,14 +1912,51 @@ DWORD WINAPI AllocateAndGetTcpTableFromStack( PMIB_TCPTABLE *ppTcpTable, BOOL bO
ret = ERROR_NOT_SUPPORTED;
#endif
- if (!table) return ERROR_OUTOFMEMORY;
+ if (!*table) return ERROR_OUTOFMEMORY;
if (!ret)
{
- if (bOrder && table->dwNumEntries)
- qsort( table->table, table->dwNumEntries, sizeof(row), compare_tcp_rows );
- *ppTcpTable = table;
+ DWORD dwNumEntries = *(DWORD *)*table;
+ if (bOrder && dwNumEntries)
+ qsort( (CHAR*)(*table) + sizeof(DWORD), dwNumEntries, row_size, compare_tcp_rows );
+ if (table_size)
+ *table_size = table_struct_size + row_size*dwNumEntries;
}
- else HeapFree( heap, flags, table );
+ else HeapFree( heap, flags, *table );
+ return ret;
+}
+
+
+/******************************************************************
+ * AllocateAndGetTcpTableFromStack (IPHLPAPI.@)
+ *
+ * Get the TCP connection table.
+ * Like GetTcpTable(), but allocate the returned table from heap.
+ *
+ * PARAMS
+ * ppTcpTable [Out] pointer into which the MIB_TCPTABLE is
+ * allocated and returned.
+ * bOrder [In] whether to sort the table
+ * heap [In] heap from which the table is allocated
+ * flags [In] flags to HeapAlloc
+ *
+ * RETURNS
+ * ERROR_INVALID_PARAMETER if ppTcpTable is NULL, whatever GetTcpTable()
+ * returns otherwise.
+ */
+DWORD WINAPI AllocateAndGetTcpTableFromStack( PMIB_TCPTABLE *ppTcpTable, BOOL bOrder,
+ HANDLE heap, DWORD flags)
+{
+ MIB_TCPTABLE *table;
+ DWORD ret;
+
+ TRACE("table %p, bOrder %d, heap %p, flags 0x%08x\n", ppTcpTable, bOrder, heap, flags);
+
+ if (!ppTcpTable) return ERROR_INVALID_PARAMETER;
+
+ ret = tcp_build_table(heap, flags, (VOID **)&table, NULL, bOrder, TCP_TABLE_BASIC_ALL);
+ if (ret == NO_ERROR)
+ *ppTcpTable = table;
+
TRACE( "returning ret %u table %p\n", ret, table );
return ret;
}
diff --git a/dlls/iphlpapi/ipstats.h b/dlls/iphlpapi/ipstats.h
index 3522716..c546512 100644
--- a/dlls/iphlpapi/ipstats.h
+++ b/dlls/iphlpapi/ipstats.h
@@ -27,6 +27,8 @@
#include "winbase.h"
#include "iprtrmib.h"
+DWORD tcp_build_table(HANDLE heap, DWORD flags, VOID **table, DWORD *table_size, BOOL bOrder, TCP_TABLE_CLASS TableClass);
+
/* Fills in entry's interface stats, using name to find them.
* Returns ERROR_INVALID_PARAMETER if name or entry is NULL, NO_ERROR otherwise.
*/
diff --git a/include/wine/server_protocol.h b/include/wine/server_protocol.h
index 0e989da..9851cbb 100644
--- a/include/wine/server_protocol.h
+++ b/include/wine/server_protocol.h
@@ -716,6 +716,20 @@ struct init_thread_reply
+struct find_process_request
+{
+ struct request_header __header;
+ int unix_pid;
+};
+struct find_process_reply
+{
+ struct reply_header __header;
+ process_id_t pid;
+ char __pad_12[4];
+};
+
+
+
struct terminate_process_request
{
struct request_header __header;
@@ -4897,6 +4911,7 @@ enum request
REQ_get_startup_info,
REQ_init_process_done,
REQ_init_thread,
+ REQ_find_process,
REQ_terminate_process,
REQ_terminate_thread,
REQ_get_process_info,
@@ -5151,6 +5166,7 @@ union generic_request
struct get_startup_info_request get_startup_info_request;
struct init_process_done_request init_process_done_request;
struct init_thread_request init_thread_request;
+ struct find_process_request find_process_request;
struct terminate_process_request terminate_process_request;
struct terminate_thread_request terminate_thread_request;
struct get_process_info_request get_process_info_request;
@@ -5403,6 +5419,7 @@ union generic_reply
struct get_startup_info_reply get_startup_info_reply;
struct init_process_done_reply init_process_done_reply;
struct init_thread_reply init_thread_reply;
+ struct find_process_reply find_process_reply;
struct terminate_process_reply terminate_process_reply;
struct terminate_thread_reply terminate_thread_reply;
struct get_process_info_reply get_process_info_reply;
@@ -5646,6 +5663,6 @@ union generic_reply
struct set_suspend_context_reply set_suspend_context_reply;
};
-#define SERVER_PROTOCOL_VERSION 431
+#define SERVER_PROTOCOL_VERSION 432
#endif /* __WINE_WINE_SERVER_PROTOCOL_H */
diff --git a/server/process.c b/server/process.c
index de3b594..2acaf77 100644
--- a/server/process.c
+++ b/server/process.c
@@ -989,6 +989,24 @@ DECL_HANDLER(new_process)
release_object( info );
}
+/* Find a process from the Unix pid */
+DECL_HANDLER(find_process)
+{
+ struct process *process;
+ int i;
+
+ for(i=0; i<used_ptid_entries; i++)
+ {
+ process = (struct process *) ptid_entries[i].ptr;
+ if (process && process->unix_pid == req->unix_pid)
+ {
+ reply->pid = get_process_id( process );
+ return;
+ }
+ }
+ set_error( STATUS_INVALID_PARAMETER );
+}
+
/* Retrieve information about a newly started process */
DECL_HANDLER(get_new_process_info)
{
diff --git a/server/protocol.def b/server/protocol.def
index 80c0cd3..b36b878 100644
--- a/server/protocol.def
+++ b/server/protocol.def
@@ -695,6 +695,14 @@ typedef union
@END
+/* Find a process from the Unix pid */
+@REQ(find_process)
+ int unix_pid; /* Unix pid of the process */
+@REPLY
+ process_id_t pid; /* Wine process id of the process */
+@END
+
+
/* Terminate a process */
@REQ(terminate_process)
obj_handle_t handle; /* process handle to terminate */
diff --git a/server/request.h b/server/request.h
index 5b45cf9..8d59a46 100644
--- a/server/request.h
+++ b/server/request.h
@@ -117,6 +117,7 @@ DECL_HANDLER(new_thread);
DECL_HANDLER(get_startup_info);
DECL_HANDLER(init_process_done);
DECL_HANDLER(init_thread);
+DECL_HANDLER(find_process);
DECL_HANDLER(terminate_process);
DECL_HANDLER(terminate_thread);
DECL_HANDLER(get_process_info);
@@ -370,6 +371,7 @@ static const req_handler req_handlers[REQ_NB_REQUESTS] =
(req_handler)req_get_startup_info,
(req_handler)req_init_process_done,
(req_handler)req_init_thread,
+ (req_handler)req_find_process,
(req_handler)req_terminate_process,
(req_handler)req_terminate_thread,
(req_handler)req_get_process_info,
@@ -696,6 +698,10 @@ C_ASSERT( FIELD_OFFSET(struct init_thread_reply, info_size) == 24 );
C_ASSERT( FIELD_OFFSET(struct init_thread_reply, version) == 28 );
C_ASSERT( FIELD_OFFSET(struct init_thread_reply, all_cpus) == 32 );
C_ASSERT( sizeof(struct init_thread_reply) == 40 );
+C_ASSERT( FIELD_OFFSET(struct find_process_request, unix_pid) == 12 );
+C_ASSERT( sizeof(struct find_process_request) == 16 );
+C_ASSERT( FIELD_OFFSET(struct find_process_reply, pid) == 8 );
+C_ASSERT( sizeof(struct find_process_reply) == 16 );
C_ASSERT( FIELD_OFFSET(struct terminate_process_request, handle) == 12 );
C_ASSERT( FIELD_OFFSET(struct terminate_process_request, exit_code) == 16 );
C_ASSERT( sizeof(struct terminate_process_request) == 24 );
diff --git a/server/trace.c b/server/trace.c
index cfef963..5b0c85e 100644
--- a/server/trace.c
+++ b/server/trace.c
@@ -1100,6 +1100,16 @@ static void dump_init_thread_reply( const struct init_thread_reply *req )
fprintf( stderr, ", all_cpus=%08x", req->all_cpus );
}
+static void dump_find_process_request( const struct find_process_request *req )
+{
+ fprintf( stderr, " unix_pid=%d", req->unix_pid );
+}
+
+static void dump_find_process_reply( const struct find_process_reply *req )
+{
+ fprintf( stderr, " pid=%04x", req->pid );
+}
+
static void dump_terminate_process_request( const struct terminate_process_request *req )
{
fprintf( stderr, " handle=%04x", req->handle );
@@ -3920,6 +3930,7 @@ static const dump_func req_dumpers[REQ_NB_REQUESTS] = {
(dump_func)dump_get_startup_info_request,
(dump_func)dump_init_process_done_request,
(dump_func)dump_init_thread_request,
+ (dump_func)dump_find_process_request,
(dump_func)dump_terminate_process_request,
(dump_func)dump_terminate_thread_request,
(dump_func)dump_get_process_info_request,
@@ -4170,6 +4181,7 @@ static const dump_func reply_dumpers[REQ_NB_REQUESTS] = {
(dump_func)dump_get_startup_info_reply,
NULL,
(dump_func)dump_init_thread_reply,
+ (dump_func)dump_find_process_reply,
(dump_func)dump_terminate_process_reply,
(dump_func)dump_terminate_thread_reply,
(dump_func)dump_get_process_info_reply,
@@ -4420,6 +4432,7 @@ static const char * const req_names[REQ_NB_REQUESTS] = {
"get_startup_info",
"init_process_done",
"init_thread",
+ "find_process",
"terminate_process",
"terminate_thread",
"get_process_info",
--
1.7.3.4

View File

@ -0,0 +1,41 @@
diff --git a/dlls/msvcr100/msvcr100.spec b/dlls/msvcr100/msvcr100.spec
index 99d6c3d..3e57e47 100644
--- a/dlls/msvcr100/msvcr100.spec
+++ b/dlls/msvcr100/msvcr100.spec
@@ -459,7 +459,7 @@
@ cdecl __p__wenviron() msvcrt.__p__wenviron
@ cdecl __p__wpgmptr() msvcrt.__p__wpgmptr
@ cdecl __pctype_func() msvcrt.__pctype_func
-### extern __pioinfo #don't forward to msvcrt.__pioinfo, it has different size
+@ extern __pioinfo msvcrt.__pioinfo
@ stub __pwctype_func
@ cdecl __pxcptinfoptrs() msvcrt.__pxcptinfoptrs
@ stub __report_gsfailure
diff --git a/dlls/msvcr80/msvcr80.spec b/dlls/msvcr80/msvcr80.spec
index ca284bf..f41b0da 100644
--- a/dlls/msvcr80/msvcr80.spec
+++ b/dlls/msvcr80/msvcr80.spec
@@ -283,7 +283,7 @@
@ cdecl __p__winver() msvcrt.__p__winver
@ cdecl __p__wpgmptr() msvcrt.__p__wpgmptr
@ cdecl __pctype_func() msvcrt.__pctype_func
-### extern __pioinfo #don't forward to msvcrt.__pioinfo, it has different size
+@ extern __pioinfo msvcrt.__pioinfo
@ stub __pwctype_func
@ cdecl __pxcptinfoptrs() msvcrt.__pxcptinfoptrs
@ stub __report_gsfailure
diff --git a/dlls/msvcr90/msvcr90.spec b/dlls/msvcr90/msvcr90.spec
index 2ede2cc..2bba469 100644
--- a/dlls/msvcr90/msvcr90.spec
+++ b/dlls/msvcr90/msvcr90.spec
@@ -275,7 +275,7 @@
@ cdecl __p__wenviron() msvcrt.__p__wenviron
@ cdecl __p__wpgmptr() msvcrt.__p__wpgmptr
@ cdecl __pctype_func() msvcrt.__pctype_func
-### extern __pioinfo #don't forward to msvcrt.__pioinfo, it has different size
+@ extern __pioinfo msvcrt.__pioinfo
@ stub __pwctype_func
@ cdecl __pxcptinfoptrs() msvcrt.__pxcptinfoptrs
@ stub __report_gsfailure
--
1.7.9.5

View File

@ -1,8 +1,179 @@
From d10e1f620b180d2bf480cc21f5d58a1c915a1489 Mon Sep 17 00:00:00 2001
From: Stefan Reimer <it@startux.de>
Date: Sun, 29 Apr 2012 14:10:12 -0700
Subject: [PATCH] Pulseaudio V17
---
configure | 97 +-
configure.ac | 31 +-
dlls/mmdevapi/main.c | 2 +-
dlls/winepulse.drv/Makefile.in | 9 +
dlls/winepulse.drv/mmdevdrv.c | 3101 +++++++++++++++++++++++++++++++++
dlls/winepulse.drv/winepulse.drv.spec | 5 +
6 files changed, 3240 insertions(+), 5 deletions(-)
create mode 100644 dlls/winepulse.drv/Makefile.in
create mode 100644 dlls/winepulse.drv/mmdevdrv.c
create mode 100644 dlls/winepulse.drv/winepulse.drv.spec
diff --git a/configure b/configure
index 46827c1..a9f0b1e 100755
--- a/configure
+++ b/configure
@@ -629,6 +629,8 @@ OSS4INCL
ALSALIBS
GSTREAMER_INCL
GSTREAMER_LIBS
+PULSEINCL
+PULSELIBS
LIBGETTEXTPO
ZLIB
FREETYPEINCL
@@ -805,6 +807,7 @@ with_openssl
with_oss
with_png
with_pthread
+with_pulse
with_sane
with_tiff
with_v4l
@@ -1495,6 +1498,7 @@ Optional Packages:
--without-oss do not use the OSS sound support
--without-png do not use PNG
--without-pthread do not use the pthread library
+ --without-pulse do not use PulseAudio sound support
--without-sane do not use SANE (scanner support)
--without-tiff do not use TIFF
--without-v4l do not use v4l1 (v4l support)
@@ -2679,6 +2683,12 @@ if test "${with_pthread+set}" = set; then :
fi
+# Check whether --with-pulse was given.
+if test "${with_pulse+set}" = set; then :
+ withval=$with_pulse;
+fi
+
+
# Check whether --with-sane was given.
if test "${with_sane+set}" = set; then :
withval=$with_sane;
@@ -10613,6 +10623,87 @@ esac
fi
fi
+PULSELIBS=""
+
+PULSEINCL=""
+
+if test "x$with_pulse" != "xno";
+then
+ ac_save_CPPFLAGS="$CPPFLAGS"
+ if test "$PKG_CONFIG" != "false";
+ then
+ ac_pulse_libs="`$PKG_CONFIG --libs libpulse 2>/dev/null`"
+ ac_pulse_cflags="`$PKG_CONFIG --cflags-only-I libpulse 2>/dev/null`"
+
+ CPPFLAGS="$CPPFLAGS $ac_pulse_cflags"
+ for ac_header in pulse/pulseaudio.h
+do :
+ ac_fn_c_check_header_mongrel "$LINENO" "pulse/pulseaudio.h" "ac_cv_header_pulse_pulseaudio_h" "$ac_includes_default"
+if test "x$ac_cv_header_pulse_pulseaudio_h" = xyes; then :
+ cat >>confdefs.h <<_ACEOF
+#define HAVE_PULSE_PULSEAUDIO_H 1
+_ACEOF
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pa_stream_is_corked in -lpulse" >&5
+$as_echo_n "checking for pa_stream_is_corked in -lpulse... " >&6; }
+if ${ac_cv_lib_pulse_pa_stream_is_corked+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ ac_check_lib_save_LIBS=$LIBS
+LIBS="-lpulse $ac_pulse_libs $LIBS"
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+/* Override any GCC internal prototype to avoid an error.
+ Use char because int might match the return type of a GCC
+ builtin and then its argument prototype would still apply. */
+#ifdef __cplusplus
+extern "C"
+#endif
+char pa_stream_is_corked ();
+int
+main ()
+{
+return pa_stream_is_corked ();
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+ ac_cv_lib_pulse_pa_stream_is_corked=yes
+else
+ ac_cv_lib_pulse_pa_stream_is_corked=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pulse_pa_stream_is_corked" >&5
+$as_echo "$ac_cv_lib_pulse_pa_stream_is_corked" >&6; }
+if test "x$ac_cv_lib_pulse_pa_stream_is_corked" = xyes; then :
+
+$as_echo "#define HAVE_PULSEAUDIO 1" >>confdefs.h
+
+ PULSELIBS="$ac_pulse_libs"
+ PULSEINCL="$ac_pulse_cflags"
+fi
+
+
+fi
+
+done
+
+ fi
+ CPPFLAGS="$ac_save_CPPFLAGS"
+fi
+if test "$ac_cv_lib_pulse_pa_stream_is_corked" != "yes"; then :
+ case "x$with_pulse" in
+ x) as_fn_append wine_warnings "|libpulse ${notice_platform}development files not found or too old, Pulse won't be supported." ;;
+ xno) ;;
+ *) as_fn_error $? "libpulse ${notice_platform}development files not found or too old, Pulse won't be supported.
+This is an error since --with-pulse was requested." "$LINENO" 5 ;;
+esac
+fi
+
if test "x$with_gstreamer" != "xno"
then
ac_save_CPPFLAGS="$CPPFLAGS"
@@ -11872,12 +11963,13 @@ fi
test -n "$ALSALIBS" || enable_winealsa_drv=${enable_winealsa_drv:-no}
test -n "$COREAUDIO" || enable_winecoreaudio_drv=${enable_winecoreaudio_drv:-no}
+test -n "$PULSELIBS" || enable_winepulse_drv=${enable_winepulse_drv:-no}
test "x$ac_cv_member_oss_sysinfo_numaudioengines" = xyes || enable_wineoss_drv=${enable_wineoss_drv:-no}
test "$ac_cv_header_linux_joystick_h" = "yes" || enable_winejoystick_drv=${enable_winejoystick_drv:-no}
-if test "x$ALSALIBS$COREAUDIO" = "x" -a \
+if test "x$ALSALIBS$COREAUDIO$PULSELIBS" = "x" -a \
"x$ac_cv_member_oss_sysinfo_numaudioengines" != xyes -a \
- "x$with_alsa$with_coreaudio$with_oss" != xnonono
+ "x$with_alsa$with_coreaudio$with_oss$with_pulse" != xnononono
then
as_fn_append wine_warnings "|No sound system was found. Windows applications will be silent."
fi
@@ -15402,6 +15494,7 @@ wine_fn_config_dll winemp3.acm enable_winemp3_acm
wine_fn_config_dll wineoss.drv enable_wineoss_drv
wine_fn_config_dll wineps.drv enable_wineps_drv install-lib,po
wine_fn_config_dll wineps16.drv16 enable_win16
+wine_fn_config_dll winepulse.drv enable_winepulse_drv
wine_fn_config_dll wineqtdecoder enable_wineqtdecoder
wine_fn_config_dll winequartz.drv enable_winequartz_drv
wine_fn_config_dll winex11.drv enable_winex11_drv
diff --git a/configure.ac b/configure.ac
index 3fd320e..1c7281a 100644
index efc03af..d9bd62b 100644
--- a/configure.ac
+++ b/configure.ac
@@ -75,6 +75,7 @@ AC_ARG_WITH(png, AS_HELP_STRING([--without-png],[do not use PNG]),
@@ -74,6 +74,7 @@ AC_ARG_WITH(png, AS_HELP_STRING([--without-png],[do not use PNG]),
[if test "x$withval" = "xno"; then ac_cv_header_png_h=no; fi])
AC_ARG_WITH(pthread, AS_HELP_STRING([--without-pthread],[do not use the pthread library]),
[if test "x$withval" = "xno"; then ac_cv_header_pthread_h=no; fi])
@ -10,7 +181,7 @@ index 3fd320e..1c7281a 100644
AC_ARG_WITH(sane, AS_HELP_STRING([--without-sane],[do not use SANE (scanner support)]))
AC_ARG_WITH(tiff, AS_HELP_STRING([--without-tiff],[do not use TIFF]),
[if test "x$withval" = "xno"; then ac_cv_header_tiffio_h=no; fi])
@@ -1464,6 +1465,30 @@ then
@@ -1474,6 +1475,30 @@ then
[GetText ${notice_platform}development files not found (or too old), po files can't be rebuilt.])
fi
@ -41,7 +212,7 @@ index 3fd320e..1c7281a 100644
dnl **** Check for gstreamer ****
if test "x$with_gstreamer" != "xno"
then
@@ -1670,13 +1695,14 @@ WINE_CHECK_SONAME(odbc,SQLConnect,,[AC_DEFINE_UNQUOTED(SONAME_LIBODBC,["libodbc.
@@ -1680,13 +1705,14 @@ WINE_CHECK_SONAME(odbc,SQLConnect,,[AC_DEFINE_UNQUOTED(SONAME_LIBODBC,["libodbc.
dnl **** Disable unsupported winmm drivers ****
test -n "$ALSALIBS" || enable_winealsa_drv=${enable_winealsa_drv:-no}
test -n "$COREAUDIO" || enable_winecoreaudio_drv=${enable_winecoreaudio_drv:-no}
@ -58,7 +229,7 @@ index 3fd320e..1c7281a 100644
then
WINE_WARNING([No sound system was found. Windows applications will be silent.])
fi
@@ -2888,6 +2914,7 @@ WINE_CONFIG_DLL(winemp3.acm)
@@ -2908,6 +2934,7 @@ WINE_CONFIG_DLL(winemp3.acm)
WINE_CONFIG_DLL(wineoss.drv)
WINE_CONFIG_DLL(wineps.drv,,[install-lib,po])
WINE_CONFIG_DLL(wineps16.drv16,enable_win16)
@ -96,10 +267,10 @@ index 0000000..0f595f1
+@MAKE_DLL_RULES@
diff --git a/dlls/winepulse.drv/mmdevdrv.c b/dlls/winepulse.drv/mmdevdrv.c
new file mode 100644
index 0000000..50dcd4a
index 0000000..5cc460f
--- /dev/null
+++ b/dlls/winepulse.drv/mmdevdrv.c
@@ -0,0 +1,3018 @@
@@ -0,0 +1,3101 @@
+/*
+ * Copyright 2011-2012 Maarten Lankhorst
+ * Copyright 2010-2011 Maarten Lankhorst for CodeWeavers
@ -161,6 +332,7 @@ index 0000000..50dcd4a
+#define NULL_PTR_ERR MAKE_HRESULT(SEVERITY_ERROR, FACILITY_WIN32, RPC_X_NULL_REF_POINTER)
+
+WINE_DEFAULT_DEBUG_CHANNEL(pulse);
+WINE_DECLARE_DEBUG_CHANNEL(winediag);
+
+static const REFERENCE_TIME MinimumPeriod = 30000;
+static const REFERENCE_TIME DefaultPeriod = 100000;
@ -183,6 +355,13 @@ index 0000000..50dcd4a
+ 'W','i','n','e','\\','P','u','l','s','e',0};
+const WCHAR pulse_streamW[] = { 'S','t','r','e','a','m','V','o','l',0 };
+
+static GUID pulse_render_guid =
+{ 0xfd47d9cc, 0x4218, 0x4135, { 0x9c, 0xe2, 0x0c, 0x19, 0x5c, 0x87, 0x40, 0x5b } };
+static GUID pulse_capture_guid =
+{ 0x25da76d0, 0x033c, 0x4235, { 0x90, 0x02, 0x19, 0xf4, 0x88, 0x94, 0xac, 0x6f } };
+
+static HANDLE warn_once;
+
+BOOL WINAPI DllMain(HINSTANCE dll, DWORD reason, void *reserved)
+{
+ if (reason == DLL_PROCESS_ATTACH) {
@ -201,7 +380,10 @@ index 0000000..50dcd4a
+ }
+ if (pulse_ml)
+ pa_mainloop_quit(pulse_ml, 0);
+ CloseHandle(pulse_thread);
+ if (pulse_thread)
+ CloseHandle(pulse_thread);
+ if (warn_once)
+ CloseHandle(warn_once);
+ }
+ return TRUE;
+}
@ -698,10 +880,11 @@ index 0000000..50dcd4a
+ dst = p->data;
+ while (rem) {
+ pa_stream_peek(This->stream, (const void**)&src, &src_len);
+ assert(src_len && src_len <= bytes);
+ assert(src_len);
+ assert(This->peek_ofs < src_len);
+ src += This->peek_ofs;
+ src_len -= This->peek_ofs;
+ assert(src_len <= bytes);
+
+ copy = rem;
+ if (copy > src_len)
@ -729,9 +912,10 @@ index 0000000..50dcd4a
+ while (rem) {
+ const void *src;
+ pa_stream_peek(This->stream, &src, &src_len);
+ assert(src_len && src_len <= bytes);
+ assert(src_len);
+ assert(This->peek_ofs < src_len);
+ src_len -= This->peek_ofs;
+ assert(src_len <= bytes);
+
+ copy = rem;
+ if (copy > src_len)
@ -769,6 +953,13 @@ index 0000000..50dcd4a
+ SetEvent(This->event);
+}
+
+static void pulse_stream_state(pa_stream *s, void *user)
+{
+ pa_stream_state_t state = pa_stream_get_state(s);
+ TRACE("Stream state changed to %i\n", state);
+ pthread_cond_signal(&pulse_cond);
+}
+
+static HRESULT pulse_stream_connect(ACImpl *This, UINT32 period_bytes) {
+ int ret;
+ char buffer[64];
@ -816,14 +1007,7 @@ index 0000000..50dcd4a
+ return S_OK;
+}
+
+static void pulse_stream_state(pa_stream *s, void *user)
+{
+ pa_stream_state_t state = pa_stream_get_state(s);
+ TRACE("Stream state changed to %i\n", state);
+ pthread_cond_signal(&pulse_cond);
+}
+
+HRESULT WINAPI AUDDRV_GetEndpointIDs(EDataFlow flow, WCHAR ***ids, void ***keys,
+HRESULT WINAPI AUDDRV_GetEndpointIDs(EDataFlow flow, const WCHAR ***ids, GUID **keys,
+ UINT *num, UINT *def_index)
+{
+ HRESULT hr = S_OK;
@ -837,20 +1021,21 @@ index 0000000..50dcd4a
+ *num = 1;
+ *def_index = 0;
+
+ *ids = HeapAlloc(GetProcessHeap(), 0, sizeof(WCHAR *));
+ *ids = HeapAlloc(GetProcessHeap(), 0, sizeof(**ids));
+ if (!*ids)
+ return E_OUTOFMEMORY;
+ (*ids)[0] = defaultW;
+
+ (*ids)[0] = HeapAlloc(GetProcessHeap(), 0, sizeof(defaultW));
+ if (!(*ids)[0]) {
+ *keys = HeapAlloc(GetProcessHeap(), 0, sizeof(**keys));
+ if (!*keys) {
+ HeapFree(GetProcessHeap(), 0, *ids);
+ *ids = NULL;
+ return E_OUTOFMEMORY;
+ }
+
+ lstrcpyW((*ids)[0], defaultW);
+
+ *keys = HeapAlloc(GetProcessHeap(), 0, sizeof(void *));
+ (*keys)[0] = NULL;
+ if (flow == eRender)
+ (*keys)[0] = pulse_render_guid;
+ else
+ (*keys)[0] = pulse_capture_guid;
+
+ return S_OK;
+}
@ -858,21 +1043,40 @@ index 0000000..50dcd4a
+int WINAPI AUDDRV_GetPriority(void)
+{
+ HRESULT hr;
+ if (getenv("WINENOPULSE")) {
+ FIXME_(winediag)("winepulse has been temporarily disabled through the environment\n");
+ return 0;
+ }
+ pthread_mutex_lock(&pulse_lock);
+ hr = pulse_connect();
+ pthread_mutex_unlock(&pulse_lock);
+ return SUCCEEDED(hr) ? 3 : 0;
+}
+
+HRESULT WINAPI AUDDRV_GetAudioEndpoint(void *key, IMMDevice *dev,
+ EDataFlow dataflow, IAudioClient **out)
+HRESULT WINAPI AUDDRV_GetAudioEndpoint(GUID *guid, IMMDevice *dev, IAudioClient **out)
+{
+ HRESULT hr;
+ ACImpl *This;
+ int i;
+ EDataFlow dataflow;
+
+ TRACE("%p %p %d %p\n", key, dev, dataflow, out);
+ if (dataflow != eRender && dataflow != eCapture)
+ /* Give one visible warning per session
+ * Sadly wine has chosen not to accept the winepulse patch, so support ourselves
+ */
+ if (!warn_once && (warn_once = CreateEventA(0, 0, 0, "__winepulse_warn_event")) && GetLastError() != ERROR_ALREADY_EXISTS) {
+ FIXME_(winediag)("Winepulse is not officially supported by the wine project\n");
+ FIXME_(winediag)("For sound related feedback and support, please visit http://ubuntuforums.org/showthread.php?t=1960599\n");
+ } else {
+ WARN_(winediag)("Winepulse is not officially supported by the wine project\n");
+ WARN_(winediag)("For sound related feedback and support, please visit http://ubuntuforums.org/showthread.php?t=1960599\n");
+ }
+
+ TRACE("%s %p %p\n", debugstr_guid(guid), dev, out);
+ if (IsEqualGUID(guid, &pulse_render_guid))
+ dataflow = eRender;
+ else if (IsEqualGUID(guid, &pulse_capture_guid))
+ dataflow = eCapture;
+ else
+ return E_UNEXPECTED;
+
+ *out = NULL;
@ -1047,7 +1251,6 @@ index 0000000..50dcd4a
+ return 0;
+}
+
+
+static void session_init_vols(AudioSession *session, UINT channels)
+{
+ if (session->channel_count < channels) {
@ -1146,6 +1349,8 @@ index 0000000..50dcd4a
+ This->ss.format = PA_SAMPLE_U8;
+ else if (fmt->wBitsPerSample == 16)
+ This->ss.format = PA_SAMPLE_S16LE;
+ else
+ return AUDCLNT_E_UNSUPPORTED_FORMAT;
+ pa_channel_map_init_auto(&This->map, fmt->nChannels, PA_CHANNEL_MAP_ALSA);
+ break;
+ case WAVE_FORMAT_EXTENSIBLE: {
@ -1182,13 +1387,16 @@ index 0000000..50dcd4a
+ This->ss.format = PA_SAMPLE_S24_32LE;
+ else if (valid == 32)
+ This->ss.format = PA_SAMPLE_S32LE;
+ default:
+ break;
+ default:
+ return AUDCLNT_E_UNSUPPORTED_FORMAT;
+ }
+ }
+ This->map.channels = fmt->nChannels;
+ if (!mask)
+ if (!mask || mask == SPEAKER_ALL)
+ mask = get_channel_mask(fmt->nChannels);
+ else if (mask == ~0U && fmt->nChannels == 1)
+ mask = SPEAKER_FRONT_CENTER;
+ for (j = 0; j < sizeof(pulse_pos_from_wfx)/sizeof(*pulse_pos_from_wfx) && i < fmt->nChannels; ++j) {
+ if (mask & (1 << j))
+ This->map.map[i++] = pulse_pos_from_wfx[j];
@ -1198,19 +1406,29 @@ index 0000000..50dcd4a
+ if (mask == SPEAKER_FRONT_CENTER)
+ This->map.map[0] = PA_CHANNEL_POSITION_MONO;
+
+ if ((mask & SPEAKER_ALL) && i < fmt->nChannels) {
+ This->map.map[i++] = PA_CHANNEL_POSITION_MONO;
+ FIXME("Is the 'all' channel mapped correctly?\n");
+ }
+
+ if (i < fmt->nChannels || (mask & SPEAKER_RESERVED)) {
+ This->map.channels = 0;
+ ERR("Invalid channel mask: %i/%i and %x\n", i, fmt->nChannels, mask);
+ ERR("Invalid channel mask: %i/%i and %x(%x)\n", i, fmt->nChannels, mask, wfe->dwChannelMask);
+ break;
+ }
+ break;
+ }
+ default: FIXME("Unhandled tag %x\n", fmt->wFormatTag);
+ case WAVE_FORMAT_ALAW:
+ case WAVE_FORMAT_MULAW:
+ if (fmt->wBitsPerSample != 8) {
+ FIXME("Unsupported bpp %u for LAW\n", fmt->wBitsPerSample);
+ return AUDCLNT_E_UNSUPPORTED_FORMAT;
+ }
+ if (fmt->nChannels != 1 && fmt->nChannels != 2) {
+ FIXME("Unsupported channels %u for LAW\n", fmt->nChannels);
+ return AUDCLNT_E_UNSUPPORTED_FORMAT;
+ }
+ This->ss.format = fmt->wFormatTag == WAVE_FORMAT_MULAW ? PA_SAMPLE_ULAW : PA_SAMPLE_ALAW;
+ pa_channel_map_init_auto(&This->map, fmt->nChannels, PA_CHANNEL_MAP_ALSA);
+ break;
+ default:
+ WARN("Unhandled tag %x\n", fmt->wFormatTag);
+ return AUDCLNT_E_UNSUPPORTED_FORMAT;
+ }
+ This->ss.channels = This->map.channels;
+ if (!pa_channel_map_valid(&This->map) || This->ss.format == PA_SAMPLE_INVALID) {
@ -1448,15 +1666,55 @@ index 0000000..50dcd4a
+ return E_INVALIDARG;
+ if (mode == AUDCLNT_SHAREMODE_EXCLUSIVE)
+ return This->dataflow == eCapture ? AUDCLNT_E_UNSUPPORTED_FORMAT : AUDCLNT_E_EXCLUSIVE_MODE_NOT_ALLOWED;
+ if (fmt->wFormatTag == WAVE_FORMAT_EXTENSIBLE &&
+ fmt->cbSize < sizeof(WAVEFORMATEXTENSIBLE) - sizeof(WAVEFORMATEX))
+ return E_INVALIDARG;
+
+ dump_fmt(fmt);
+
+ switch (fmt->wFormatTag) {
+ case WAVE_FORMAT_EXTENSIBLE:
+ if (fmt->cbSize < sizeof(WAVEFORMATEXTENSIBLE) - sizeof(WAVEFORMATEX))
+ return E_INVALIDARG;
+ dump_fmt(fmt);
+ break;
+ case WAVE_FORMAT_ALAW:
+ case WAVE_FORMAT_MULAW:
+ case WAVE_FORMAT_IEEE_FLOAT:
+ case WAVE_FORMAT_PCM:
+ dump_fmt(fmt);
+ break;
+ default:
+ dump_fmt(fmt);
+ return AUDCLNT_E_UNSUPPORTED_FORMAT;
+ }
+ if (fmt->nChannels == 0)
+ return AUDCLNT_E_UNSUPPORTED_FORMAT;
+ closest = clone_format(fmt);
+ if (!closest)
+ hr = E_OUTOFMEMORY;
+ if (!closest) {
+ if (out)
+ *out = NULL;
+ return E_OUTOFMEMORY;
+ }
+
+ if (fmt->wFormatTag == WAVE_FORMAT_EXTENSIBLE) {
+ UINT32 mask = 0, i, channels = 0;
+ WAVEFORMATEXTENSIBLE *ext = (WAVEFORMATEXTENSIBLE*)closest;
+
+ if ((fmt->nChannels > 1 && ext->dwChannelMask == SPEAKER_ALL) ||
+ (fmt->nChannels == 1 && ext->dwChannelMask == ~0U)) {
+ mask = ext->dwChannelMask;
+ channels = fmt->nChannels;
+ } else if (ext->dwChannelMask) {
+ for (i = 1; !(i & SPEAKER_RESERVED); i <<= 1) {
+ if (i & ext->dwChannelMask) {
+ mask |= i;
+ channels++;
+ }
+ }
+ if (channels < fmt->nChannels)
+ mask = get_channel_mask(fmt->nChannels);
+ } else
+ mask = ext->dwChannelMask;
+ if (ext->dwChannelMask != mask) {
+ ext->dwChannelMask = mask;
+ hr = S_FALSE;
+ }
+ }
+
+ if (hr == S_OK || !out) {
+ CoTaskMemFree(closest);
@ -1708,7 +1966,9 @@ index 0000000..50dcd4a
+ *ppv = &This->IAudioClock_iface;
+ } else if (IsEqualIID(riid, &IID_IAudioStreamVolume)) {
+ *ppv = &This->IAudioStreamVolume_iface;
+ } else {
+ } else if (IsEqualIID(riid, &IID_IAudioSessionControl) ||
+ IsEqualIID(riid, &IID_IChannelAudioVolume) ||
+ IsEqualIID(riid, &IID_ISimpleAudioVolume)) {
+ if (!This->session_wrapper) {
+ This->session_wrapper = AudioSessionWrapper_Create(This);
+ if (!This->session_wrapper)
@ -2669,7 +2929,7 @@ index 0000000..50dcd4a
+ IMMDevice *device;
+} SessionMgr;
+
+HRESULT WINAPI AudioSessionManager_QueryInterface(IAudioSessionManager2 *iface,
+static HRESULT WINAPI AudioSessionManager_QueryInterface(IAudioSessionManager2 *iface,
+ REFIID riid, void **ppv)
+{
+ TRACE("(%p)->(%s, %p)\n", iface, debugstr_guid(riid), ppv);
@ -2696,7 +2956,7 @@ index 0000000..50dcd4a
+ return CONTAINING_RECORD(iface, SessionMgr, IAudioSessionManager2_iface);
+}
+
+ULONG WINAPI AudioSessionManager_AddRef(IAudioSessionManager2 *iface)
+static ULONG WINAPI AudioSessionManager_AddRef(IAudioSessionManager2 *iface)
+{
+ SessionMgr *This = impl_from_IAudioSessionManager2(iface);
+ ULONG ref;
@ -2705,7 +2965,7 @@ index 0000000..50dcd4a
+ return ref;
+}
+
+ULONG WINAPI AudioSessionManager_Release(IAudioSessionManager2 *iface)
+static ULONG WINAPI AudioSessionManager_Release(IAudioSessionManager2 *iface)
+{
+ SessionMgr *This = impl_from_IAudioSessionManager2(iface);
+ ULONG ref;
@ -2716,7 +2976,7 @@ index 0000000..50dcd4a
+ return ref;
+}
+
+HRESULT WINAPI AudioSessionManager_GetAudioSessionControl(
+static HRESULT WINAPI AudioSessionManager_GetAudioSessionControl(
+ IAudioSessionManager2 *iface, const GUID *session_guid, DWORD flags,
+ IAudioSessionControl **out)
+{
@ -2743,7 +3003,7 @@ index 0000000..50dcd4a
+ return S_OK;
+}
+
+HRESULT WINAPI AudioSessionManager_GetSimpleAudioVolume(
+static HRESULT WINAPI AudioSessionManager_GetSimpleAudioVolume(
+ IAudioSessionManager2 *iface, const GUID *session_guid, DWORD flags,
+ ISimpleAudioVolume **out)
+{
@ -2770,7 +3030,7 @@ index 0000000..50dcd4a
+ return S_OK;
+}
+
+HRESULT WINAPI AudioSessionManager_GetSessionEnumerator(
+static HRESULT WINAPI AudioSessionManager_GetSessionEnumerator(
+ IAudioSessionManager2 *iface, IAudioSessionEnumerator **out)
+{
+ SessionMgr *This = impl_from_IAudioSessionManager2(iface);
@ -2778,7 +3038,7 @@ index 0000000..50dcd4a
+ return E_NOTIMPL;
+}
+
+HRESULT WINAPI AudioSessionManager_RegisterSessionNotification(
+static HRESULT WINAPI AudioSessionManager_RegisterSessionNotification(
+ IAudioSessionManager2 *iface, IAudioSessionNotification *notification)
+{
+ SessionMgr *This = impl_from_IAudioSessionManager2(iface);
@ -2786,7 +3046,7 @@ index 0000000..50dcd4a
+ return E_NOTIMPL;
+}
+
+HRESULT WINAPI AudioSessionManager_UnregisterSessionNotification(
+static HRESULT WINAPI AudioSessionManager_UnregisterSessionNotification(
+ IAudioSessionManager2 *iface, IAudioSessionNotification *notification)
+{
+ SessionMgr *This = impl_from_IAudioSessionManager2(iface);
@ -2794,7 +3054,7 @@ index 0000000..50dcd4a
+ return E_NOTIMPL;
+}
+
+HRESULT WINAPI AudioSessionManager_RegisterDuckNotification(
+static HRESULT WINAPI AudioSessionManager_RegisterDuckNotification(
+ IAudioSessionManager2 *iface, const WCHAR *session_id,
+ IAudioVolumeDuckNotification *notification)
+{
@ -2803,7 +3063,7 @@ index 0000000..50dcd4a
+ return E_NOTIMPL;
+}
+
+HRESULT WINAPI AudioSessionManager_UnregisterDuckNotification(
+static HRESULT WINAPI AudioSessionManager_UnregisterDuckNotification(
+ IAudioSessionManager2 *iface,
+ IAudioVolumeDuckNotification *notification)
+{
@ -2826,7 +3086,6 @@ index 0000000..50dcd4a
+ AudioSessionManager_UnregisterDuckNotification
+};
+
+
+static HRESULT WINAPI SimpleAudioVolume_QueryInterface(
+ ISimpleAudioVolume *iface, REFIID riid, void **ppv)
+{
@ -2942,7 +3201,6 @@ index 0000000..50dcd4a
+ SimpleAudioVolume_GetMute
+};
+
+
+static HRESULT WINAPI ChannelAudioVolume_QueryInterface(
+ IChannelAudioVolume *iface, REFIID riid, void **ppv)
+{
@ -3104,28 +3362,27 @@ index 0000000..50dcd4a
+HRESULT WINAPI AUDDRV_GetAudioSessionManager(IMMDevice *device,
+ IAudioSessionManager2 **out)
+{
+ SessionMgr *This;
+
+ This = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(SessionMgr));
+ SessionMgr *This = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(SessionMgr));
+ *out = NULL;
+ if (!This)
+ return E_OUTOFMEMORY;
+
+ This->IAudioSessionManager2_iface.lpVtbl = &AudioSessionManager2_Vtbl;
+ This->device = device;
+ This->ref = 1;
+
+ *out = &This->IAudioSessionManager2_iface;
+
+ return S_OK;
+}
diff --git a/dlls/winepulse.drv/winepulse.drv.spec b/dlls/winepulse.drv/winepulse.drv.spec
new file mode 100644
index 0000000..a089166
index 0000000..612bf46
--- /dev/null
+++ b/dlls/winepulse.drv/winepulse.drv.spec
@@ -0,0 +1,5 @@
+# MMDevAPI driver functions
+@ stdcall -private GetPriority() AUDDRV_GetPriority
+@ stdcall -private GetEndpointIDs(long ptr ptr ptr ptr) AUDDRV_GetEndpointIDs
+@ stdcall -private GetAudioEndpoint(ptr ptr long ptr) AUDDRV_GetAudioEndpoint
+@ stdcall -private GetAudioEndpoint(ptr ptr ptr) AUDDRV_GetAudioEndpoint
+@ stdcall -private GetAudioSessionManager(ptr ptr) AUDDRV_GetAudioSessionManager
--
1.7.3.4

View File

@ -125,11 +125,14 @@ src_unpack() {
src_prepare() {
epatch "${FILESDIR}"/${PN}-1.1.15-winegcc.patch #260726
epatch "${FILESDIR}"/${PN}-1.4_rc2-multilib-portage.patch #395615
# Pulseaudio
epatch "${FILESDIR}"/pulseaudio.patch
# Diablo3 beta fixes
epatch "${FILESDIR}"/AcceptEX.patch
epatch "${FILESDIR}"/GetExtendedTcpTable.patch
# epatch "${FILESDIR}"/GetExtendedTcpTable.patch
epatch "${FILESDIR}"/reset_stencil.patch
# EVE online
epatch "${FILESDIR}"/msvcr_eve.patch
epatch_user #282735
eautoreconf
sed -i '/^UPDATE_DESKTOP_DATABASE/s:=.*:=true:' tools/Makefile.in || die