libKeyFinder
A small C++11 library for estimating the musical key of digital audio.
chromatransformfactory.h
1 /*************************************************************************
2 
3  Copyright 2011-2015 Ibrahim Sha'ath
4 
5  This file is part of LibKeyFinder.
6 
7  LibKeyFinder is free software: you can redistribute it and/or modify
8  it under the terms of the GNU General Public License as published by
9  the Free Software Foundation, either version 3 of the License, or
10  (at your option) any later version.
11 
12  LibKeyFinder is distributed in the hope that it will be useful,
13  but WITHOUT ANY WARRANTY; without even the implied warranty of
14  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15  GNU General Public License for more details.
16 
17  You should have received a copy of the GNU General Public License
18  along with LibKeyFinder. If not, see <http://www.gnu.org/licenses/>.
19 
20 *************************************************************************/
21 
22 #ifndef CHROMATRANSFORMFACTORY_H
23 #define CHROMATRANSFORMFACTORY_H
24 
25 #include "constants.h"
26 #include "chromatransform.h"
27 
28 namespace KeyFinder {
29 
31  public:
34  const ChromaTransform* getChromaTransform(unsigned int frameRate);
35  private:
37  std::vector<ChromaTransformWrapper*> chromaTransforms;
38  std::mutex chromaTransformFactoryMutex;
39  };
40 
42  public:
43  ChromaTransformWrapper(unsigned int frameRate, const ChromaTransform* const transform);
45  const ChromaTransform* getChromaTransform() const;
46  unsigned int getFrameRate() const;
47  private:
48  unsigned int frameRate;
49  const ChromaTransform* const chromaTransform;
50  };
51 
52 }
53 
54 #endif
Definition: chromatransformfactory.h:41
Definition: chromatransformfactory.h:30
Definition: chromatransform.h:30