Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: version 1.0 Netnews CMS/BITNET; site NCSUVM.BITNET Path: utzoo!linus!philabs!cmcl2!seismo!rochester!cmu-cs-pt!cadre!psuvax1!psuvm.bitnet!ncsuvm!alan From: ALAN@NCSUVM.BITNET Newsgroups: net.sources.mac Subject: MacIntalk <--> Aztec C Demo Source Message-ID: <49@NCSUVM> Date: Thu, 8-Aug-85 01:47:59 EDT Article-I.D.: NCSUVM.49 Posted: Thu Aug 8 01:47:59 1985 Date-Received: Sun, 11-Aug-85 04:51:02 EDT Lines: 62 Here is a short file written using the Aztec C <--> MacIntalk interface that I posted for Mike the other day. The Binary (BinHex 4.0 format) will be in the next file from NCSUVM... Author: Michael Hecht, Poster: Alan Clegg, ALAN@NCSUVM.BITNET -----------------------------------Cut Here----------------------------------- #include#include "speech.h" main( argc, argv ) int argc; char **argv; { SpeechHandle theSpeech; register SpeechErr err; register Handle output; register char * cp; err = SpeechOn( noExcpsFile, &theSpeech ); if( err ) { printf( "SpeechOn, err=%d\n", err ); return err; } output = NewHandle(( Size )0 ); for( argc--, argv++; argc; argc-- ) { cp = *argv++; /* Handle switches */ if( cp[ 0 ] == '-' ) switch( cp[ 1 ] ) { case 'r': SpeechRate( theSpeech, atoi( cp+2 )); continue; break; case 's': SpeechSex( theSpeech, atoi( cp+2 )); continue; break; case 'p': SpeechPitch( theSpeech, atoi( cp+2 ), NoChange ); continue; break; case 'm': SpeechPitch( theSpeech, 0, atoi( cp+2 ) ); continue; break; } err = Reader( theSpeech, cp, ( long )strlen( cp ), output ); if( err ) { printf( "Reader, err=%d\n", err ); return err; } printf( "%s ", cp ); err = MacinTalk( theSpeech, output ); if ( err ) { printf( "MacinTalk, err=%d\n", err ); return err; } } printf( "\n" ); SpeechOff( theSpeech ); DisposHandle( output ); }