changeset 80:e33fa45f0935

* avoid trying to use timeval if building on Windows
author cannam
date Tue, 18 Sep 2007 09:39:58 +0000
parents c72fddf9aecb
children e4826d5365b8
files Makefile vamp-sdk/Plugin.h vamp-sdk/RealTime.cpp vamp-sdk/RealTime.h
diffstat 4 files changed, 14 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/Makefile	Thu Sep 06 16:49:50 2007 +0000
+++ b/Makefile	Tue Sep 18 09:39:58 2007 +0000
@@ -57,7 +57,7 @@
 # editing for non-Linux platforms.  Of course you don't necessarily
 # have to use "make install".
 #
-INSTALL_PREFIX	 	  := /usr/local
+INSTALL_PREFIX	 	  := /usr
 INSTALL_API_HEADERS	  := $(INSTALL_PREFIX)/include/vamp
 INSTALL_SDK_HEADERS	  := $(INSTALL_PREFIX)/include/vamp-sdk
 INSTALL_HOSTEXT_HEADERS	  := $(INSTALL_PREFIX)/include/vamp-sdk/hostext
--- a/vamp-sdk/Plugin.h	Thu Sep 06 16:49:50 2007 +0000
+++ b/vamp-sdk/Plugin.h	Tue Sep 18 09:39:58 2007 +0000
@@ -95,9 +95,9 @@
  * (although if possible it should accept the new values).  Any
  * computationally expensive setup code should take place here.
  *
- * 6. Host finally checks the number of values per output (which may
- * vary depending on the number of channels, step size and block size
- * as well as the parameter values).
+ * 6. Host finally checks the number of values, resolution, extents
+ * etc per output (which may vary depending on the number of channels,
+ * step size and block size as well as the parameter values).
  *
  * 7. Host will repeatedly call the process method to pass in blocks
  * of input data.  This method may return features extracted from that
--- a/vamp-sdk/RealTime.cpp	Thu Sep 06 16:49:50 2007 +0000
+++ b/vamp-sdk/RealTime.cpp	Tue Sep 18 09:39:58 2007 +0000
@@ -54,7 +54,10 @@
 using std::endl;
 
 #include "RealTime.h"
+
+#ifndef _WIN32
 #include "sys/time.h"
+#endif
 
 namespace Vamp {
 
@@ -96,11 +99,13 @@
     return RealTime(msec / 1000, (msec % 1000) * 1000000);
 }
 
+#ifndef _WIN32
 RealTime
 RealTime::fromTimeval(const struct timeval &tv)
 {
     return RealTime(tv.tv_sec, tv.tv_usec * 1000);
 }
+#endif
 
 std::ostream &operator<<(std::ostream &out, const RealTime &rt)
 {
--- a/vamp-sdk/RealTime.h	Thu Sep 06 16:49:50 2007 +0000
+++ b/vamp-sdk/RealTime.h	Tue Sep 18 09:39:58 2007 +0000
@@ -47,7 +47,9 @@
 #include <iostream>
 #include <string>
 
+#ifndef _WIN32
 struct timeval;
+#endif
 
 namespace Vamp {
 
@@ -74,7 +76,10 @@
 
     static RealTime fromSeconds(double sec);
     static RealTime fromMilliseconds(int msec);
+
+#ifndef _WIN32
     static RealTime fromTimeval(const struct timeval &);
+#endif
 
     RealTime &operator=(const RealTime &r) {
 	sec = r.sec; nsec = r.nsec; return *this;