comparison trunk/src/Modules/Output/FileOutputHTK.cc @ 320:c74acd46121b

- Added support for a very basic AIM-C file format
author tomwalters@google.com
date Thu, 27 May 2010 07:25:03 +0000
parents 30dde71d0230
children 69466da9745e
comparison
equal deleted inserted replaced
319:566a8543a6f1 320:c74acd46121b
24 * \date created 2006/10/30 24 * \date created 2006/10/30
25 * \version \$Id$ 25 * \version \$Id$
26 */ 26 */
27 27
28 #ifdef _WINDOWS 28 #ifdef _WINDOWS
29 # include <direct.h> // for _mkdir&_rmdir 29 # include <direct.h> // for _mkdir & _rmdir
30 #else 30 #else
31 # include <sys/types.h> 31 # include <sys/types.h>
32 # include <dirent.h> // for opendir&friends 32 # include <dirent.h> // for opendir & friends
33 #endif 33 #endif
34 34
35 #include <stdint.h> 35 #include <stdint.h>
36 #include <stdio.h> 36 #include <stdio.h>
37 #include <string.h> 37 #include <string.h>
138 fwrite(&parameter_kind, sizeof(parameter_kind), 1, file_handle_); 138 fwrite(&parameter_kind, sizeof(parameter_kind), 1, file_handle_);
139 fflush(file_handle_); 139 fflush(file_handle_);
140 140
141 header_written_ = true; 141 header_written_ = true;
142 } 142 }
143
144 143
145 void FileOutputHTK::Process(const SignalBank &input) { 144 void FileOutputHTK::Process(const SignalBank &input) {
146 if (file_handle_ == NULL) { 145 if (file_handle_ == NULL) {
147 LOG_ERROR(_T("Couldn't process file output. No file is open." 146 LOG_ERROR(_T("Couldn't process file output. No file is open."
148 "Please call FileOutputHTK::OpenFile first")); 147 "Please call FileOutputHTK::OpenFile first"));