7272#ifndef _TTS_H_
7373#define _TTS_H_
7474
75- #ifdef WIN32_OLD
76- #include <windows.h>
77- #include <mmreg.h>
78- #include <stdio.h>
79- // cjl 19nov97 add ifdef for sapi only.
80- #ifdef OLEDECTALK
81- // cjl 19nov97 change speech.h to local
82- #include "speech.h"
83- #endif //OLEDECTALK
84- #endif
85-
8675#include "port.h"
8776
88- #if defined __unix__ || defined VXWORKS || defined _SPARC_SOLARIS_ || defined __EMSCRIPTEN__ || defined (__APPLE__ )
89- #define HWND unsigned long
77+ #define HWND size_t
9078#include "dtmmedefs.h"
91- #endif
92-
93- #ifndef ARM7
94- //#include "opthread.h" /*Platform-independent Threads implementation header file*/
95- //#include "playaud.h"
96- #endif
9779
9880/* GL 04/21/1997 add this as the latest OSF code */
99- #if defined __osf__ || defined __unix__ || defined VXWORKS || defined _SPARC_SOLARIS_ || defined __EMSCRIPTEN__ || defined (__APPLE__ )
10081//typedef HPLAY_AUDIO_T LPAUDIO_HANDLE_T;
101- #endif
10282
10383#ifdef OLEDECTALK //MVP: For OLE-DECTalk
10484#include "audioapi.h"
10585#endif
10686
107- #ifdef SAPI5DECTALK
108- #include "sapiiont.h"
109- #endif
110-
11187#include "kernel.h" /* Added for PKSD_T declaration MI :MVP */
11288
11389#ifndef ACI_LICENSE //tek 01may97
11894
11995/* DECtalk Version Numbers moved to coop.h: 11/22/96 CJL */
12096#include "coop.h"
121- #if !defined __unix__ && !defined VXWORKS && !defined _SPARC_SOLARIS_ && !defined __EMSCRIPTEN__ && !defined (__APPLE__ )
122- /* externs for global variables :MVP */
123- extern volatile int gnInstanceCounter ;
124- #ifndef ARM7
125- extern TLOCK tl_gnInstanceCounter ; // tek 27may98
126- #endif
127- #endif
12897
12998extern int * gpufdic_index ;
13099extern unsigned char * gpufdic_data ;
@@ -145,14 +114,12 @@ extern DT_HANDLE gufordicFileHandle;
145114extern LPVOID gufordicMapStartAddr ;
146115
147116/* GL 04/21/1997 add this as the latest OSF code */
148- #if defined __unix__ || defined VXWORKS || defined _SPARC_SOLARIS_ || defined __osf__ || defined __EMSCRIPTEN__ || defined (__APPLE__ )
149117/**********************************************************************/
150118/* Sybmol definitiopns for return status from CheckLicenses */
151119/**********************************************************************/
152120#define LIC_NO_PAK 1
153121#define LIC_NO_MORE_UNITS 2
154122#define LIC_UNKNOWN_ERR 3
155- #endif
156123
157124/**********************************************************************/
158125/* Symbol definitions for the Text-To-Speech output state. */
@@ -174,7 +141,6 @@ extern LPVOID gufordicMapStartAddr;
174141/* There is an additiona undocumented 32 bit word that had to be */
175142/* added to make the files formats match the examples. */
176143/**********************************************************************/
177- #ifndef ARM7
178144
179145typedef struct WAVE_FILE_HDR_TAG
180146{
@@ -210,9 +176,7 @@ typedef struct AU_FILE_HDR_TAG
210176typedef AU_FILE_HDR_T * LPAU_FILE_HDR_T ;
211177
212178#define AU_HEADER_OFFSET 32
213- #endif
214179/* GL 04/21/1997 add this as the latest OSF code */
215- #if defined (__osf__ ) || defined (__unix__ ) || defined VXWORKS || defined _SPARC_SOLARIS_ || defined __EMSCRIPTEN__ || defined (NOWIN ) || defined (__APPLE__ )
216180/**********************************************************************/
217181/* Text Message Linked List structure for digital unix. */
218182/**********************************************************************/
@@ -226,52 +190,20 @@ struct TEXT_MSG_TAG
226190
227191typedef struct TEXT_MSG_TAG TEXT_MSG_T ;
228192typedef TEXT_MSG_T * LPTEXT_MSG_T ;
229- #endif /* __osf__ || __unix__ */
230193
231194/**********************************************************************/
232195/* This structure is the text to speech handle. */
233196/**********************************************************************/
234197
235- #ifdef ARM7
236- typedef unsigned int UINT ;
237- typedef unsigned char BOOL ;
238- typedef unsigned short WORD ;
239- typedef long LONG ;
240- #endif
241-
242198struct TTS_HANDLE_TAG
243199{
244- #ifndef ARM7
245200 HWND hWnd ;
246201 HWND hTextToSpeechWnd ;
247- #endif
248202 PKSD_T pKernelShareData ; /* Added for Multiple instance speech objects: MVP*/
249203 PVOID pCMDThreadData ; /* Instance specific CMD thread data */
250204 PVOID pLTSThreadData ; /* Instance specific LTS thread data */
251205 PVOID pVTMThreadData ; /* Instance specific VTM thread data */
252206 PVOID pPHThreadData ; /* Instance specific PH thread data */
253- #ifdef WIN32_OLD
254- DT_HANDLE hMallocSuccessEvent ; /* Event handle to report successful memory allocations */
255- DT_HANDLE hThread_TXT ;
256- DT_HANDLE hThread_CMD ;
257- DT_HANDLE hThread_SYNC ;
258- DT_HANDLE hSyncEvent ;
259- DT_HANDLE hNotEmptyingVtmPipeEvent ;
260- #endif // WIN32_OLD
261-
262- /* GL 04/21/1997 add this as the latest OSF code */
263- #if defined (__osf__ ) || defined (__unix__ ) || defined VXWORKS || defined _SPARC_SOLARIS_ || defined __EMSCRIPTEN__ || defined (__APPLE__ )
264- //HEVENT_T hMallocSuccessEvent; /* Event handle to report successful memory allocations */
265- //HTHREAD_T hThread_TXT;
266- //HTHREAD_T hThread_CMD;
267- //HTHREAD_T hThread_SYNC;
268- //HEVENT_T hSyncEvent;
269- //HEVENT_T hNotEmptyingVtmPipeEvent;
270- //HEVENT_T hTextInQueueEvent;
271- //UINT uiTextThreadExit;
272- //UINT uiThreadError;
273- /* MGS 09/15/1997 removed bInReset from osf/linux only */
274- #endif
275207
276208#ifdef DEMO_NOISE
277209 int char_count ;
@@ -301,74 +233,19 @@ struct TTS_HANDLE_TAG
301233 BOOL bMemoryReset ;
302234 BOOL bSendingBuffer ;
303235
304- #ifndef ARM7
305236 LPWAVE_FILE_HDR_T pWaveFileHdr ;
306237 LPAU_FILE_HDR_T pAuFileHdr ;
307- #ifdef UNDER_CE // must be a handle for Windows CE
308- DT_HANDLE pWaveFile ;
309- DT_HANDLE pLogFile ;
310- #else
311238 FILE * pWaveFile ;
312239 FILE * pLogFile ;
313- #endif
314- #endif // ARM7
315240
316241 void * pTTS_Buffer ;
317242
318243 // epsonapi callback
319244 short * (* EmbCallbackRoutine )(short * , long , int ); // audio, length, phoneme
320245
321- #ifdef ARM7
322- #ifndef EPSON_ARM7
323- //short *(*EmbCallbackRoutine)(short *,S32);
324- #endif
325- short * output_buffer ;
326- #ifdef EPSON_ARM7
327- int TTP_return_code ;
328- S16 TTP_phoneme_buf_len ;
329- S16 * TTP_phoneme_buf ;
330- S16 PTS_phoneme_buf_len ;
331- S16 * PTS_phoneme_buf ;
332- int PTS_return_code ;
333- int TTP_return ;
334- int PTS_return ;
335- int PTS_location ;
336- int PTS_input_pos ;
337- int PTS_special_change ;
338- void (* main_lts_loop )(void * ,unsigned short * );
339- #endif
340- #else
341246 void (* DtCallbackRoutine )(LONG ,LONG ,DWORD ,UINT ); //New Audio Integration :After testing remove these comments
342- #endif
343247
344248 DWORD dwTTSInstanceParameter ; //New Audio Integration
345- #ifdef WIN32_OLD
346- HMUTEX_T hmxCallback ; //New Audio Integration
347- LPCRITICAL_SECTION pcsMemoryBuffer ;
348- LPCRITICAL_SECTION pcsQueuedSampleCount ;
349- LPCRITICAL_SECTION pcsLastQueuedTextMsgNumber ;
350- LPCRITICAL_SECTION pcsFlushMsgNumber ;
351- LPCRITICAL_SECTION pcsQueuedCharacterCount ;
352- LPCRITICAL_SECTION pcsLogFile ;
353- LPCRITICAL_SECTION pcsBufferPipe ;
354- // LPAUDIO_HANDLE_T pAudioHandle;
355- BOOL IsSpeaking ;
356- ULONG LastError ;
357- #endif
358- /* GL 04/21/1997 add this as the latest OSF code */
359- #if defined (__osf__ ) || defined (__unix__ ) || defined VXWORKS || defined _SPARC_SOLARIS_ || defined __EMSCRIPTEN__ || defined (__APPLE__ )
360- //HMUTEX_T pcsCallback; /*New Audio Integration*/
361- //HMUTEX_T pcsMemoryBuffer;
362- //HMUTEX_T pcsQueuedSampleCount;
363- //HMUTEX_T pcsLastQueuedTextMsgNumber;
364- //HMUTEX_T pcsFlushMsgNumber;
365- //HMUTEX_T pcsQueuedCharacterCount;
366- //HMUTEX_T pcsLogFile;
367- //HMUTEX_T pcsTextMsgList;
368- //HMUTEX_T pcsBufferPipe;
369- //LPTEXT_MSG_T pTextMsgList; /* A linked list of text messages */
370- //unsigned int LastError;
371- #endif
372249
373250#ifdef NOWIN
374251 //HEVENT_T hTextInQueueEvent;
@@ -378,10 +255,6 @@ struct TTS_HANDLE_TAG
378255 //LPTEXT_MSG_T pTextMsgList; /* A linked list of text messages */
379256#endif
380257
381- #ifndef ARM7
382- //LPAUDIO_HANDLE_T pAudioHandle;
383- #endif
384-
385258#ifndef ACI_LICENSE
386259#ifdef DTALK_50
387260 LPCPTHREAD CPanelThread ;
@@ -411,19 +284,14 @@ struct TTS_HANDLE_TAG
411284 //int bisau;
412285#endif
413286
414- #ifdef WIN32_OLD
415- TCHAR dictionary_file_name [500 ];
416- #else
417287 char dictionary_file_name [500 ];
418- #endif
419288 int last_syl ;
420289};
421290
422291/**********************************************************************/
423292/* Define the audio sample type */
424293/**********************************************************************/
425294
426- #ifndef ARM7
427295typedef short SAMPLE_T ;
428296
429297typedef SAMPLE_T * LPSAMPLE_T ;
@@ -480,7 +348,6 @@ typedef struct NOTIFY_LIST
480348
481349//#endif //WIN32_OLD
482350// end of sapi fixes
483- #endif // ARM7
484351/**********************************************************************/
485352/* Define the API interface. */
486353/**********************************************************************/
@@ -541,23 +408,15 @@ typedef struct SPDEFS_TAG {
541408/* (Functions WriteAudioToFile() and QueueInMemory() are included */
542409/* directly in the Vocal Tract Model task in file vtmiont.c. */
543410/**********************************************************************/
544- #ifndef ARM7
545-
546411void TextToSpeechErrorHandler ( LPTTS_HANDLE_T ,
547412 UINT ,
548413 MMRESULT );
549414
550415/* MVP : This fucntion is become now obsolete
551416LPTTS_HANDLE_T TextToSpeechGetHandle(void);
552417*/
553- #ifdef WIN32_OLD
554- void Report_TTS_Status ( LPTTS_HANDLE_T ttsHandle , UINT uiMsg , long lParam1 , long lParam2 );
555- #endif
556418
557- /* GL 04/21/1997 add this as the latest OSF code */
558- #if defined __unix__ || defined VXWORKS || defined _SPARC_SOLARIS_ || defined __osf__ || defined __EMSCRIPTEN__ || defined (__APPLE__ )
559419void Report_TTS_Status ( LPTTS_HANDLE_T phTTS , UINT uiMsg , long lParam1 , long lParam2 );
560- #endif
561420
562421void QueueToMemory ( LPTTS_HANDLE_T , LPSAMPLE_T , DWORD );
563422
@@ -571,6 +430,4 @@ void EmptyVtmPipe(PKSD_T);
571430void WINprintf (char * fmt , ...);
572431#endif
573432
574- #endif // ARM7
575-
576433#endif // _TTS_H_
0 commit comments