Mercurial > hg > match-vamp
comparison src/MatchFeeder.cpp @ 43:6a5d165e5ea4 refactors
refactor: m_ prefix
author | Chris Cannam |
---|---|
date | Thu, 13 Nov 2014 13:53:52 +0000 |
parents | 16870e8770ae |
children | a1b7df871496 faa523be20f9 |
comparison
equal
deleted
inserted
replaced
42:8dd16749c3c3 | 43:6a5d165e5ea4 |
---|---|
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->params.fftSize; | 24 fftSize = m1->m_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 |
95 MatchFeeder::feedBlock() | 95 MatchFeeder::feedBlock() |
96 { | 96 { |
97 Features ff; | 97 Features ff; |
98 vector<double> f1, f2; | 98 vector<double> f1, f2; |
99 | 99 |
100 if (pm1->frameCount < pm1->blockSize) { // fill initial block | 100 if (pm1->m_frameCount < pm1->m_blockSize) { // fill initial block |
101 // std::cerr << "feeding initial block" << std::endl; | 101 // std::cerr << "feeding initial block" << std::endl; |
102 f1 = feed1(); | 102 f1 = feed1(); |
103 f2 = feed2(); | 103 f2 = feed2(); |
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 >= pm1->params.maxRunCount) { // slope constraints | 109 else if (pm1->m_runCount >= pm1->m_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 >= pm2->params.maxRunCount) { | 112 } else if (pm2->m_runCount >= pm2->m_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->m_frameCount-1, pm2->m_frameCount-1)) { |
118 case ADVANCE_THIS: | 118 case ADVANCE_THIS: |
119 // std::cerr << "finder says ADVANCE_THIS" << std::endl; | 119 // std::cerr << "finder says ADVANCE_THIS" << std::endl; |
120 f1 = feed1(); | 120 f1 = feed1(); |
121 break; | 121 break; |
122 case ADVANCE_OTHER: | 122 case ADVANCE_OTHER: |