mirror of
https://github.com/asterisk/asterisk.git
synced 2025-09-04 03:50:31 +00:00
fix festival for big endian. Bug #709
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@1937 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
@@ -106,6 +106,10 @@ static int send_waveform_to_fd(char *waveform, int length, int fd) {
|
|||||||
|
|
||||||
int res;
|
int res;
|
||||||
int x;
|
int x;
|
||||||
|
#ifdef __PPC__
|
||||||
|
char c;
|
||||||
|
#endif
|
||||||
|
|
||||||
res = fork();
|
res = fork();
|
||||||
if (res < 0)
|
if (res < 0)
|
||||||
ast_log(LOG_WARNING, "Fork failed\n");
|
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)
|
if (x != fd)
|
||||||
close(x);
|
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,waveform,length);
|
||||||
write(fd,"a",1);
|
write(fd,"a",1);
|
||||||
close(fd);
|
close(fd);
|
||||||
|
Reference in New Issue
Block a user