shithub: flite

Download patch

ref: 99d8b205ba2bad5287eb55dc1a76b769a541cd2b
parent: fdddc374e9b47bdc5c74c3cd6faa7dabb2cc4c87
author: Ben Zeigler <benzeigler@gmail.com>
date: Fri Feb 9 10:29:02 EST 2018

Fix win64 compilation/execution

Fix compilation on windows by making functions static and removing missing
Fix win64 execution by using correct size types

--- a/src/audio/au_win.c
+++ b/src/audio/au_win.c
@@ -58,7 +58,7 @@
   int fqmaxlen;
 } au_win_pdata;
 
-void add_to_free_queue(cst_audiodev *ad, void *datum)
+static void add_to_free_queue(cst_audiodev *ad, void *datum)
 {
     au_win_pdata *pd = ad->platform_data;
 
@@ -87,8 +87,8 @@
     cst_free(hdr);
 }
 
-void CALLBACK sndbuf_done(HWAVEOUT drvr, UINT msg,
-			  DWORD udata, DWORD param1, DWORD param2)
+static void CALLBACK sndbuf_done(HWAVEOUT drvr, UINT msg,
+			  DWORD_PTR udata, DWORD_PTR param1, DWORD_PTR param2)
 {
     WAVEHDR *hdr = (WAVEHDR *)param1;
     cst_audiodev *ad = (cst_audiodev *)udata;
@@ -141,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)
     {
--- a/src/audio/au_wince.c
+++ b/src/audio/au_wince.c
@@ -54,7 +54,7 @@
   int fqmaxlen;
 } au_wince_pdata;
 
-void add_to_free_queue(cst_audiodev *ad, void *datum)
+static void add_to_free_queue(cst_audiodev *ad, void *datum)
 {
     au_wince_pdata *pd = ad->platform_data;
 
@@ -83,7 +83,7 @@
     cst_free(hdr);
 }
 
-void CALLBACK sndbuf_done(HWAVEOUT drvr, UINT msg,
+static void CALLBACK sndbuf_done(HWAVEOUT drvr, UINT msg,
 			  DWORD udata, DWORD param1, DWORD param2)
 {
     WAVEHDR *hdr = (WAVEHDR *)param1;