STEPS TO BUILDING PCTTY author: Paul Cheffers 1999 to present email: paul@securecottage.com PCTTY uses MFC classes. PCTTY is a hodgepodge program that nevertheless has a sound Windows foundation. It successfully records sound for hours at a time and will stay up for days. PCTTY has been changed this past year to be a Tapi version 3 sound application. The recording and playback code have been completely revamped. 1) PCTTY is compiled using the Visual Studio C++ v7.0 (2003) compiler. If you are using a later compiler you may have to change certain parts of the code so that it compiles. It should not be too bad, except that CSTRING has become virtual in later Microsoft compilers. You may have to tangle with that. 2) PCTTY is currently compiled with the Microsoft Text To Speech V4 interfaces (SAPI v4). These came in the Windows SDK (Software Development Kit). The DLLs and the Voices that PCTTY uses are downloadable at http://www.pctty.com However, more is required to build PCTTY as it requires certain .h files and .dll libraries that come with the Windows Software Development Kit. You will probably have to download SAPI v5 and compile and build with these libraries. However, apparently, the calls between SAPI 4 and SAPI 5 are not compatible and so the programming interface in texttospeech.cpp and texttospeech1.cpp may have to be changed if text to speech is actually to work under SAPI v5. The user does not have to have these TTS dlls or voices installed in order to use PCTTY. If he does he is able to send Text To Speech down the phone line. However, the builder of PCTTY from source, does need SAPI software development .h and .dll files to be installed. Perhaps, someone can upgrade PCTTY to deal with SAPI 5 instead of SAPI 4. There is a spchwrap.h (v4) file in the main source directory. You may have to take this out if you upgrade to SAPI v5. You will also have to set include and library search directories in TOOLS/OPTIONS/PROJECTS/VC++ DIRECTORIES to include the SAPI include and library directories. 3) PCTTY is not currently OPEN SOURCE since some remnants of the Microsoft ANSMACH example program are used in the source code. The Microsoft Copyright remains in 3 such files (out of around 200 files in the system). Most of the code in these files has been stripped away or altered, but around 10 percent of the application remains, so PCTTY is not totally open source. The ANSMACH source files are made available as examples to developers in order to write TAPI 3 code, and are freely available to anyone to download and use. In particular, PCTTY uses the Microsoft class ITTAPIEventNotification. 4) PCTTY uses certain C++ classes available at www.codeguru.com. 5) The PCTTY chatclient.java applet was originally written by Mike Kohn but this has, over the years, been modified by Paul Cheffers. 6) Most of the code has been written by Paul Cheffers over the years since 1999. 7) The applications actual name is 'record.exe'. 8) Most of the strings in the application come from the '$quotes' file. This file is in a list of files that is referenced when a string is loaded into PCTTY. Other files can, for instance, be '$Quebec,$French,$quotes'. In this case local Quebecan variations of french will be used, then French, and then if no such string is still found, the english in '$quotes' will be used. This search list can be set in the registry (go to Properites in PCTTY main menu). If you build or add to any of these files, the format is keyvalue\n The separator between the key and the value is actually a TAB key, not a space key. These '$' files are parsed and read into PCTTY at its start. They are stored in AVL (balanced) trees in memory so access is very quick. 9) You may want to recode the source code in internetserver.cpp that forbids web users from dialing Australian international and mobile calls. The preprocessor variable that controls this is #define __NOAUSTRALIANMOBILESORINTERNATIONALNUMBERS__ Currently any attempt to dial a number with a 01 or 04 beginning it is banned by the web side of the program, because it costs me a lot of money to allow those calls. 10) The main application class is in 'record.cpp' and the main dialog box is in 'recorddlg.cpp'. 11) Sound recording, sound playback, sound saving to disk, and sound reading from disk are all in separate threads. There can be as many as 10 to 15 threads running in PCTTY at the same time. 12) if using a VOIP phone line (not a voice modem connected to a phone line), it has been noticed that slow typing from PCTTY will result in garbled text at the TTY on the other end of the phone line. This happens because of sound compression that is lossy (ie., g723 codec) instead of lossless (ie., g711 codec). This does not happen on a voice modem since there is not compression there. This also does not happen on any version of PCTTY that uses TAPI 2 code (earlier versions). This also does not happen if the typing is quick, only when there is a time lapse between characters typed. It has been found that a character of 1000hz sound before a slowly typed baudot character and a character of 1000hz sound after a slowly typed character will do away with much of the sound garbling. Accordingly, PCTTY will insert this sound if you are typing slowly and you are using a VOIP TAPI device, and you are on a version of PCTTY that uses TAPI v3. 13) PCTTY has its own web server, if you turn it on. 14) PCTTY can send and receive email, if you set this up. 15) See http://www.pctty.com for FAQs and more help on the features of PCTTY. 16) See 'readme.txt' in the web subdirectory for how to install the web interface and make a PCTTY bank, several PCTTY programs one a WINDOWS machine scheduled by a Perl script on a LINUX BOx 17) TO BUILD THE RELEASE VERSION INSTEAD OF THE DEBUG VERSION of PCTTY change #include "stdafx.h" to #include "../stdafx.h" in 3 files a) ansmach/callnot.cpp b) ansmach/incoming.cpp c) ansmach/term.cpp These are the three Microsoft files that are in the system.