winehq.org
Sign In
Sign Up
Sign In
Sign Up
Manage this list
×
Keyboard Shortcuts
Thread View
j
: Next unread message
k
: Previous unread message
j a
: Jump to all threads
j l
: Jump to MailingList overview
2025
July
June
May
April
March
February
January
2024
December
November
October
September
August
July
June
May
April
March
February
January
2023
December
November
October
September
August
July
June
May
April
March
February
January
2022
December
November
October
September
August
July
June
May
April
March
February
January
2021
December
November
October
September
August
July
June
May
April
March
February
January
2020
December
November
October
September
August
July
June
May
April
March
February
January
2019
December
November
October
September
August
July
June
May
April
March
February
January
2018
December
November
October
September
August
July
June
May
April
March
February
January
2017
December
November
October
September
August
July
June
May
April
March
February
January
2016
December
November
October
September
August
July
June
May
April
March
February
January
2015
December
November
October
September
August
July
June
May
April
March
February
January
2014
December
November
October
September
August
July
June
May
April
March
February
January
2013
December
November
October
September
August
July
June
May
April
March
February
January
2012
December
November
October
September
August
July
June
May
April
March
February
January
2011
December
November
October
September
August
July
June
May
April
March
February
January
2010
December
November
October
September
August
July
June
May
April
March
February
January
2009
December
November
October
September
August
July
June
May
April
March
February
January
2008
December
November
October
September
August
July
June
May
April
March
February
January
2007
December
November
October
September
August
July
June
May
April
March
February
January
2006
December
November
October
September
August
July
June
May
April
March
February
January
2005
December
November
October
September
August
July
June
May
April
March
February
January
2004
December
November
October
September
August
July
June
May
April
March
February
January
2003
December
November
October
September
August
July
June
May
April
March
February
January
2002
December
November
October
September
August
July
June
May
April
March
February
January
2001
December
November
October
September
August
July
June
May
April
March
February
List overview
wine-commits
September 2023
----- 2025 -----
July 2025
June 2025
May 2025
April 2025
March 2025
February 2025
January 2025
----- 2024 -----
December 2024
November 2024
October 2024
September 2024
August 2024
July 2024
June 2024
May 2024
April 2024
March 2024
February 2024
January 2024
----- 2023 -----
December 2023
November 2023
October 2023
September 2023
August 2023
July 2023
June 2023
May 2023
April 2023
March 2023
February 2023
January 2023
----- 2022 -----
December 2022
November 2022
October 2022
September 2022
August 2022
July 2022
June 2022
May 2022
April 2022
March 2022
February 2022
January 2022
----- 2021 -----
December 2021
November 2021
October 2021
September 2021
August 2021
July 2021
June 2021
May 2021
April 2021
March 2021
February 2021
January 2021
----- 2020 -----
December 2020
November 2020
October 2020
September 2020
August 2020
July 2020
June 2020
May 2020
April 2020
March 2020
February 2020
January 2020
----- 2019 -----
December 2019
November 2019
October 2019
September 2019
August 2019
July 2019
June 2019
May 2019
April 2019
March 2019
February 2019
January 2019
----- 2018 -----
December 2018
November 2018
October 2018
September 2018
August 2018
July 2018
June 2018
May 2018
April 2018
March 2018
February 2018
January 2018
----- 2017 -----
December 2017
November 2017
October 2017
September 2017
August 2017
July 2017
June 2017
May 2017
April 2017
March 2017
February 2017
January 2017
----- 2016 -----
December 2016
November 2016
October 2016
September 2016
August 2016
July 2016
June 2016
May 2016
April 2016
March 2016
February 2016
January 2016
----- 2015 -----
December 2015
November 2015
October 2015
September 2015
August 2015
July 2015
June 2015
May 2015
April 2015
March 2015
February 2015
January 2015
----- 2014 -----
December 2014
November 2014
October 2014
September 2014
August 2014
July 2014
June 2014
May 2014
April 2014
March 2014
February 2014
January 2014
----- 2013 -----
December 2013
November 2013
October 2013
September 2013
August 2013
July 2013
June 2013
May 2013
April 2013
March 2013
February 2013
January 2013
----- 2012 -----
December 2012
November 2012
October 2012
September 2012
August 2012
July 2012
June 2012
May 2012
April 2012
March 2012
February 2012
January 2012
----- 2011 -----
December 2011
November 2011
October 2011
September 2011
August 2011
July 2011
June 2011
May 2011
April 2011
March 2011
February 2011
January 2011
----- 2010 -----
December 2010
November 2010
October 2010
September 2010
August 2010
July 2010
June 2010
May 2010
April 2010
March 2010
February 2010
January 2010
----- 2009 -----
December 2009
November 2009
October 2009
September 2009
August 2009
July 2009
June 2009
May 2009
April 2009
March 2009
February 2009
January 2009
----- 2008 -----
December 2008
November 2008
October 2008
September 2008
August 2008
July 2008
June 2008
May 2008
April 2008
March 2008
February 2008
January 2008
----- 2007 -----
December 2007
November 2007
October 2007
September 2007
August 2007
July 2007
June 2007
May 2007
April 2007
March 2007
February 2007
January 2007
----- 2006 -----
December 2006
November 2006
October 2006
September 2006
August 2006
July 2006
June 2006
May 2006
April 2006
March 2006
February 2006
January 2006
----- 2005 -----
December 2005
November 2005
October 2005
September 2005
August 2005
July 2005
June 2005
May 2005
April 2005
March 2005
February 2005
January 2005
----- 2004 -----
December 2004
November 2004
October 2004
September 2004
August 2004
July 2004
June 2004
May 2004
April 2004
March 2004
February 2004
January 2004
----- 2003 -----
December 2003
November 2003
October 2003
September 2003
August 2003
July 2003
June 2003
May 2003
April 2003
March 2003
February 2003
January 2003
----- 2002 -----
December 2002
November 2002
October 2002
September 2002
August 2002
July 2002
June 2002
May 2002
April 2002
March 2002
February 2002
January 2002
----- 2001 -----
December 2001
November 2001
October 2001
September 2001
August 2001
July 2001
June 2001
May 2001
April 2001
March 2001
February 2001
wine-commits@winehq.org
1 participants
920 discussions
Start a n
N
ew thread
Rémi Bernon : makedep: Fix a string format specifier typo.
by Alexandre Julliard
06 Sep '23
06 Sep '23
Module: wine Branch: master Commit: dcb1602124774408b1718dc41f03caf67e371f49 URL:
https://gitlab.winehq.org/wine/wine/-/commit/dcb1602124774408b1718dc41f03ca…
Author: Rémi Bernon <rbernon(a)codeweavers.com> Date: Wed Sep 6 08:58:26 2023 +0200 makedep: Fix a string format specifier typo. --- tools/makedep.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/makedep.c b/tools/makedep.c index 7898fd04294..8495d93d8c6 100644 --- a/tools/makedep.c +++ b/tools/makedep.c @@ -3078,7 +3078,7 @@ static void output_source_testdll( struct makefile *make, struct incl_file *sour struct strarray default_imports = empty_strarray; struct strarray all_libs, dep_libs; const char *dll_name, *obj_name, *res_name, *output_rsrc, *output_file, *debug_file, *ext = ".dll"; - struct incl_file *spec_file = find_src_file( make, strmake( "%.spec", obj )); + struct incl_file *spec_file = find_src_file( make, strmake( "%s.spec", obj )); unsigned int arch; if (!imports.count) imports = make->imports;
1
0
0
0
Esme Povirk : user32/tests: Wait for GetMessage call to complete.
by Alexandre Julliard
05 Sep '23
05 Sep '23
Module: wine Branch: master Commit: a6ff01f36f4b4e87426899472af75d654422d3ab URL:
https://gitlab.winehq.org/wine/wine/-/commit/a6ff01f36f4b4e87426899472af75d…
Author: Esme Povirk <esme(a)codeweavers.com> Date: Tue Sep 5 13:57:44 2023 -0500 user32/tests: Wait for GetMessage call to complete. It's possible otherwise for the second message to be sent before GetMessage removes a posted message from the queue, in which case GetMessage processes both sent messages. Wine-Bug:
https://bugs.winehq.org/show_bug.cgi?id=54407
--- dlls/user32/tests/msg.c | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/dlls/user32/tests/msg.c b/dlls/user32/tests/msg.c index 912e54921c5..c1f950e5cb9 100644 --- a/dlls/user32/tests/msg.c +++ b/dlls/user32/tests/msg.c @@ -9861,6 +9861,7 @@ struct wnd_event HANDLE grand_child; HANDLE start_event; HANDLE stop_event; + HANDLE getmessage_complete; }; static DWORD WINAPI thread_proc(void *param) @@ -19488,6 +19489,7 @@ static const struct message send_message_3[] = { static DWORD WINAPI SendMessage_thread_1(void *param) { struct wnd_event *wnd_event = param; + DWORD ret; if (winetest_debug > 1) trace("thread: starting\n"); WaitForSingleObject(wnd_event->start_event, INFINITE); @@ -19501,6 +19503,8 @@ static DWORD WINAPI SendMessage_thread_1(void *param) if (winetest_debug > 1) trace("thread: call SendMessage\n"); SendMessageA(wnd_event->hwnd, WM_USER+2, 0, 0); SetEvent(wnd_event->stop_event); + ret = WaitForSingleObject(wnd_event->getmessage_complete, 100); + ok(ret == WAIT_OBJECT_0, "WaitForSingleObject failed, ret:%lx\n", ret); if (winetest_debug > 1) trace("thread: call SendMessage\n"); SendMessageA(wnd_event->hwnd, WM_USER+3, 0, 0); @@ -19511,6 +19515,7 @@ static DWORD WINAPI SendMessage_thread_1(void *param) static DWORD WINAPI SendMessage_thread_2(void *param) { struct wnd_event *wnd_event = param; + DWORD ret; if (winetest_debug > 1) trace("thread: starting\n"); WaitForSingleObject(wnd_event->start_event, INFINITE); @@ -19528,6 +19533,8 @@ static DWORD WINAPI SendMessage_thread_2(void *param) if (winetest_debug > 1) trace("thread: call SendMessage\n"); SendMessageA(wnd_event->hwnd, WM_USER+2, 0, 0); SetEvent(wnd_event->stop_event); + ret = WaitForSingleObject(wnd_event->getmessage_complete, 100); + ok(ret == WAIT_OBJECT_0, "WaitForSingleObject failed, ret:%lx\n", ret); if (winetest_debug > 1) trace("thread: call SendMessage\n"); SendMessageA(wnd_event->hwnd, WM_USER+3, 0, 0); @@ -19547,6 +19554,7 @@ static void test_SendMessage_other_thread(int thread_n) wnd_event.start_event = CreateEventA(NULL, 0, 0, NULL); wnd_event.stop_event = CreateEventA(NULL, 0, 0, NULL); + wnd_event.getmessage_complete = CreateEventA(NULL, 0, 0, NULL); wnd_event.hwnd = CreateWindowExA(0, "TestWindowClass", NULL, WS_OVERLAPPEDWINDOW, 100, 100, 200, 200, 0, 0, 0, NULL); @@ -19581,6 +19589,8 @@ static void test_SendMessage_other_thread(int thread_n) DispatchMessageA(&msg); ok_sequence(send_message_1, "SendMessage from other thread 1", thread_n == 2); + SetEvent(wnd_event.getmessage_complete); + ret = WaitForSingleObject(wnd_event.stop_event, 100); todo_wine_if (thread_n == 2) ok(ret == WAIT_OBJECT_0, "WaitForSingleObject failed, ret:%lx\n", ret); @@ -19626,6 +19636,7 @@ static void test_SendMessage_other_thread(int thread_n) CloseHandle(wnd_event.start_event); CloseHandle(wnd_event.stop_event); + CloseHandle(wnd_event.getmessage_complete); } static LRESULT CALLBACK insendmessage_wnd_proc( HWND hwnd, UINT msg, WPARAM wp, LPARAM lp )
1
0
0
0
Esme Povirk : user32/tests: Trace run number in test_SendMessage_other_thread.
by Alexandre Julliard
05 Sep '23
05 Sep '23
Module: wine Branch: master Commit: 7deaf38191c24f9b88b424c7ee5d1b0736a31d0f URL:
https://gitlab.winehq.org/wine/wine/-/commit/7deaf38191c24f9b88b424c7ee5d1b…
Author: Esme Povirk <esme(a)codeweavers.com> Date: Tue Sep 5 13:47:18 2023 -0500 user32/tests: Trace run number in test_SendMessage_other_thread. --- dlls/user32/tests/msg.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/dlls/user32/tests/msg.c b/dlls/user32/tests/msg.c index 53f8953902a..912e54921c5 100644 --- a/dlls/user32/tests/msg.c +++ b/dlls/user32/tests/msg.c @@ -19543,6 +19543,8 @@ static void test_SendMessage_other_thread(int thread_n) DWORD tid, ret; MSG msg; + winetest_push_context("thread_%i", thread_n); + wnd_event.start_event = CreateEventA(NULL, 0, 0, NULL); wnd_event.stop_event = CreateEventA(NULL, 0, 0, NULL); @@ -19620,6 +19622,8 @@ static void test_SendMessage_other_thread(int thread_n) flush_events(); flush_sequence(); + winetest_pop_context(); + CloseHandle(wnd_event.start_event); CloseHandle(wnd_event.stop_event); }
1
0
0
0
Rémi Bernon : dmsynth: Implement SampleToRefTime and RefTimeToSample.
by Alexandre Julliard
05 Sep '23
05 Sep '23
Module: wine Branch: master Commit: 3610b54bd6df4f653c76b8487458df1db74ccab5 URL:
https://gitlab.winehq.org/wine/wine/-/commit/3610b54bd6df4f653c76b8487458df…
Author: Rémi Bernon <rbernon(a)codeweavers.com> Date: Tue Sep 5 13:20:07 2023 +0200 dmsynth: Implement SampleToRefTime and RefTimeToSample. --- dlls/dmsynth/synthsink.c | 36 ++++++++++++++++++++++++++++++++++-- dlls/dmsynth/tests/dmsynth.c | 14 +++++++------- 2 files changed, 41 insertions(+), 9 deletions(-) diff --git a/dlls/dmsynth/synthsink.c b/dlls/dmsynth/synthsink.c index 507c87b37c3..e86763cccd0 100644 --- a/dlls/dmsynth/synthsink.c +++ b/dlls/dmsynth/synthsink.c @@ -45,6 +45,25 @@ static inline struct synth_sink *impl_from_IDirectMusicSynthSink(IDirectMusicSyn return CONTAINING_RECORD(iface, struct synth_sink, IDirectMusicSynthSink_iface); } +static void synth_sink_get_format(struct synth_sink *This, WAVEFORMATEX *format) +{ + DWORD size = sizeof(*format); + HRESULT hr; + + format->wFormatTag = WAVE_FORMAT_PCM; + format->nChannels = 2; + format->wBitsPerSample = 16; + format->nSamplesPerSec = 22050; + format->nBlockAlign = format->nChannels * format->wBitsPerSample / 8; + format->nAvgBytesPerSec = format->nSamplesPerSec * format->nBlockAlign; + + if (This->synth) + { + if (FAILED(hr = IDirectMusicSynth_GetFormat(This->synth, format, &size))) + WARN("Failed to get synth buffer format, hr %#lx\n", hr); + } +} + static HRESULT synth_sink_activate(struct synth_sink *This) { HRESULT hr; @@ -183,8 +202,14 @@ static HRESULT WINAPI synth_sink_SampleToRefTime(IDirectMusicSynthSink *iface, LONGLONG sample_time, REFERENCE_TIME *ref_time) { struct synth_sink *This = impl_from_IDirectMusicSynthSink(iface); + WAVEFORMATEX format; + + TRACE("(%p)->(%I64d, %p)\n", This, sample_time, ref_time); + + if (!ref_time) return E_POINTER; - FIXME("(%p)->(0x%s, %p): stub\n", This, wine_dbgstr_longlong(sample_time), ref_time); + synth_sink_get_format(This, &format); + *ref_time = This->activate_time + ((sample_time * 10000) / format.nSamplesPerSec) * 1000; return S_OK; } @@ -193,8 +218,15 @@ static HRESULT WINAPI synth_sink_RefTimeToSample(IDirectMusicSynthSink *iface, REFERENCE_TIME ref_time, LONGLONG *sample_time) { struct synth_sink *This = impl_from_IDirectMusicSynthSink(iface); + WAVEFORMATEX format; + + TRACE("(%p)->(%I64d, %p)\n", This, ref_time, sample_time); + + if (!sample_time) return E_POINTER; - FIXME("(%p)->(0x%s, %p): stub\n", This, wine_dbgstr_longlong(ref_time), sample_time); + synth_sink_get_format(This, &format); + ref_time -= This->activate_time; + *sample_time = ((ref_time / 1000) * format.nSamplesPerSec) / 10000; return S_OK; } diff --git a/dlls/dmsynth/tests/dmsynth.c b/dlls/dmsynth/tests/dmsynth.c index 35cd11980e7..6d695991cac 100644 --- a/dlls/dmsynth/tests/dmsynth.c +++ b/dlls/dmsynth/tests/dmsynth.c @@ -1197,18 +1197,18 @@ static void test_IDirectMusicSynthSink(void) ok(hr == S_OK, "got %#lx\n", hr); hr = IDirectMusicSynthSink_SampleToRefTime(sink, 0, NULL); - todo_wine ok(hr == E_POINTER, "got %#lx\n", hr); + ok(hr == E_POINTER, "got %#lx\n", hr); time = 0xdeadbeef; hr = IDirectMusicSynthSink_SampleToRefTime(sink, 10, &time); ok(hr == S_OK, "got %#lx\n", hr); - todo_wine ok(time == 4000, "got %I64d\n", time); + ok(time == 4000, "got %I64d\n", time); hr = IDirectMusicSynthSink_RefTimeToSample(sink, 0, NULL); - todo_wine ok(hr == E_POINTER, "got %#lx\n", hr); + ok(hr == E_POINTER, "got %#lx\n", hr); sample = 0xdeadbeef; hr = IDirectMusicSynthSink_RefTimeToSample(sink, 4000, &sample); ok(hr == S_OK, "got %#lx\n", hr); - todo_wine ok(sample == 8, "got %I64d\n", sample); + ok(sample == 8, "got %I64d\n", sample); hr = IDirectMusicSynthSink_GetDesiredBufferSize(sink, &size); ok(hr == DMUS_E_SYNTHNOTCONFIGURED, "got %#lx\n", hr); @@ -1273,12 +1273,12 @@ static void test_IDirectMusicSynthSink(void) sample = 0xdeadbeef; hr = IDirectMusicSynthSink_RefTimeToSample(sink, time, &sample); ok(hr == S_OK, "got %#lx\n", hr); - todo_wine ok(sample <= 3000, "got %I64d\n", sample); + ok(sample <= 3000, "got %I64d\n", sample); tmp_time = time + 1; hr = IDirectMusicSynthSink_SampleToRefTime(sink, sample, &tmp_time); ok(hr == S_OK, "got %#lx\n", hr); - todo_wine ok(tmp_time <= time, "got %I64d\n", tmp_time - time); - ok(time - tmp_time <= 5000, "got %I64d\n", time - tmp_time); + ok(tmp_time <= time, "got %I64d\n", tmp_time - time); + ok(time - tmp_time <= 5000, "got %I64d\n", tmp_time); /* latency clock now works fine */ tmp_time = time;
1
0
0
0
Rémi Bernon : dmsynth: Implement IDirectMusicSynthSink_Activate semi-stub.
by Alexandre Julliard
05 Sep '23
05 Sep '23
Module: wine Branch: master Commit: 10da838a785b81d6a09aa6034aceb53f2d0b4798 URL:
https://gitlab.winehq.org/wine/wine/-/commit/10da838a785b81d6a09aa6034aceb5…
Author: Rémi Bernon <rbernon(a)codeweavers.com> Date: Sun Aug 27 16:32:53 2023 +0200 dmsynth: Implement IDirectMusicSynthSink_Activate semi-stub. --- dlls/dmsynth/synthsink.c | 27 +++++++++++++++++++++++++-- dlls/dmsynth/tests/dmsynth.c | 14 +++++++------- 2 files changed, 32 insertions(+), 9 deletions(-) diff --git a/dlls/dmsynth/synthsink.c b/dlls/dmsynth/synthsink.c index 11edb23db78..507c87b37c3 100644 --- a/dlls/dmsynth/synthsink.c +++ b/dlls/dmsynth/synthsink.c @@ -35,7 +35,9 @@ struct synth_sink IReferenceClock *master_clock; IDirectMusicSynth *synth; /* No reference hold! */ IDirectSound *dsound; + BOOL active; + REFERENCE_TIME activate_time; }; static inline struct synth_sink *impl_from_IDirectMusicSynthSink(IDirectMusicSynthSink *iface) @@ -43,6 +45,27 @@ static inline struct synth_sink *impl_from_IDirectMusicSynthSink(IDirectMusicSyn return CONTAINING_RECORD(iface, struct synth_sink, IDirectMusicSynthSink_iface); } +static HRESULT synth_sink_activate(struct synth_sink *This) +{ + HRESULT hr; + + if (!This->synth) return DMUS_E_SYNTHNOTCONFIGURED; + if (!This->dsound) return DMUS_E_DSOUND_NOT_SET; + if (!This->master_clock) return DMUS_E_NO_MASTER_CLOCK; + if (This->active) return DMUS_E_SYNTHACTIVE; + + if (FAILED(hr = IReferenceClock_GetTime(This->master_clock, &This->activate_time))) return hr; + + This->active = TRUE; + return S_OK; +} + +static HRESULT synth_sink_deactivate(struct synth_sink *This) +{ + This->active = FALSE; + return S_OK; +} + static HRESULT WINAPI synth_sink_QueryInterface(IDirectMusicSynthSink *iface, REFIID riid, void **ret_iface) { @@ -151,9 +174,9 @@ static HRESULT WINAPI synth_sink_Activate(IDirectMusicSynthSink *iface, { struct synth_sink *This = impl_from_IDirectMusicSynthSink(iface); - FIXME("(%p)->(%d): stub\n", This, enable); + FIXME("(%p)->(%d): semi-stub\n", This, enable); - return S_OK; + return enable ? synth_sink_activate(This) : synth_sink_deactivate(This); } static HRESULT WINAPI synth_sink_SampleToRefTime(IDirectMusicSynthSink *iface, diff --git a/dlls/dmsynth/tests/dmsynth.c b/dlls/dmsynth/tests/dmsynth.c index f0508bf01d8..35cd11980e7 100644 --- a/dlls/dmsynth/tests/dmsynth.c +++ b/dlls/dmsynth/tests/dmsynth.c @@ -1192,7 +1192,7 @@ static void test_IDirectMusicSynthSink(void) /* sink is not configured */ hr = IDirectMusicSynthSink_Activate(sink, TRUE); - todo_wine ok(hr == DMUS_E_SYNTHNOTCONFIGURED, "got %#lx\n", hr); + ok(hr == DMUS_E_SYNTHNOTCONFIGURED, "got %#lx\n", hr); hr = IDirectMusicSynthSink_Activate(sink, FALSE); ok(hr == S_OK, "got %#lx\n", hr); @@ -1247,11 +1247,11 @@ static void test_IDirectMusicSynthSink(void) ok(hr == S_OK, "got %#lx\n", hr); ok(size == 352800, "got %lu\n", size); hr = IDirectMusicSynthSink_Activate(sink, TRUE); - todo_wine ok(hr == DMUS_E_DSOUND_NOT_SET, "got %#lx\n", hr); + ok(hr == DMUS_E_DSOUND_NOT_SET, "got %#lx\n", hr); hr = IDirectMusicSynthSink_SetDirectSound(sink, dsound, NULL); ok(hr == S_OK, "got %#lx\n", hr); hr = IDirectMusicSynthSink_Activate(sink, TRUE); - todo_wine ok(hr == DMUS_E_NO_MASTER_CLOCK, "got %#lx\n", hr); + ok(hr == DMUS_E_NO_MASTER_CLOCK, "got %#lx\n", hr); hr = IDirectMusicSynthSink_SetMasterClock(sink, clock); ok(hr == S_OK, "got %#lx\n", hr); hr = IReferenceClock_GetTime(latency_clock, &time); @@ -1259,7 +1259,7 @@ static void test_IDirectMusicSynthSink(void) hr = IDirectMusicSynthSink_Activate(sink, TRUE); ok(hr == S_OK, "got %#lx\n", hr); hr = IDirectMusicSynthSink_Activate(sink, TRUE); - todo_wine ok(hr == DMUS_E_SYNTHACTIVE, "got %#lx\n", hr); + ok(hr == DMUS_E_SYNTHACTIVE, "got %#lx\n", hr); ref = get_refcount(synth); ok(ref == 1, "got %#lx\n", ref); @@ -1297,13 +1297,13 @@ static void test_IDirectMusicSynthSink(void) ref = get_refcount(synth); ok(ref == 1, "got %#lx\n", ref); hr = IDirectMusicSynthSink_Activate(sink, TRUE); - todo_wine ok(hr == DMUS_E_SYNTHNOTCONFIGURED, "got %#lx\n", hr); + ok(hr == DMUS_E_SYNTHNOTCONFIGURED, "got %#lx\n", hr); /* changing dsound while active fails */ hr = IDirectMusicSynthSink_SetDirectSound(sink, dsound, NULL); - todo_wine ok(hr == DMUS_E_SYNTHACTIVE, "got %#lx\n", hr); + ok(hr == DMUS_E_SYNTHACTIVE, "got %#lx\n", hr); hr = IDirectMusicSynthSink_SetDirectSound(sink, NULL, NULL); - todo_wine ok(hr == DMUS_E_SYNTHACTIVE, "got %#lx\n", hr); + ok(hr == DMUS_E_SYNTHACTIVE, "got %#lx\n", hr); hr = IDirectMusicSynthSink_Activate(sink, FALSE); ok(hr == S_OK, "got %#lx\n", hr); hr = IDirectMusicSynthSink_SetDirectSound(sink, NULL, NULL);
1
0
0
0
Rémi Bernon : dmsynth: Allow changing master clock while active.
by Alexandre Julliard
05 Sep '23
05 Sep '23
Module: wine Branch: master Commit: 1b3cc0ce49080b0a9a5b920b6210ce006ec46300 URL:
https://gitlab.winehq.org/wine/wine/-/commit/1b3cc0ce49080b0a9a5b920b6210ce…
Author: Rémi Bernon <rbernon(a)codeweavers.com> Date: Sun Aug 27 16:25:25 2023 +0200 dmsynth: Allow changing master clock while active. --- dlls/dmsynth/synthsink.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/dlls/dmsynth/synthsink.c b/dlls/dmsynth/synthsink.c index 6c4f1ebecb6..11edb23db78 100644 --- a/dlls/dmsynth/synthsink.c +++ b/dlls/dmsynth/synthsink.c @@ -122,8 +122,6 @@ static HRESULT WINAPI synth_sink_SetMasterClock(IDirectMusicSynthSink *iface, if (!clock) return E_POINTER; - if (This->active) - return E_FAIL; if (This->master_clock) IReferenceClock_Release(This->master_clock); IReferenceClock_AddRef(clock);
1
0
0
0
Rémi Bernon : dmsynth: Avoid leaking master clock references.
by Alexandre Julliard
05 Sep '23
05 Sep '23
Module: wine Branch: master Commit: 48536877fe4501d5dba78ffb2498ee4da2a5f17d URL:
https://gitlab.winehq.org/wine/wine/-/commit/48536877fe4501d5dba78ffb2498ee…
Author: Rémi Bernon <rbernon(a)codeweavers.com> Date: Sun Aug 27 16:25:14 2023 +0200 dmsynth: Avoid leaking master clock references. --- dlls/dmsynth/synthsink.c | 1 + 1 file changed, 1 insertion(+) diff --git a/dlls/dmsynth/synthsink.c b/dlls/dmsynth/synthsink.c index cda44e82191..6c4f1ebecb6 100644 --- a/dlls/dmsynth/synthsink.c +++ b/dlls/dmsynth/synthsink.c @@ -125,6 +125,7 @@ static HRESULT WINAPI synth_sink_SetMasterClock(IDirectMusicSynthSink *iface, if (This->active) return E_FAIL; + if (This->master_clock) IReferenceClock_Release(This->master_clock); IReferenceClock_AddRef(clock); This->master_clock = clock;
1
0
0
0
Rémi Bernon : dmsynth: Implement IDirectMusicSynthSink_SetDirectSound semi-stub.
by Alexandre Julliard
05 Sep '23
05 Sep '23
Module: wine Branch: master Commit: be2cdd3cb278bd84c95556ed945199c1aa2fe615 URL:
https://gitlab.winehq.org/wine/wine/-/commit/be2cdd3cb278bd84c95556ed945199…
Author: Rémi Bernon <rbernon(a)codeweavers.com> Date: Sun Aug 27 16:30:15 2023 +0200 dmsynth: Implement IDirectMusicSynthSink_SetDirectSound semi-stub. --- dlls/dmsynth/synthsink.c | 13 ++++++++++++- dlls/dmsynth/tests/dmsynth.c | 2 +- 2 files changed, 13 insertions(+), 2 deletions(-) diff --git a/dlls/dmsynth/synthsink.c b/dlls/dmsynth/synthsink.c index fce325681ee..cda44e82191 100644 --- a/dlls/dmsynth/synthsink.c +++ b/dlls/dmsynth/synthsink.c @@ -34,6 +34,7 @@ struct synth_sink IReferenceClock *latency_clock; IReferenceClock *master_clock; IDirectMusicSynth *synth; /* No reference hold! */ + IDirectSound *dsound; BOOL active; }; @@ -181,7 +182,17 @@ static HRESULT WINAPI synth_sink_SetDirectSound(IDirectMusicSynthSink *iface, { struct synth_sink *This = impl_from_IDirectMusicSynthSink(iface); - FIXME("(%p)->(%p, %p): stub\n", This, dsound, dsound_buffer); + TRACE("(%p)->(%p, %p)\n", This, dsound, dsound_buffer); + + if (dsound_buffer) FIXME("Ignoring IDirectSoundBuffer parameter.\n"); + if (This->active) return DMUS_E_SYNTHACTIVE; + + if (This->dsound) IDirectSound_Release(This->dsound); + This->dsound = NULL; + if (!dsound) return S_OK; + + if (!This->synth) return DMUS_E_SYNTHNOTCONFIGURED; + if ((This->dsound = dsound)) IDirectSound_AddRef(This->dsound); return S_OK; } diff --git a/dlls/dmsynth/tests/dmsynth.c b/dlls/dmsynth/tests/dmsynth.c index 6919e22c6d6..f0508bf01d8 100644 --- a/dlls/dmsynth/tests/dmsynth.c +++ b/dlls/dmsynth/tests/dmsynth.c @@ -1234,7 +1234,7 @@ static void test_IDirectMusicSynthSink(void) hr = IDirectMusicSynthSink_SetDirectSound(sink, NULL, NULL); ok(hr == S_OK, "got %#lx\n", hr); hr = IDirectMusicSynthSink_SetDirectSound(sink, dsound, NULL); - todo_wine ok(hr == DMUS_E_SYNTHNOTCONFIGURED, "got %#lx\n", hr); + ok(hr == DMUS_E_SYNTHNOTCONFIGURED, "got %#lx\n", hr); /* Activate requires a synth, dsound and a clock */ ref = get_refcount(synth);
1
0
0
0
Rémi Bernon : dmusic: Implement IDirectMusicPortDownload_GetBuffer.
by Alexandre Julliard
05 Sep '23
05 Sep '23
Module: wine Branch: master Commit: d3b191503e7316890d630c2fabff16ef01bb63c1 URL:
https://gitlab.winehq.org/wine/wine/-/commit/d3b191503e7316890d630c2fabff16…
Author: Rémi Bernon <rbernon(a)codeweavers.com> Date: Mon Sep 4 15:51:09 2023 +0200 dmusic: Implement IDirectMusicPortDownload_GetBuffer. --- dlls/dmusic/port.c | 23 +++++++++++++++++------ dlls/dmusic/tests/dmusic.c | 14 +++++++------- 2 files changed, 24 insertions(+), 13 deletions(-) diff --git a/dlls/dmusic/port.c b/dlls/dmusic/port.c index 7dc0257c329..d221fcbc102 100644 --- a/dlls/dmusic/port.c +++ b/dlls/dmusic/port.c @@ -592,17 +592,28 @@ static ULONG WINAPI synth_port_download_Release(IDirectMusicPortDownload *iface) return IDirectMusicPort_Release(&This->IDirectMusicPort_iface); } -static HRESULT WINAPI synth_port_download_GetBuffer(IDirectMusicPortDownload *iface, DWORD DLId, - IDirectMusicDownload **IDMDownload) +static HRESULT WINAPI synth_port_download_GetBuffer(IDirectMusicPortDownload *iface, DWORD id, + IDirectMusicDownload **download) { struct synth_port *This = synth_from_IDirectMusicPortDownload(iface); + struct download_entry *entry; - FIXME("(%p/%p, %lu, %p): stub\n", iface, This, DLId, IDMDownload); + TRACE("(%p/%p, %lu, %p)\n", iface, This, id, download); - if (!IDMDownload) - return E_POINTER; + if (!download) return E_POINTER; + if (id >= This->next_dlid) return DMUS_E_INVALID_DOWNLOADID; + + LIST_FOR_EACH_ENTRY(entry, &This->downloads, struct download_entry, entry) + { + if (entry->id == id) + { + *download = entry->download; + IDirectMusicDownload_AddRef(entry->download); + return S_OK; + } + } - return download_create(0, IDMDownload); + return DMUS_E_NOT_DOWNLOADED_TO_PORT; } static HRESULT WINAPI synth_port_download_AllocateBuffer(IDirectMusicPortDownload *iface, DWORD size, diff --git a/dlls/dmusic/tests/dmusic.c b/dlls/dmusic/tests/dmusic.c index 13716c096e9..a8152822613 100644 --- a/dlls/dmusic/tests/dmusic.c +++ b/dlls/dmusic/tests/dmusic.c @@ -1059,9 +1059,9 @@ static void test_port_download(void) hr = IDirectMusicPortDownload_GetBuffer(port, 0, NULL); ok(hr == E_POINTER, "got %#lx\n", hr); hr = IDirectMusicPortDownload_GetBuffer(port, 0, &download); - todo_wine ok(hr == DMUS_E_INVALID_DOWNLOADID, "got %#lx\n", hr); + ok(hr == DMUS_E_INVALID_DOWNLOADID, "got %#lx\n", hr); hr = IDirectMusicPortDownload_GetBuffer(port, 0xdeadbeef, &download); - todo_wine ok(hr == DMUS_E_INVALID_DOWNLOADID, "got %#lx\n", hr); + ok(hr == DMUS_E_INVALID_DOWNLOADID, "got %#lx\n", hr); /* AllocateBuffer use the exact requested size */ hr = IDirectMusicPortDownload_AllocateBuffer(port, 0, NULL); @@ -1093,7 +1093,7 @@ static void test_port_download(void) /* GetBuffer looks up allocated ids to find downloaded buffers */ hr = IDirectMusicPortDownload_GetBuffer(port, 2, &download); - todo_wine ok(hr == DMUS_E_NOT_DOWNLOADED_TO_PORT, "got %#lx\n", hr); + ok(hr == DMUS_E_NOT_DOWNLOADED_TO_PORT, "got %#lx\n", hr); hr = IDirectMusicPortDownload_GetAppend(port, NULL); todo_wine ok(hr == E_POINTER, "got %#lx\n", hr); @@ -1119,7 +1119,7 @@ static void test_port_download(void) wave_download->info.dwDLType = 0; wave_download->info.dwNumOffsetTableEntries = 0; hr = IDirectMusicPortDownload_GetBuffer(port, 2, &tmp_download); - todo_wine ok(hr == DMUS_E_NOT_DOWNLOADED_TO_PORT, "got %#lx\n", hr); + ok(hr == DMUS_E_NOT_DOWNLOADED_TO_PORT, "got %#lx\n", hr); hr = IDirectMusicPortDownload_Download(port, NULL); ok(hr == E_POINTER, "got %#lx\n", hr); @@ -1150,8 +1150,8 @@ static void test_port_download(void) tmp_download = invalid_ptr; hr = IDirectMusicPortDownload_GetBuffer(port, 2, &tmp_download); ok(hr == S_OK, "got %#lx\n", hr); - todo_wine ok(tmp_download == download, "got %p\n", tmp_download); - if (tmp_download != invalid_ptr) IDirectMusicDownload_Release(tmp_download); + ok(tmp_download == download, "got %p\n", tmp_download); + IDirectMusicDownload_Release(tmp_download); hr = IDirectMusicPortDownload_Unload(port, NULL); ok(hr == E_POINTER, "got %#lx\n", hr); @@ -1159,7 +1159,7 @@ static void test_port_download(void) ok(hr == S_OK, "got %#lx\n", hr); hr = IDirectMusicPortDownload_GetBuffer(port, 2, &tmp_download); - todo_wine ok(hr == DMUS_E_NOT_DOWNLOADED_TO_PORT, "got %#lx\n", hr); + ok(hr == DMUS_E_NOT_DOWNLOADED_TO_PORT, "got %#lx\n", hr); hr = IDirectMusicPortDownload_Unload(port, download); ok(hr == S_OK, "got %#lx\n", hr);
1
0
0
0
Rémi Bernon : dmusic: Implement IDirectMusicPortDownload_(Download|Unload).
by Alexandre Julliard
05 Sep '23
05 Sep '23
Module: wine Branch: master Commit: 73d1e0663080c4e6020fc7e729e0a0d014ca9d62 URL:
https://gitlab.winehq.org/wine/wine/-/commit/73d1e0663080c4e6020fc7e729e0a0…
Author: Rémi Bernon <rbernon(a)codeweavers.com> Date: Thu Aug 31 18:16:00 2023 +0200 dmusic: Implement IDirectMusicPortDownload_(Download|Unload). --- dlls/dmusic/port.c | 70 ++++++++++++++++++++++++++++++++++++++++++---- dlls/dmusic/tests/dmusic.c | 6 ++-- 2 files changed, 67 insertions(+), 9 deletions(-) diff --git a/dlls/dmusic/port.c b/dlls/dmusic/port.c index 95144a6d905..7dc0257c329 100644 --- a/dlls/dmusic/port.c +++ b/dlls/dmusic/port.c @@ -25,6 +25,14 @@ WINE_DEFAULT_DEBUG_CHANNEL(dmusic); +struct download_entry +{ + struct list entry; + IDirectMusicDownload *download; + HANDLE handle; + DWORD id; +}; + struct synth_port { IDirectMusicPort IDirectMusicPort_iface; IDirectMusicPortDownload IDirectMusicPortDownload_iface; @@ -41,6 +49,7 @@ struct synth_port { int nrofgroups; DMUSIC_PRIVATE_CHANNEL_GROUP group[1]; + struct list downloads; DWORD next_dlid; }; @@ -190,6 +199,15 @@ static ULONG WINAPI synth_port_Release(IDirectMusicPort *iface) if (!ref) { + struct download_entry *entry, *next; + + LIST_FOR_EACH_ENTRY_SAFE(entry, next, &This->downloads, struct download_entry, entry) + { + list_remove(&entry->entry); + IDirectMusicDownload_Release(entry->download); + free(entry); + } + dmusic_remove_port(This->parent, iface); IDirectMusicSynthSink_Release(This->synth_sink); IDirectMusicSynth_Activate(This->synth, FALSE); @@ -624,22 +642,61 @@ static HRESULT WINAPI synth_port_download_GetAppend(IDirectMusicPortDownload *if return S_OK; } -static HRESULT WINAPI synth_port_download_Download(IDirectMusicPortDownload *iface, IDirectMusicDownload *IDMDownload) +static HRESULT WINAPI synth_port_download_Download(IDirectMusicPortDownload *iface, IDirectMusicDownload *download) { struct synth_port *This = synth_from_IDirectMusicPortDownload(iface); + struct download_entry *entry; + DMUS_DOWNLOADINFO *info; + HANDLE handle; + BOOL can_free; + DWORD size; + HRESULT hr; - FIXME("(%p/%p)->(%p): stub\n", iface, This, IDMDownload); + TRACE("(%p/%p)->(%p)\n", iface, This, download); - return S_OK; + if (!download) return E_POINTER; + + LIST_FOR_EACH_ENTRY(entry, &This->downloads, struct download_entry, entry) + if (entry->download == download) return DMUS_E_ALREADY_DOWNLOADED; + + if (!(entry = malloc(sizeof(*entry)))) return E_OUTOFMEMORY; + if (SUCCEEDED(hr = IDirectMusicDownload_GetBuffer(download, (void **)&info, &size)) + && SUCCEEDED(hr = IDirectMusicSynth_Download(This->synth, &handle, info, &can_free))) + { + entry->download = download; + IDirectMusicDownload_AddRef(download); + entry->id = info->dwDLId; + entry->handle = handle; + list_add_tail(&This->downloads, &entry->entry); + } + + if (FAILED(hr)) free(entry); + return hr; } -static HRESULT WINAPI synth_port_download_Unload(IDirectMusicPortDownload *iface, IDirectMusicDownload *IDMDownload) +static HRESULT WINAPI synth_port_download_Unload(IDirectMusicPortDownload *iface, IDirectMusicDownload *download) { struct synth_port *This = synth_from_IDirectMusicPortDownload(iface); + struct download_entry *entry; + HANDLE handle = 0; - FIXME("(%p/%p)->(%p): stub\n", iface, This, IDMDownload); + TRACE("(%p/%p)->(%p)\n", iface, This, download); - return S_OK; + if (!download) return E_POINTER; + + LIST_FOR_EACH_ENTRY(entry, &This->downloads, struct download_entry, entry) + { + if (entry->download == download) + { + list_remove(&entry->entry); + IDirectMusicDownload_Release(entry->download); + handle = entry->handle; + free(entry); + break; + } + } + + return IDirectMusicSynth_Unload(This->synth, handle, NULL, NULL); } static const IDirectMusicPortDownloadVtbl synth_port_download_vtbl = { @@ -795,6 +852,7 @@ HRESULT synth_port_create(IDirectMusic8Impl *parent, DMUS_PORTPARAMS *port_param obj->parent = parent; obj->active = FALSE; obj->params = *port_params; + list_init(&obj->downloads); hr = CoCreateInstance(&CLSID_DirectMusicSynth, NULL, CLSCTX_INPROC_SERVER, &IID_IDirectMusicSynth, (void **)&obj->synth); diff --git a/dlls/dmusic/tests/dmusic.c b/dlls/dmusic/tests/dmusic.c index 8cfcc11ffd8..13716c096e9 100644 --- a/dlls/dmusic/tests/dmusic.c +++ b/dlls/dmusic/tests/dmusic.c @@ -1122,7 +1122,7 @@ static void test_port_download(void) todo_wine ok(hr == DMUS_E_NOT_DOWNLOADED_TO_PORT, "got %#lx\n", hr); hr = IDirectMusicPortDownload_Download(port, NULL); - todo_wine ok(hr == E_POINTER, "got %#lx\n", hr); + ok(hr == E_POINTER, "got %#lx\n", hr); hr = IDirectMusicPortDownload_Download(port, download); todo_wine ok(hr == DMUS_E_UNKNOWNDOWNLOAD, "got %#lx\n", hr); @@ -1145,7 +1145,7 @@ static void test_port_download(void) hr = IDirectMusicPortDownload_Download(port, download); ok(hr == S_OK, "got %#lx\n", hr); hr = IDirectMusicPortDownload_Download(port, download); - todo_wine ok(hr == DMUS_E_ALREADY_DOWNLOADED, "got %#lx\n", hr); + ok(hr == DMUS_E_ALREADY_DOWNLOADED, "got %#lx\n", hr); tmp_download = invalid_ptr; hr = IDirectMusicPortDownload_GetBuffer(port, 2, &tmp_download); @@ -1154,7 +1154,7 @@ static void test_port_download(void) if (tmp_download != invalid_ptr) IDirectMusicDownload_Release(tmp_download); hr = IDirectMusicPortDownload_Unload(port, NULL); - todo_wine ok(hr == E_POINTER, "got %#lx\n", hr); + ok(hr == E_POINTER, "got %#lx\n", hr); hr = IDirectMusicPortDownload_Unload(port, download); ok(hr == S_OK, "got %#lx\n", hr);
1
0
0
0
← Newer
1
...
78
79
80
81
82
83
84
...
92
Older →
Jump to page:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
Results per page:
10
25
50
100
200