mirror of
https://gitlab.winehq.org/wine/wine-staging.git
synced 2024-09-13 09:17:20 -07:00
Rebase against 3f4f116dc52c2d37b98e62c3d9bdd8a79e44ccc1.
This commit is contained in:
parent
7ab0b0f5f5
commit
f75a04e4aa
@ -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 <leslie_alistair@hotmail.com>
|
||||
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
|
||||
|
@ -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 <leslie_alistair@hotmail.com>
|
||||
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
|
||||
|
@ -1 +1 @@
|
||||
d5b64a1f14b472563c95a02d0062ba592c64e06a
|
||||
3f4f116dc52c2d37b98e62c3d9bdd8a79e44ccc1
|
||||
|
Loading…
Reference in New Issue
Block a user