Mercurial > hg > svcore
changeset 1042:16dc7307d43a cxx11
More build fixes
author | Chris Cannam |
---|---|
date | Wed, 04 Mar 2015 13:52:48 +0000 |
parents | 843f67be0ed9 |
children | fe39581d249b |
files | base/Debug.h base/Profiler.cpp data/model/WaveFileModel.cpp |
diffstat | 3 files changed, 10 insertions(+), 4 deletions(-) [+] |
line wrap: on
line diff
--- a/base/Debug.h Wed Mar 04 12:30:41 2015 +0000 +++ b/base/Debug.h Wed Mar 04 13:52:48 2015 +0000 @@ -19,7 +19,7 @@ #include <QDebug> #include <QTextStream> -#include <vamp-hostsdk/RealTime.h> +#include "RealTime.h" #include <string> #include <iostream> @@ -41,6 +41,11 @@ #define SVDEBUG getSVDebug() +inline QDebug &operator<<(QDebug &d, const RealTime &rt) { + d << rt.toString(); + return d; +} + inline QDebug &operator<<(QDebug &d, const Vamp::RealTime &rt) { d << rt.toString(); return d;
--- a/base/Profiler.cpp Wed Mar 04 12:30:41 2015 +0000 +++ b/base/Profiler.cpp Wed Mar 04 13:52:48 2015 +0000 @@ -105,7 +105,7 @@ fprintf(stderr, "\tCPU: \t%.9g ms/call \t[%d ms total]\n", (((double)pp.second.first * 1000.0 / (double)pp.first) / CLOCKS_PER_SEC), - int((pp.second.first * 1000.0) / CLOCKS_PER_SEC)); + int((double(pp.second.first) * 1000.0) / CLOCKS_PER_SEC)); fprintf(stderr, "\tReal: \t%s ms \t[%s ms total]\n", ((pp.second.second / pp.first) * 1000).toString().c_str(), @@ -118,7 +118,7 @@ fprintf(stderr, "\tWorst:\t%s ms/call \t[%d ms CPU]\n", (wc.second * 1000).toString().c_str(), - int((wc.first * 1000.0) / CLOCKS_PER_SEC)); + int((double(wc.first) * 1000.0) / CLOCKS_PER_SEC)); } typedef std::multimap<RealTime, const char *> TimeRMap;
--- a/data/model/WaveFileModel.cpp Wed Mar 04 12:30:41 2015 +0000 +++ b/data/model/WaveFileModel.cpp Wed Mar 04 13:52:48 2015 +0000 @@ -733,7 +733,8 @@ means[rangeIndex] += fabsf(sample); } } - + + //!!! this looks like a ludicrous way to do synchronisation QMutexLocker locker(&m_model.m_mutex); for (int ct = 0; ct < 2; ++ct) {