diff --git a/patches/dsound-EAX/0001-dsound-Apply-filters-before-sound-is-multiplied-to-s.patch b/patches/dsound-EAX/0001-dsound-Apply-filters-before-sound-is-multiplied-to-s.patch index e5ecc73e..d32ac7ad 100644 --- a/patches/dsound-EAX/0001-dsound-Apply-filters-before-sound-is-multiplied-to-s.patch +++ b/patches/dsound-EAX/0001-dsound-Apply-filters-before-sound-is-multiplied-to-s.patch @@ -1,4 +1,4 @@ -From d09ac9a348309f956a2f3985a1b465b51b6e174c Mon Sep 17 00:00:00 2001 +From 6ef73a30a9f0c7c6775786d4cdba169f95056393 Mon Sep 17 00:00:00 2001 From: Sebastian Lackner Date: Sat, 28 Mar 2015 08:18:10 +0100 Subject: [PATCH] dsound: Apply filters before sound is multiplied to speakers. @@ -11,10 +11,10 @@ Based on a patch by Mark Harmstone. 3 files changed, 81 insertions(+), 36 deletions(-) diff --git a/dlls/dsound/dsound.c b/dlls/dsound/dsound.c -index 0b8edaaaf06..bdf3a824511 100644 +index 7629810db50..4c1c022acb7 100644 --- a/dlls/dsound/dsound.c +++ b/dlls/dsound/dsound.c -@@ -234,6 +234,7 @@ static ULONG DirectSoundDevice_Release(DirectSoundDevice * device) +@@ -236,6 +236,7 @@ static ULONG DirectSoundDevice_Release(DirectSoundDevice * device) if(device->mmdevice) IMMDevice_Release(device->mmdevice); CloseHandle(device->sleepev); @@ -23,10 +23,10 @@ index 0b8edaaaf06..bdf3a824511 100644 free(device->cp_buffer); free(device->buffer); diff --git a/dlls/dsound/dsound_private.h b/dlls/dsound/dsound_private.h -index 124a4311b4c..fe39ca221fa 100644 +index 61323be99d8..c2656ab82f1 100644 --- a/dlls/dsound/dsound_private.h +++ b/dlls/dsound/dsound_private.h -@@ -89,8 +89,8 @@ struct DirectSoundDevice +@@ -90,8 +90,8 @@ struct DirectSoundDevice int speaker_num[DS_MAX_CHANNELS]; int num_speakers; int lfe_channel; @@ -34,14 +34,14 @@ index 124a4311b4c..fe39ca221fa 100644 - DWORD tmp_buffer_len, cp_buffer_len; + float *tmp_buffer, *cp_buffer, *dsp_buffer; + DWORD tmp_buffer_len, cp_buffer_len, dsp_buffer_len; + CO_MTA_USAGE_COOKIE mta_cookie; DSVOLUMEPAN volpan; - diff --git a/dlls/dsound/mixer.c b/dlls/dsound/mixer.c -index c26b19ea8c1..68a45c46d1e 100644 +index 042b9499727..f261588454a 100644 --- a/dlls/dsound/mixer.c +++ b/dlls/dsound/mixer.c -@@ -283,10 +283,9 @@ static inline float get_current_sample(const IDirectSoundBufferImpl *dsb, +@@ -286,10 +286,9 @@ static inline float get_current_sample(const IDirectSoundBufferImpl *dsb, return dsb->get(dsb, buffer + (mixpos % buflen), channel); } @@ -53,7 +53,7 @@ index c26b19ea8c1..68a45c46d1e 100644 UINT committed_samples = 0; DWORD channel, i; -@@ -305,17 +304,16 @@ static UINT cp_fields_noresample(IDirectSoundBufferImpl *dsb, UINT count) +@@ -308,17 +307,16 @@ static UINT cp_fields_noresample(IDirectSoundBufferImpl *dsb, UINT count) for (; i < count; i++) for (channel = 0; channel < dsb->mix_channels; channel++) @@ -74,7 +74,7 @@ index c26b19ea8c1..68a45c46d1e 100644 UINT channels = dsb->mix_channels; LONG64 freqAcc_start = *freqAccNum; -@@ -343,7 +341,7 @@ static UINT cp_fields_resample_lq(IDirectSoundBufferImpl *dsb, UINT count, LONG6 +@@ -346,7 +344,7 @@ static UINT cp_fields_resample_lq(IDirectSoundBufferImpl *dsb, UINT count, LONG6 float s1 = get_current_sample(dsb, dsb->buffer->memory, dsb->buflen, idx, channel); float s2 = get_current_sample(dsb, dsb->buffer->memory, dsb->buflen, idx + istride, channel); float result = s1 * cur_freqAcc2 + s2 * cur_freqAcc; @@ -83,7 +83,7 @@ index c26b19ea8c1..68a45c46d1e 100644 } } -@@ -351,11 +349,11 @@ static UINT cp_fields_resample_lq(IDirectSoundBufferImpl *dsb, UINT count, LONG6 +@@ -354,11 +352,11 @@ static UINT cp_fields_resample_lq(IDirectSoundBufferImpl *dsb, UINT count, LONG6 return max_ipos; } @@ -97,7 +97,7 @@ index c26b19ea8c1..68a45c46d1e 100644 UINT committed_samples = 0; LONG64 freqAcc_start = *freqAccNum; -@@ -430,23 +428,24 @@ static UINT cp_fields_resample_hq(IDirectSoundBufferImpl *dsb, UINT count, LONG6 +@@ -433,23 +431,24 @@ static UINT cp_fields_resample_hq(IDirectSoundBufferImpl *dsb, UINT count, LONG6 float* cache = &intermediate[channel * required_input + ipos]; for (j = 0; j < fir_used; j++) sum += fir_copy[j] * cache[j]; @@ -127,7 +127,7 @@ index c26b19ea8c1..68a45c46d1e 100644 ipos = dsb->sec_mixpos + adv * dsb->pwfx->nBlockAlign; if (ipos >= dsb->buflen) { -@@ -482,6 +481,21 @@ static inline DWORD DSOUND_BufPtrDiff(DWORD buflen, DWORD ptr1, DWORD ptr2) +@@ -485,6 +484,21 @@ static inline DWORD DSOUND_BufPtrDiff(DWORD buflen, DWORD ptr1, DWORD ptr2) return buflen + ptr1 - ptr2; } } @@ -149,7 +149,7 @@ index c26b19ea8c1..68a45c46d1e 100644 /** * Mix at most the given amount of data into the allocated temporary buffer * of the given secondary buffer, starting from the dsb's first currently -@@ -497,31 +511,61 @@ static inline DWORD DSOUND_BufPtrDiff(DWORD buflen, DWORD ptr1, DWORD ptr2) +@@ -500,31 +514,61 @@ static inline DWORD DSOUND_BufPtrDiff(DWORD buflen, DWORD ptr1, DWORD ptr2) */ static void DSOUND_MixToTemporary(IDirectSoundBufferImpl *dsb, DWORD frames) { @@ -180,12 +180,22 @@ index c26b19ea8c1..68a45c46d1e 100644 + } + if(dsb->put_aux == putieee32_sum) + memset(dsb->device->tmp_buffer, 0, dsb->device->tmp_buffer_len); -+ + +- if (size_bytes > 0) { +- for (i = 0; i < dsb->num_filters; i++) { +- if (dsb->filters[i].inplace) { +- hr = IMediaObjectInPlace_Process(dsb->filters[i].inplace, size_bytes, (BYTE*)dsb->device->tmp_buffer, 0, DMO_INPLACE_NORMAL); + if (using_filters) { + put = putieee32_dsp; + ostride = dsb->mix_channels * sizeof(float); + size_bytes = frames * ostride; -+ + +- if (FAILED(hr)) +- WARN("IMediaObjectInPlace_Process failed for filter %u\n", i); +- } else +- WARN("filter %u has no inplace object - unsupported\n", i); +- } +- } + if (dsb->device->dsp_buffer_len < size_bytes || !dsb->device->dsp_buffer) { + if (dsb->device->dsp_buffer) + dsb->device->dsp_buffer = HeapReAlloc(GetProcessHeap(), 0, dsb->device->dsp_buffer, size_bytes); @@ -194,11 +204,7 @@ index c26b19ea8c1..68a45c46d1e 100644 + dsb->device->dsp_buffer_len = size_bytes; + } + } - -- if (size_bytes > 0) { -- for (i = 0; i < dsb->num_filters; i++) { -- if (dsb->filters[i].inplace) { -- hr = IMediaObjectInPlace_Process(dsb->filters[i].inplace, size_bytes, (BYTE*)dsb->device->tmp_buffer, 0, DMO_INPLACE_NORMAL); ++ + cp_fields(dsb, put, ostride, frames, &dsb->freqAccNum); + + if (using_filters) { @@ -213,13 +219,7 @@ index c26b19ea8c1..68a45c46d1e 100644 + WARN("filter %lu has no inplace object - unsupported\n", i); + } + } - -- if (FAILED(hr)) -- WARN("IMediaObjectInPlace_Process failed for filter %u\n", i); -- } else -- WARN("filter %u has no inplace object - unsupported\n", i); -- } -- } ++ + istride = ostride; + ostride = dsb->device->pwfx->nChannels * sizeof(float); + for (i = 0; i < frames; i++) { @@ -232,5 +232,5 @@ index c26b19ea8c1..68a45c46d1e 100644 static void DSOUND_MixerVol(const IDirectSoundBufferImpl *dsb, INT frames) -- -2.39.2 +2.43.0 diff --git a/patches/server-PeekMessage/0001-server-Fix-handling-of-GetMessage-after-previous-Pee.patch b/patches/server-PeekMessage/0001-server-Fix-handling-of-GetMessage-after-previous-Pee.patch index 93a8aeef..e31b0cfe 100644 --- a/patches/server-PeekMessage/0001-server-Fix-handling-of-GetMessage-after-previous-Pee.patch +++ b/patches/server-PeekMessage/0001-server-Fix-handling-of-GetMessage-after-previous-Pee.patch @@ -1,4 +1,4 @@ -From 7685969c358fbfb68d623d6eb4fc80231f07b604 Mon Sep 17 00:00:00 2001 +From 898c8d269bdcda704a2a923349d2a1967a1f23eb Mon Sep 17 00:00:00 2001 From: Sebastian Lackner Date: Sun, 15 Mar 2015 01:05:48 +0100 Subject: [PATCH] server: Fix handling of GetMessage after previous PeekMessage @@ -15,10 +15,10 @@ Changes in v3: 2 files changed, 65 insertions(+), 17 deletions(-) diff --git a/dlls/user32/tests/msg.c b/dlls/user32/tests/msg.c -index 0059afcbac7..cf01e156458 100644 +index 1169d82271c..bee49c302cb 100644 --- a/dlls/user32/tests/msg.c +++ b/dlls/user32/tests/msg.c -@@ -14113,13 +14113,10 @@ static void test_PeekMessage3(void) +@@ -14329,13 +14329,10 @@ static void test_PeekMessage3(void) ok(msg.message == WM_TIMER, "msg.message = %u instead of WM_TIMER\n", msg.message); PostMessageA(hwnd, WM_USER, 0, 0); ret = PeekMessageA(&msg, hwnd, 0, 0, PM_NOREMOVE); @@ -32,7 +32,7 @@ index 0059afcbac7..cf01e156458 100644 ok(ret && msg.message == WM_USER, "msg.message = %u instead of WM_USER\n", msg.message); ret = PeekMessageA(&msg, hwnd, 0, 0, 0); ok(!ret, "expected PeekMessage to return FALSE, got %u\n", ret); -@@ -14129,10 +14126,8 @@ static void test_PeekMessage3(void) +@@ -14345,10 +14342,8 @@ static void test_PeekMessage3(void) ok(msg.message == WM_TIMER, "msg.message = %u instead of WM_TIMER\n", msg.message); PostMessageA(hwnd, WM_USER, 0, 0); ret = PeekMessageA(&msg, hwnd, 0, 0, PM_REMOVE); @@ -43,7 +43,7 @@ index 0059afcbac7..cf01e156458 100644 ok(ret && msg.message == WM_USER, "msg.message = %u instead of WM_USER\n", msg.message); ret = PeekMessageA(&msg, hwnd, 0, 0, 0); ok(!ret, "expected PeekMessage to return FALSE, got %u\n", ret); -@@ -14144,10 +14139,11 @@ static void test_PeekMessage3(void) +@@ -14360,10 +14355,11 @@ static void test_PeekMessage3(void) ok(msg.message == WM_TIMER, "msg.message = %u instead of WM_TIMER\n", msg.message); PostMessageA(hwnd, WM_USER, 0, 0); ret = GetMessageA(&msg, hwnd, 0, 0); @@ -57,7 +57,7 @@ index 0059afcbac7..cf01e156458 100644 ok(ret && msg.message == WM_USER, "msg.message = %u instead of WM_USER\n", msg.message); ret = PeekMessageA(&msg, hwnd, 0, 0, 0); ok(!ret, "expected PeekMessage to return FALSE, got %u\n", ret); -@@ -14175,14 +14171,32 @@ static void test_PeekMessage3(void) +@@ -14391,14 +14387,32 @@ static void test_PeekMessage3(void) ret = GetMessageA(&msg, hwnd, 0, 0); ok(ret && msg.message == WM_USER, "msg.message = %u instead of WM_USER\n", msg.message); ret = GetMessageA(&msg, hwnd, 0, 0); @@ -93,10 +93,10 @@ index 0059afcbac7..cf01e156458 100644 * because both messages are in the same queue. */ diff --git a/server/queue.c b/server/queue.c -index 9007438e082..1d7a31a318a 100644 +index ed099b3b989..35926b701af 100644 --- a/server/queue.c +++ b/server/queue.c -@@ -142,6 +142,7 @@ struct msg_queue +@@ -145,6 +145,7 @@ struct msg_queue struct hook_table *hooks; /* hook table */ timeout_t last_get_msg; /* time of last get message call */ int keystate_lock; /* owns an input keystate lock */ @@ -104,7 +104,7 @@ index 9007438e082..1d7a31a318a 100644 }; struct hotkey -@@ -310,6 +311,7 @@ static struct msg_queue *create_msg_queue( struct thread *thread, struct thread_ +@@ -313,6 +314,7 @@ static struct msg_queue *create_msg_queue( struct thread *thread, struct thread_ queue->hooks = NULL; queue->last_get_msg = current_time; queue->keystate_lock = 0; @@ -112,7 +112,7 @@ index 9007438e082..1d7a31a318a 100644 list_init( &queue->send_result ); list_init( &queue->callback_result ); list_init( &queue->pending_timers ); -@@ -643,13 +645,21 @@ static inline struct msg_queue *get_current_queue(void) +@@ -656,13 +658,21 @@ static inline struct msg_queue *get_current_queue(void) } /* get a (pseudo-)unique id to tag hardware messages */ @@ -135,7 +135,7 @@ index 9007438e082..1d7a31a318a 100644 /* try to merge a WM_MOUSEMOVE message with the last in the list; return 1 if successful */ static int merge_mousemove( struct thread_input *input, const struct message *msg ) { -@@ -960,7 +970,7 @@ static int match_window( user_handle_t win, user_handle_t msg_win ) +@@ -973,7 +983,7 @@ static int match_window( user_handle_t win, user_handle_t msg_win ) } /* retrieve a posted message */ @@ -144,7 +144,7 @@ index 9007438e082..1d7a31a318a 100644 unsigned int first, unsigned int last, unsigned int flags, struct get_message_reply *reply ) { -@@ -971,6 +981,7 @@ static int get_posted_message( struct msg_queue *queue, user_handle_t win, +@@ -984,6 +994,7 @@ static int get_posted_message( struct msg_queue *queue, user_handle_t win, { if (!match_window( win, msg->win )) continue; if (!check_msg_filter( msg->msg, first, last )) continue; @@ -152,7 +152,7 @@ index 9007438e082..1d7a31a318a 100644 goto found; /* found one */ } return 0; -@@ -1585,6 +1596,7 @@ found: +@@ -1598,6 +1609,7 @@ found: msg->msg = WM_HOTKEY; msg->wparam = hotkey->id; msg->lparam = ((hotkey->vkey & 0xffff) << 16) | modifiers; @@ -160,7 +160,7 @@ index 9007438e082..1d7a31a318a 100644 free( msg->data ); msg->data = NULL; -@@ -2276,7 +2288,7 @@ static int get_hardware_message( struct thread *thread, unsigned int hw_id, user +@@ -2503,7 +2515,7 @@ static int get_hardware_message( struct thread *thread, unsigned int hw_id, user } /* now we can return it */ @@ -169,7 +169,7 @@ index 9007438e082..1d7a31a318a 100644 reply->type = MSG_HARDWARE; reply->win = win; reply->msg = msg_code; -@@ -2382,6 +2394,7 @@ void post_message( user_handle_t win, unsigned int message, lparam_t wparam, lpa +@@ -2610,6 +2622,7 @@ void post_message( user_handle_t win, unsigned int message, lparam_t wparam, lpa msg->result = NULL; msg->data = NULL; msg->data_size = 0; @@ -177,7 +177,7 @@ index 9007438e082..1d7a31a318a 100644 get_message_defaults( thread->queue, &msg->x, &msg->y, &msg->time ); -@@ -2626,6 +2639,7 @@ DECL_HANDLER(send_message) +@@ -2896,6 +2909,7 @@ DECL_HANDLER(send_message) set_queue_bits( recv_queue, QS_SENDMESSAGE ); break; case MSG_POSTED: @@ -185,7 +185,7 @@ index 9007438e082..1d7a31a318a 100644 list_add_tail( &recv_queue->msg_list[POST_MESSAGE], &msg->entry ); set_queue_bits( recv_queue, QS_POSTMESSAGE|QS_ALLPOSTMESSAGE ); if (msg->msg == WM_HOTKEY) -@@ -2744,12 +2758,12 @@ DECL_HANDLER(get_message) +@@ -3022,12 +3036,12 @@ DECL_HANDLER(get_message) /* then check for posted messages */ if ((filter & QS_POSTMESSAGE) && @@ -200,16 +200,16 @@ index 9007438e082..1d7a31a318a 100644 return; /* only check for quit messages if not posted messages pending */ -@@ -2760,7 +2774,7 @@ DECL_HANDLER(get_message) +@@ -3038,7 +3052,7 @@ DECL_HANDLER(get_message) if ((filter & QS_INPUT) && filter_contains_hw_range( req->get_first, req->get_last ) && get_hardware_message( current, req->hw_id, get_win, req->get_first, req->get_last, req->flags, reply )) - return; + goto found_msg; - /* check for any internal driver message */ - if (get_hardware_message( current, req->hw_id, get_win, WM_WINE_FIRST_DRIVER_MSG, -@@ -2778,7 +2792,7 @@ DECL_HANDLER(get_message) + /* now check for WM_PAINT */ + if ((filter & QS_PAINT) && +@@ -3051,7 +3065,7 @@ DECL_HANDLER(get_message) reply->wparam = 0; reply->lparam = 0; get_message_defaults( queue, &reply->x, &reply->y, &reply->time ); @@ -218,7 +218,7 @@ index 9007438e082..1d7a31a318a 100644 } /* now check for timer */ -@@ -2794,13 +2808,30 @@ DECL_HANDLER(get_message) +@@ -3067,13 +3081,30 @@ DECL_HANDLER(get_message) get_message_defaults( queue, &reply->x, &reply->y, &reply->time ); if (!(req->flags & PM_NOYIELD) && current->process->idle_event) set_event( current->process->idle_event ); @@ -250,7 +250,7 @@ index 9007438e082..1d7a31a318a 100644 } -@@ -2818,7 +2849,10 @@ DECL_HANDLER(reply_message) +@@ -3091,7 +3122,10 @@ DECL_HANDLER(reply_message) DECL_HANDLER(accept_hardware_message) { if (current->queue) diff --git a/patches/stdole32.tlb-SLTG_Typelib/definition b/patches/stdole32.tlb-SLTG_Typelib/definition index b90d5b4f..7ffb51ca 100644 --- a/patches/stdole32.tlb-SLTG_Typelib/definition +++ b/patches/stdole32.tlb-SLTG_Typelib/definition @@ -1,2 +1,4 @@ Fixes: [3689] Compile stdole32.tlb in SLTG typelib format Depends: widl-SLTG_Typelib_Support +# Disabled dependency. +Disabled: true diff --git a/patches/widl-SLTG_Typelib_Support/definition b/patches/widl-SLTG_Typelib_Support/definition index 25e2af52..f1437d3b 100644 --- a/patches/widl-SLTG_Typelib_Support/definition +++ b/patches/widl-SLTG_Typelib_Support/definition @@ -1 +1,3 @@ Fixes: Implement support for SLTG typelibs in widl +# In the process of upstreaming. +Disabled: true \ No newline at end of file diff --git a/staging/upstream-commit b/staging/upstream-commit index 5a5fa6bd..0a6c3dd5 100644 --- a/staging/upstream-commit +++ b/staging/upstream-commit @@ -1 +1 @@ -86557b9e0ba8a783f1b0d0918b1ddec7e0a7749e +b053e924e8e13b3637f2a5a8ffe88d84c2d17075