Julius 4.2
libsent/src/anlz/wrsamp.c
説明を見る。
00001 
00017 /*
00018  * Copyright (c) 1991-2011 Kawahara Lab., Kyoto University
00019  * Copyright (c) 2000-2005 Shikano Lab., Nara Institute of Science and Technology
00020  * Copyright (c) 2005-2011 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 }