Huw Davies : winealsa: Pass a client ptr to the callback instead of a stream.

Alexandre Julliard julliard at winehq.org
Fri Apr 22 14:46:03 CDT 2022


Module: wine
Branch: master
Commit: 3f545935e0d7c28466cc5fc1c200a565c6e838c0
URL:    https://source.winehq.org/git/wine.git/?a=commit;h=3f545935e0d7c28466cc5fc1c200a565c6e838c0

Author: Huw Davies <huw at codeweavers.com>
Date:   Fri Apr 22 08:37:53 2022 +0100

winealsa: Pass a client ptr to the callback instead of a stream.

This is to allow stream handles to be larger than sizeof(void *).

Signed-off-by: Huw Davies <huw at codeweavers.com>
Signed-off-by: Jacek Caban <jacek at codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>

---

 dlls/winealsa.drv/mmdevdrv.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/dlls/winealsa.drv/mmdevdrv.c b/dlls/winealsa.drv/mmdevdrv.c
index 7dc01940dc9..81967f9ffe0 100644
--- a/dlls/winealsa.drv/mmdevdrv.c
+++ b/dlls/winealsa.drv/mmdevdrv.c
@@ -243,10 +243,10 @@ static HRESULT alsa_stream_release(struct alsa_stream *stream, HANDLE timer_thre
 
 static DWORD WINAPI alsa_timer_thread(void *user)
 {
-    struct alsa_stream *stream = user;
     struct timer_loop_params params;
+    struct ACImpl *This = user;
 
-    params.stream = stream;
+    params.stream = This->stream;
 
     ALSA_CALL(timer_loop, &params);
 
@@ -954,7 +954,7 @@ static HRESULT WINAPI AudioClient_Start(IAudioClient3 *iface)
     ALSA_CALL(start, &params);
 
     if(SUCCEEDED(params.result) && !This->timer_thread){
-        This->timer_thread = CreateThread(NULL, 0, alsa_timer_thread, This->stream, 0, NULL);
+        This->timer_thread = CreateThread(NULL, 0, alsa_timer_thread, This, 0, NULL);
         SetThreadPriority(This->timer_thread, THREAD_PRIORITY_TIME_CRITICAL);
     }
 




More information about the wine-cvs mailing list