# HG changeset patch # User Chris Cannam # Date 1252933317 0 # Node ID c655fa61884fb6c58596553ea1337f54524fb549 # Parent 1a24b134cd7906960d204e06f1d1412f5be53cbb * Solaris build fixes diff -r 1a24b134cd79 -r c655fa61884f plugins/BarBeatTrack.cpp --- a/plugins/BarBeatTrack.cpp Fri Jul 03 13:08:12 2009 +0000 +++ b/plugins/BarBeatTrack.cpp Mon Sep 14 13:01:57 2009 +0000 @@ -20,6 +20,10 @@ using std::cerr; using std::endl; +#ifndef __GNUC__ +#include +#endif + float BarBeatTracker::m_stepSecs = 0.01161; // 512 samples at 44100 class BarBeatTrackerData @@ -272,7 +276,11 @@ // We only support a single input channel const int fl = m_d->dfConfig.frameLength; +#ifndef __GNUC__ + double *dfinput = (double *)alloca(fl * sizeof(double)); +#else double dfinput[fl]; +#endif for (int i = 0; i < fl; ++i) dfinput[i] = inputBuffers[0][i]; double output = m_d->df->process(dfinput); diff -r 1a24b134cd79 -r c655fa61884f plugins/ChromagramPlugin.cpp --- a/plugins/ChromagramPlugin.cpp Fri Jul 03 13:08:12 2009 +0000 +++ b/plugins/ChromagramPlugin.cpp Mon Sep 14 13:01:57 2009 +0000 @@ -373,7 +373,7 @@ cerr << value << " "; } */ - if (isnan(value)) value = 0.0; + if (ISNAN(value)) value = 0.0; m_binsums[i] += value; feature.values.push_back(value); } diff -r 1a24b134cd79 -r c655fa61884f plugins/ConstantQSpectrogram.cpp --- a/plugins/ConstantQSpectrogram.cpp Fri Jul 03 13:08:12 2009 +0000 +++ b/plugins/ConstantQSpectrogram.cpp Mon Sep 14 13:01:57 2009 +0000 @@ -364,8 +364,8 @@ double re = cqre[i]; double im = cqim[i]; // std::cout << re << "," << im << ":"; - if (isnan(re)) re = 0.0; - if (isnan(im)) im = 0.0; + if (ISNAN(re)) re = 0.0; + if (ISNAN(im)) im = 0.0; double value = sqrt(re * re + im * im); // std::cout << value << " "; feature.values.push_back(value); diff -r 1a24b134cd79 -r c655fa61884f plugins/DWT.cpp --- a/plugins/DWT.cpp Fri Jul 03 13:08:12 2009 +0000 +++ b/plugins/DWT.cpp Mon Sep 14 13:01:57 2009 +0000 @@ -325,7 +325,7 @@ feature.hasTimestamp = false; for (int j = 0; j < s; j++) { - outloc = floor(m / (1 << j)); // This one pushes a single result bin + outloc = m / (1 << j); // This one pushes a single result bin // onto the top of a feature column feature.values.push_back(wCoefficients[j][outloc]); // each coefficient on higher scales need } // to be copied multiple times to feature columns @@ -430,7 +430,7 @@ feature.hasTimestamp = false; for (int j = 0; j < s; j++) { - outloc = floor(m / (1 << j)); // This one pushes a single result bin + outloc = m / (1 << j); // This one pushes a single result bin // onto the top of a feature column feature.values.push_back(wCoefficients[j][outloc]); // each coefficient on higher scales need } // to be copied multiple times to feature columns diff -r 1a24b134cd79 -r c655fa61884f plugins/MFCCPlugin.cpp --- a/plugins/MFCCPlugin.cpp Fri Jul 03 13:08:12 2009 +0000 +++ b/plugins/MFCCPlugin.cpp Mon Sep 14 13:01:57 2009 +0000 @@ -10,16 +10,13 @@ #include "MFCCPlugin.h" #include - -#include +#include using std::string; using std::vector; using std::cerr; using std::endl; -using std::isnan; - MFCCPlugin::MFCCPlugin(float inputSampleRate) : Vamp::Plugin(inputSampleRate), m_config(lrintf(inputSampleRate)), @@ -274,7 +271,7 @@ feature.hasTimestamp = false; for (size_t i = 0; i < m_bins; ++i) { double value = output[i]; - if (isnan(value)) value = 0.0; + if (ISNAN(value)) value = 0.0; m_binsums[i] += value; feature.values.push_back(value); } diff -r 1a24b134cd79 -r c655fa61884f plugins/SimilarityPlugin.cpp --- a/plugins/SimilarityPlugin.cpp Fri Jul 03 13:08:12 2009 +0000 +++ b/plugins/SimilarityPlugin.cpp Mon Sep 14 13:01:57 2009 +0000 @@ -681,7 +681,7 @@ count = 0; for (int k = 0; k < sz; ++k) { double val = m_values[i][k][j]; - if (isnan(val) || isinf(val)) continue; + if (ISNAN(val) || ISINF(val)) continue; mean[j] += val; ++count; } @@ -691,7 +691,7 @@ for (int k = 0; k < sz; ++k) { double val = ((m_values[i][k][j] - mean[j]) * (m_values[i][k][j] - mean[j])); - if (isnan(val) || isinf(val)) continue; + if (ISNAN(val) || ISINF(val)) continue; variance[j] += val; ++count; } diff -r 1a24b134cd79 -r c655fa61884f qm-vamp-plugins.pro --- a/qm-vamp-plugins.pro Fri Jul 03 13:08:12 2009 +0000 +++ b/qm-vamp-plugins.pro Mon Sep 14 13:01:57 2009 +0000 @@ -36,6 +36,15 @@ LIBS += -shared -Wl,-Bstatic -lqm-dsp -lvamp-sdk -llapack -lcblas -latlas -lf77blas -lg2cstubs -Wl,-Bdynamic -Wl,--version-script=vamp-plugin.map } +solaris* { + QMAKE_CXXFLAGS_RELEASE += -DNDEBUG -fast + INCLUDEPATH += /usr/local/include ../qm-dsp + INCLUDEPATH += /opt/ATLAS3.9.14/include + LIBPATH += ../qm-dsp /opt/ATLAS3.9.14/lib + DEFINES += USE_PTHREADS + LIBS += -Bstatic -lqm-dsp -lvamp-sdk -llapack -lcblas -latlas -Bdynamic -lpthread -Wl,--version-script=vamp-plugin.map -lCstd -lCrun +} + OBJECTS_DIR = tmp_obj MOC_DIR = tmp_moc