libsent/src/anlz/wrsamp.c

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

Generated on Tue Dec 18 15:59:54 2007 for Julius by  doxygen 1.5.4