From 4b1c288f87421b0e15908f5195284d47ebef7361 Mon Sep 17 00:00:00 2001 From: Robin Gareus Date: Sat, 1 Apr 2017 21:50:32 +0200 Subject: update qm-vamp-plugins (git v1.7.1-10-g76bc879) --- libs/vamp-plugins/Transcription.cpp | 55 +++++++++---------------------------- 1 file changed, 13 insertions(+), 42 deletions(-) (limited to 'libs/vamp-plugins/Transcription.cpp') diff --git a/libs/vamp-plugins/Transcription.cpp b/libs/vamp-plugins/Transcription.cpp index 25c8099336..fac024e4d1 100644 --- a/libs/vamp-plugins/Transcription.cpp +++ b/libs/vamp-plugins/Transcription.cpp @@ -24,20 +24,6 @@ using std::vector; using std::cerr; using std::endl; -const double CNum[8] = { - 3.025328153863e-005,0.0002117729707704,0.0006353189123113, 0.001058864853852, - 0.001058864853852,0.0006353189123113,0.0002117729707704,3.025328153863e-005 -}; - -const double CDen[8] = { - 1, -4.647847898799, 9.540784706769, -11.14354542746, - 7.967285533211, -3.477244449085, 0.8559660579522, -0.09152610255505 -}; - -const int A[10] = {0, 120, 190, 240, 279, 310, 337, 360, 380, 399}; - - - const double EualCurve960[960] = { 83.750025,83.532690,83.315770,83.099260,82.883159,82.667463,82.452170,82.237276,82.022779,81.808675, 81.594963,81.381639,81.168699,80.956142,80.743964,80.532163,80.320735,80.109677,79.898987,79.688663,79.478700,79.269096,79.059848,78.850953, @@ -351,10 +337,10 @@ Transcription::process(const float *const *inputBuffers, if (m_Excess) return FeatureSet(); - for (size_t i = 0; i < m_blockSize;i++) { + for (int i = 0; i < m_blockSize;i++) { if (m_SampleN >= m_AllocN) { - size_t newsize = m_AllocN * 2; + int newsize = m_AllocN * 2; if (newsize < 10000) newsize = 10000; double *newbuf = (double *)realloc(m_SoundIn, newsize * sizeof(double)); if (!newbuf) { @@ -382,10 +368,9 @@ Transcription::getRemainingFeatures() double *hello1; double *hello2; int Msec; - size_t i; - size_t j; - size_t n; - size_t count; + int i; + int j; + int n; Msec=(int)(100*m_SampleN/m_inputSampleRate); @@ -471,9 +456,7 @@ Transcription::getRemainingFeatures() double starts[88]; for (n = 0; n < 88; ++n) starts[n] = -1.0; - int nn; for (j = 0; j 34)&&(abs(A5[j]-337.0-A5[j-34])<3.0)&&(D[j]>0)&&(D[j-34]>0)) + if ((j>34)&&(fabs(A5[j]-337.0-A5[j-34])<3.0)&&(D[j]>0)&&(D[j-34]>0)) { D[j]=0; D2[j]=0; -- cgit v1.2.3