Mercurial > hg > match-vamp
annotate src/MatchFeatureFeeder.h @ 57:47f7649ab9d5 refactors_no_float
Merge from the default branch
author | Chris Cannam |
---|---|
date | Fri, 14 Nov 2014 10:25:57 +0000 |
parents | 16870e8770ae |
children | faa523be20f9 |
rev | line source |
---|---|
cannam@0 | 1 /* -*- c-basic-offset: 4 indent-tabs-mode: nil -*- vi:set ts=8 sts=4 sw=4: */ |
cannam@0 | 2 /* |
cannam@0 | 3 Vamp feature extraction plugin using the MATCH audio alignment |
cannam@0 | 4 algorithm. |
cannam@0 | 5 |
cannam@0 | 6 Centre for Digital Music, Queen Mary, University of London. |
cannam@0 | 7 This file copyright 2007 Simon Dixon, Chris Cannam and QMUL. |
cannam@0 | 8 |
cannam@0 | 9 This program is free software; you can redistribute it and/or |
cannam@0 | 10 modify it under the terms of the GNU General Public License as |
cannam@0 | 11 published by the Free Software Foundation; either version 2 of the |
cannam@0 | 12 License, or (at your option) any later version. See the file |
cannam@0 | 13 COPYING included with this distribution for more information. |
cannam@0 | 14 */ |
cannam@0 | 15 |
Chris@24 | 16 #ifndef _MATCH_FEATURE_FEEDER_H_ |
Chris@24 | 17 #define _MATCH_FEATURE_FEEDER_H_ |
cannam@0 | 18 |
cannam@0 | 19 #include "Matcher.h" |
cannam@0 | 20 #include "Finder.h" |
cannam@0 | 21 |
cannam@0 | 22 #include <queue> |
Chris@14 | 23 #include <vector> |
cannam@0 | 24 |
Chris@24 | 25 class MatchFeatureFeeder |
cannam@0 | 26 { |
cannam@0 | 27 public: |
Chris@24 | 28 MatchFeatureFeeder(Matcher *m1, Matcher *m2); |
Chris@24 | 29 ~MatchFeatureFeeder(); |
cannam@0 | 30 |
Chris@14 | 31 /** |
Chris@24 | 32 * Feed the two supplied feature vectors to feeders 1 and 2 |
Chris@24 | 33 * respectively (depending on their advance status). Matchers must |
Chris@24 | 34 * have been constructed using the external featureSize |
Chris@24 | 35 * constructor. |
Chris@14 | 36 */ |
Chris@24 | 37 void feed(std::vector<double> f1, std::vector<double> f2); |
Chris@14 | 38 |
cannam@0 | 39 Finder *getFinder() { return finder; } |
cannam@0 | 40 |
cannam@0 | 41 protected: |
Chris@24 | 42 void feedBlock(); |
Chris@24 | 43 void feed1(); |
Chris@24 | 44 void feed2(); |
cannam@0 | 45 |
cannam@0 | 46 Finder *finder; |
cannam@0 | 47 Matcher *pm1; |
cannam@0 | 48 Matcher *pm2; |
cannam@0 | 49 |
Chris@24 | 50 std::queue<std::vector<double> > q1; |
Chris@24 | 51 std::queue<std::vector<double> > q2; |
cannam@0 | 52 }; |
cannam@0 | 53 |
cannam@0 | 54 #endif |