shithub: flite

Download patch

ref: 3b16ff8b7f3fcefd80e31ff057312b3b811197c8
parent: de2bbb38c989acdd89310b4f8a2d04b1c5402e2b
author: Kubo Takehiro <kubo@jiubao.org>
date: Sun Jun 24 15:02:46 EDT 2018

Use DWORD_PTR instead of DWORD when DWORD_PTR is available in au_wince.c.

--- a/src/audio/au_wince.c
+++ b/src/audio/au_wince.c
@@ -43,6 +43,10 @@
 #include "cst_audio.h"
 #include "cst_alloc.h"
 
+#ifndef MAXULONG_PTR
+#define DWORD_PTR DWORD
+#endif
+
 typedef struct au_wince_pdata_struct {
 	HWAVEOUT wo;
 	HANDLE bevt;
@@ -84,7 +88,7 @@
 }
 
 static void CALLBACK sndbuf_done(HWAVEOUT drvr, UINT msg,
-			  DWORD udata, DWORD param1, DWORD param2)
+			  DWORD_PTR udata, DWORD_PTR param1, DWORD_PTR param2)
 {
     WAVEHDR *hdr = (WAVEHDR *)param1;
     cst_audiodev *ad = (cst_audiodev *)udata;
@@ -137,7 +141,7 @@
     wfx.nBlockAlign = wfx.nChannels*wfx.wBitsPerSample/8;
     wfx.nAvgBytesPerSec = wfx.nSamplesPerSec*wfx.nBlockAlign;
     err = waveOutOpen(&wo,WAVE_MAPPER,&wfx,
-                      (DWORD)sndbuf_done,(DWORD)ad,
+                      (DWORD_PTR)sndbuf_done,(DWORD_PTR)ad,
                       CALLBACK_FUNCTION);
     if (err != MMSYSERR_NOERROR)
     {