From f75a04e4aa46faf9981f14c8a759eb656b09f18a Mon Sep 17 00:00:00 2001 From: Alistair Leslie-Hughes Date: Thu, 5 Oct 2023 10:20:15 +1100 Subject: [PATCH] Rebase against 3f4f116dc52c2d37b98e62c3d9bdd8a79e44ccc1. --- ...lement-IDirectMusicSegment8-Download.patch | 19 +++--- ...nd-in-IDirectMusicPerformance8-PlayS.patch | 59 ++++++++----------- staging/upstream-commit | 2 +- 3 files changed, 33 insertions(+), 47 deletions(-) diff --git a/patches/dmime-load-wave/0002-dmime-Implement-IDirectMusicSegment8-Download.patch b/patches/dmime-load-wave/0002-dmime-Implement-IDirectMusicSegment8-Download.patch index ff0aca4b..976888e7 100644 --- a/patches/dmime-load-wave/0002-dmime-Implement-IDirectMusicSegment8-Download.patch +++ b/patches/dmime-load-wave/0002-dmime-Implement-IDirectMusicSegment8-Download.patch @@ -1,29 +1,28 @@ -From aa953a66080d49a697101fb55a1bd950de4a59db Mon Sep 17 00:00:00 2001 +From d32988c911aae73ec81242cd8f6ae37e078d212f Mon Sep 17 00:00:00 2001 From: Alistair Leslie-Hughes Date: Fri, 2 Dec 2022 14:41:30 +1100 Subject: [PATCH] dmime: Implement IDirectMusicSegment8 Download --- - dlls/dmime/dmime_private.h | 2 + + dlls/dmime/dmime_private.h | 1 + dlls/dmime/performance.c | 7 ++++ dlls/dmime/segment.c | 84 +++++++++++++++++++++++++++++++++++++- - 3 files changed, 92 insertions(+), 1 deletion(-) + 3 files changed, 91 insertions(+), 1 deletion(-) diff --git a/dlls/dmime/dmime_private.h b/dlls/dmime/dmime_private.h -index eacde4b46be..cd34378b66e 100644 +index c35c52eb066..ca8323fc525 100644 --- a/dlls/dmime/dmime_private.h +++ b/dlls/dmime/dmime_private.h -@@ -70,6 +70,8 @@ extern void set_audiopath_perf_pointer(IDirectMusicAudioPath*,IDirectMusicPerfor - extern void set_audiopath_dsound_buffer(IDirectMusicAudioPath*,IDirectSoundBuffer*); - extern void set_audiopath_primary_dsound_buffer(IDirectMusicAudioPath*,IDirectSoundBuffer*); +@@ -72,6 +72,7 @@ extern void set_audiopath_primary_dsound_buffer(IDirectMusicAudioPath*,IDirectSo + extern HRESULT segment_state_create(IDirectMusicSegment *segment, MUSIC_TIME start_time, + IDirectMusicSegmentState **ret_iface); +extern IDirectSound *get_dsound_interface(IDirectMusicPerformance8*); -+ + /***************************************************************************** * Auxiliary definitions - */ diff --git a/dlls/dmime/performance.c b/dlls/dmime/performance.c -index 111d7c60568..8a418b8df13 100644 +index 9f293358ca6..3658c16c187 100644 --- a/dlls/dmime/performance.c +++ b/dlls/dmime/performance.c @@ -251,6 +251,13 @@ static inline struct performance *impl_from_IDirectMusicPerformance8(IDirectMusi diff --git a/patches/dmime-load-wave/0003-dmime-Play-a-sound-in-IDirectMusicPerformance8-PlayS.patch b/patches/dmime-load-wave/0003-dmime-Play-a-sound-in-IDirectMusicPerformance8-PlayS.patch index 3f53cc38..6bd2edd2 100644 --- a/patches/dmime-load-wave/0003-dmime-Play-a-sound-in-IDirectMusicPerformance8-PlayS.patch +++ b/patches/dmime-load-wave/0003-dmime-Play-a-sound-in-IDirectMusicPerformance8-PlayS.patch @@ -1,63 +1,50 @@ -From 5c84cc44881073aa756e4797a776acbde4d063ae Mon Sep 17 00:00:00 2001 +From b9c561a99b7034e3cac64ab85e4d50a6fb0c304c Mon Sep 17 00:00:00 2001 From: Alistair Leslie-Hughes Date: Mon, 12 Dec 2022 15:20:10 +1100 Subject: [PATCH] dmime: Play a sound in IDirectMusicPerformance8 PlaySegmentEx --- - dlls/dmime/dmime_private.h | 1 + - dlls/dmime/performance.c | 25 +++++++++++++++++++------ - dlls/dmime/segment.c | 6 ++++++ - 3 files changed, 26 insertions(+), 6 deletions(-) + dlls/dmime/dmime_private.h | 1 + + dlls/dmime/performance.c | 6 ++++++ + dlls/dmime/segment.c | 6 ++++++ + 3 files changed, 13 insertions(+) diff --git a/dlls/dmime/dmime_private.h b/dlls/dmime/dmime_private.h -index cd34378b66e..c83f6675333 100644 +index ca8323fc525..2b4537233fc 100644 --- a/dlls/dmime/dmime_private.h +++ b/dlls/dmime/dmime_private.h -@@ -71,6 +71,7 @@ extern void set_audiopath_dsound_buffer(IDirectMusicAudioPath*,IDirectSoundBuffe - extern void set_audiopath_primary_dsound_buffer(IDirectMusicAudioPath*,IDirectSoundBuffer*); - +@@ -73,6 +73,7 @@ extern void set_audiopath_primary_dsound_buffer(IDirectMusicAudioPath*,IDirectSo + extern HRESULT segment_state_create(IDirectMusicSegment *segment, MUSIC_TIME start_time, + IDirectMusicSegmentState **ret_iface); extern IDirectSound *get_dsound_interface(IDirectMusicPerformance8*); +extern IDirectSoundBuffer *get_segment_buffer(IDirectMusicSegment8 *iface); /***************************************************************************** * Auxiliary definitions diff --git a/dlls/dmime/performance.c b/dlls/dmime/performance.c -index 8a418b8df13..a0dbdbd5aad 100644 +index 3658c16c187..14831e72ba3 100644 --- a/dlls/dmime/performance.c +++ b/dlls/dmime/performance.c -@@ -1075,13 +1075,26 @@ static HRESULT WINAPI performance_PlaySegmentEx(IDirectMusicPerformance8 *iface, - WCHAR *pwzSegmentName, IUnknown *pTransition, DWORD dwFlags, __int64 i64StartTime, - IDirectMusicSegmentState **ppSegmentState, IUnknown *pFrom, IUnknown *pAudioPath) - { -- struct performance *This = impl_from_IDirectMusicPerformance8(iface); -+ struct performance *This = impl_from_IDirectMusicPerformance8(iface); -+ IDirectMusicSegment8 *segment; +@@ -1078,6 +1078,7 @@ static HRESULT WINAPI performance_PlaySegmentEx(IDirectMusicPerformance8 *iface, + IDirectMusicSegmentState *state; + IDirectMusicSegment *segment; + HRESULT hr; + IDirectSoundBuffer *buffer; -+ HRESULT hr; -- FIXME("(%p, %p, %p, %p, %ld, 0x%s, %p, %p, %p): stub\n", This, pSource, pwzSegmentName, -- pTransition, dwFlags, wine_dbgstr_longlong(i64StartTime), ppSegmentState, pFrom, pAudioPath); -- if (ppSegmentState) -- return create_dmsegmentstate(&IID_IDirectMusicSegmentState,(void**)ppSegmentState); -- return S_OK; -+ FIXME("(%p, %p, %p, %p, %ld, 0x%s, %p, %p, %p): semi-stub\n", This, pSource, pwzSegmentName, -+ pTransition, dwFlags, wine_dbgstr_longlong(i64StartTime), ppSegmentState, pFrom, pAudioPath); -+ -+ hr = IUnknown_QueryInterface(pSource, &IID_IDirectMusicSegment8, (void**)&segment); -+ if (FAILED(hr)) -+ return hr; -+ + FIXME("(%p, %p, %s, %p, %#lx, %I64d, %p, %p, %p): stub\n", This, source, debugstr_w(segment_name), + transition, segment_flags, start_time, segment_state, from, audio_path); +@@ -1096,6 +1097,11 @@ static HRESULT WINAPI performance_PlaySegmentEx(IDirectMusicPerformance8 *iface, + IDirectMusicSegmentState_AddRef(state); + } + + buffer = get_segment_buffer(segment); + + if (segment) + hr = IDirectSoundBuffer_Play(buffer, 0, 0, 0); + -+ if (ppSegmentState) -+ return create_dmsegmentstate(&IID_IDirectMusicSegmentState,(void**)ppSegmentState); -+ return S_OK; - } - - static HRESULT WINAPI performance_StopEx(IDirectMusicPerformance8 *iface, IUnknown *pObjectToStop, + IDirectMusicSegmentState_Release(state); + IDirectMusicSegment_Release(segment); + return hr; diff --git a/dlls/dmime/segment.c b/dlls/dmime/segment.c index 284564749df..af76258c979 100644 --- a/dlls/dmime/segment.c diff --git a/staging/upstream-commit b/staging/upstream-commit index afe64d21..9e5cf0c1 100644 --- a/staging/upstream-commit +++ b/staging/upstream-commit @@ -1 +1 @@ -d5b64a1f14b472563c95a02d0062ba592c64e06a +3f4f116dc52c2d37b98e62c3d9bdd8a79e44ccc1