changeset 66:c98f0ece3e80

added binary file verification script
author gyorgyf
date Fri, 17 Feb 2012 11:38:04 +0000
parents b2f70a775ddc
children 8c65fff56cab
files runner/BinaryFeatureWriter.cpp sonic-annotator
diffstat 2 files changed, 4 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/runner/BinaryFeatureWriter.cpp	Thu Feb 16 19:06:33 2012 +0000
+++ b/runner/BinaryFeatureWriter.cpp	Fri Feb 17 11:38:04 2012 +0000
@@ -62,8 +62,8 @@
 	~OutputStream() { if (stream != NULL) {stream->close(); delete stream;} }
 	
 	struct header_t { 
-		int16_t BOM16;          // 16-bit BOM (FEFF as in UTF-16)
-		int32_t BOM32;          // 32-bit BOM (human readable: e.g. ABCD)
+		int16_t BOM16;          // 16-bit BOM (FEFF as in UTF-16) 2 bytes
+		int32_t BOM32;          // 32-bit BOM (human readable: e.g. ABCD) 4 bytes
 		char major_version;     // check for binary compatibility
 		char minor_version;     // changes in txt parts only
 		char compression;       // use of stream compression (e.g. gzip)
@@ -78,7 +78,7 @@
 
 		if (stream) return true;
 		
-		header_t header = {(int16_t) 0xFEFF,0x41424344,MAJOR_VERSION_PY,1,0,NULL,NULL,(char)sizeof(float),(char)sizeof(int),{NULL},NULL}; 	
+		header_t header = {(int16_t) 0xFEFF, (int32_t) 0x41424344,MAJOR_VERSION_PY,2,0,NULL,NULL,(char)sizeof(float),(char)sizeof(int),{NULL},NULL}; 	
 		char* p_header = reinterpret_cast<char*>(&header);
 
 		if (append) 
@@ -135,7 +135,7 @@
 			QString timestamp;
 			if (gmtm != NULL) 
 				timestamp = QString("%1 %2").arg(", Created: ").arg(asctime(gmtm)).trimmed();
-			string info = QString(" SONIC ANNOTATOR v%1 PYTHON BINARY V0.1, Platform: %2-%3bit%4")
+			string info = QString("_SONIC ANNOTATOR v%1 PYTHON BINARY V0.2, Platform: %2-%3bit%4")
 				.arg(RUNNER_VERSION)
 				.arg(platform)
 				.arg(arch)
Binary file sonic-annotator has changed