Main Page | Modules | Data Structures | Directories | File List | Data Fields | Globals | Related Pages

wrsamp.c

Go to the documentation of this file.
00001 
00016 /*
00017  * Copyright (c) 1991-2006 Kawahara Lab., Kyoto University
00018  * Copyright (c) 2000-2005 Shikano Lab., Nara Institute of Science and Technology
00019  * Copyright (c) 2005-2006 Julius project team, Nagoya Institute of Technology, Nagoya Institute of Technology
00020  * All rights reserved
00021  */
00022 
00023 #include <sent/stddefs.h>
00024 #include <sent/speech.h>
00025 
00035 int
00036 wrsamp(int fd, SP16 *buf, int len)
00037 {
00038   int ret;
00039 #ifndef WORDS_BIGENDIAN
00040   /* swap byte order to BIG ENDIAN */
00041   swap_sample_bytes(buf, len);
00042 #endif
00043   ret = write(fd, buf, len * sizeof(SP16));
00044 #ifndef WORDS_BIGENDIAN
00045   /* undo byte swap */
00046   swap_sample_bytes(buf, len);
00047 #endif
00048   return(ret);
00049 }

Generated on Tue Mar 28 16:01:39 2006 for Julius by  doxygen 1.4.2