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