comparison src/Modules/Profile/ModuleScaler.h @ 20:fff25824d1d1

-Added a module to scale output values by the channel centre frequency -Fixed file input to support loading and processing of multiple files -Updated the aimc main file to generate profiles like in the recognition experiments
author tomwalters
date Mon, 22 Feb 2010 17:51:27 +0000
parents
children c5f5e9569863
comparison
equal deleted inserted replaced
19:a2dddc107d55 20:fff25824d1d1
1 // Copyright 2010, Thomas Walters
2 //
3 // AIM-C: A C++ implementation of the Auditory Image Model
4 // http://www.acousticscale.org/AIMC
5 //
6 // This program is free software: you can redistribute it and/or modify
7 // it under the terms of the GNU General Public License as published by
8 // the Free Software Foundation, either version 3 of the License, or
9 // (at your option) any later version.
10 //
11 // This program is distributed in the hope that it will be useful,
12 // but WITHOUT ANY WARRANTY; without even the implied warranty of
13 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 // GNU General Public License for more details.
15 //
16 // You should have received a copy of the GNU General Public License
17 // along with this program. If not, see <http://www.gnu.org/licenses/>.
18
19 /*!
20 * \author Thomas Walters <tom@acousticscale.org>
21 * \date created 2010/02/19
22 * \version \$Id$
23 */
24
25 #ifndef AIMC_MODULES_PROFILE_SLICE_H_
26 #define AIMC_MODULES_PROFILE_SLICE_H_
27
28 #include "Support/Module.h"
29
30 namespace aimc {
31 using std::vector;
32 class ModuleScaler : public Module {
33 public:
34 explicit ModuleScaler(Parameters *pParam);
35 virtual ~ModuleScaler();
36
37 /*! \brief Process a buffer
38 */
39 virtual void Process(const SignalBank &input);
40
41 private:
42 /*! \brief Reset the internal state of the module
43 */
44 virtual void ResetInternal();
45
46 /*! \brief Prepare the module
47 * \param input Input signal
48 * \param output true on success false on failure
49 */
50 virtual bool InitializeInternal(const SignalBank &input);
51
52 float sample_rate_;
53 int buffer_length_;
54 int channel_count_;
55 };
56 } // namespace aimc
57
58 #endif // AIMC_MODULES_PROFILE_SLICE_H_