comparison MatchFeeder.cpp @ 15:a82276091bbd

Pull out Matcher parameters into an object
author Chris Cannam
date Fri, 10 Oct 2014 12:55:05 +0100
parents cdead4a52755
children b15106b0abcd
comparison
equal deleted inserted replaced
14:cdead4a52755 15:a82276091bbd
19 using std::vector; 19 using std::vector;
20 20
21 MatchFeeder::MatchFeeder(Matcher *m1, Matcher *m2) : 21 MatchFeeder::MatchFeeder(Matcher *m1, Matcher *m2) :
22 pm1(m1), pm2(m2) 22 pm1(m1), pm2(m2)
23 { 23 {
24 fftSize = m1->fftSize; 24 fftSize = m1->params.fftSize;
25 finder = new Finder(m1, m2); 25 finder = new Finder(m1, m2);
26 reBuffer = new double[fftSize/2+1]; 26 reBuffer = new double[fftSize/2+1];
27 imBuffer = new double[fftSize/2+1]; 27 imBuffer = new double[fftSize/2+1];
28 } 28 }
29 29
104 } 104 }
105 //!!! } else if (pm1->atEnd) { 105 //!!! } else if (pm1->atEnd) {
106 // feed2(); 106 // feed2();
107 //!!! } else if (pm2->atEnd) 107 //!!! } else if (pm2->atEnd)
108 // feed1(); 108 // feed1();
109 else if (pm1->runCount >= Matcher::MAX_RUN_COUNT) { // slope constraints 109 else if (pm1->runCount >= pm1->params.maxRunCount) { // slope constraints
110 // std::cerr << "pm1 too slopey" << std::endl; 110 // std::cerr << "pm1 too slopey" << std::endl;
111 f2 = feed2(); 111 f2 = feed2();
112 } else if (pm2->runCount >= Matcher::MAX_RUN_COUNT) { 112 } else if (pm2->runCount >= pm2->params.maxRunCount) {
113 // std::cerr << "pm2 too slopey" << std::endl; 113 // std::cerr << "pm2 too slopey" << std::endl;
114 f1 = feed1(); 114 f1 = feed1();
115 } else { 115 } else {
116 switch (finder->getExpandDirection 116 switch (finder->getExpandDirection
117 (pm1->frameCount-1, pm2->frameCount-1)) { 117 (pm1->frameCount-1, pm2->frameCount-1)) {