[Asterisk-cvs] asterisk/apps app_festival.c,1.11,1.12

jeremy at lists.digium.com jeremy at lists.digium.com
Sun Jan 11 02:41:04 CST 2004


Update of /usr/cvsroot/asterisk/apps
In directory mongoose.digium.com:/tmp/cvs-serv30000

Modified Files:
	app_festival.c 
Log Message:
fix festival for big endian. Bug #709


Index: app_festival.c
===================================================================
RCS file: /usr/cvsroot/asterisk/apps/app_festival.c,v
retrieving revision 1.11
retrieving revision 1.12
diff -u -d -r1.11 -r1.12
--- app_festival.c	30 Dec 2003 10:07:55 -0000	1.11
+++ app_festival.c	11 Jan 2004 08:32:50 -0000	1.12
@@ -106,6 +106,10 @@
 
         int res;
         int x;
+#ifdef __PPC__ 
+	char c;
+#endif
+
         res = fork();
         if (res < 0)
                 ast_log(LOG_WARNING, "Fork failed\n");
@@ -115,6 +119,16 @@
                 if (x != fd)
                         close(x);
         }
+//IAS
+#ifdef __PPC__  
+	for( x=0; x<length; x+=2)
+	{
+		c = *(waveform+x+1);
+		*(waveform+x+1)=*(waveform+x);
+		*(waveform+x)=c;
+	}
+#endif
+	
 	write(fd,waveform,length);
 	write(fd,"a",1);
 	close(fd);




More information about the svn-commits mailing list