diff options
author | jeremy <jeremy@f38db490-d61c-443f-a65b-d21fe96a405b> | 2004-01-11 08:32:50 +0000 |
---|---|---|
committer | jeremy <jeremy@f38db490-d61c-443f-a65b-d21fe96a405b> | 2004-01-11 08:32:50 +0000 |
commit | 7e057382e99d3da0c0bc4b38ddce0059930e6224 (patch) | |
tree | 0213eb10c5c1fb7b9cf986fb5dc32e62b44025a8 /apps/app_festival.c | |
parent | 266b66e541af4cf22331ed6816468a803761484f (diff) |
fix festival for big endian. Bug #709
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@1937 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'apps/app_festival.c')
-rwxr-xr-x | apps/app_festival.c | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/apps/app_festival.c b/apps/app_festival.c index 0cbe48b57..cb7225d31 100755 --- a/apps/app_festival.c +++ b/apps/app_festival.c @@ -106,6 +106,10 @@ static int send_waveform_to_fd(char *waveform, int length, int fd) { 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 @@ static int send_waveform_to_fd(char *waveform, int length, int fd) { 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); |