annotate trunk/src/Modules/Features/ModuleBoxes.h @ 706:f8e90b5d85fd tip

Delete CARFAC code from this repository. It has been moved to https://github.com/google/carfac Please email me with your github username to get access. I've also created a new mailing list to discuss CARFAC development: https://groups.google.com/forum/#!forum/carfac-dev
author ronw@google.com
date Thu, 18 Jul 2013 20:56:51 +0000
parents 31d2b3f2c13b
children
rev   line source
tom@419 1 // Copyright 2010, Google
tom@419 2 //
tom@419 3 // AIM-C: A C++ implementation of the Auditory Image Model
tom@419 4 // http://www.acousticscale.org/AIMC
tom@419 5 //
tom@419 6 // Licensed under the Apache License, Version 2.0 (the "License");
tom@419 7 // you may not use this file except in compliance with the License.
tom@419 8 // You may obtain a copy of the License at
tom@419 9 //
tom@419 10 // http://www.apache.org/licenses/LICENSE-2.0
tom@419 11 //
tom@419 12 // Unless required by applicable law or agreed to in writing, software
tom@419 13 // distributed under the License is distributed on an "AS IS" BASIS,
tom@419 14 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
tom@419 15 // See the License for the specific language governing permissions and
tom@419 16 // limitations under the License.
tom@419 17
tom@419 18 /*!
tom@419 19 * \author Thomas Walters <tom@acousticscale.org>
tom@419 20 * \date created 2010-06-14
tom@419 21 * \version \$Id$
tom@419 22 */
tom@419 23
tom@419 24 #ifndef AIMC_MODULES_FEATURES_BOXES_H_
tom@419 25 #define AIMC_MODULES_FEATURES_BOXES_H_
tom@419 26
tom@419 27 #include <utility>
tom@419 28 #include <vector>
tom@419 29 #include "Support/Module.h"
tom@419 30
tom@419 31 namespace aimc {
tom@419 32 using std::pair;
tom@419 33 class ModuleBoxes : public Module {
tom@419 34 public:
tom@419 35 explicit ModuleBoxes(Parameters *pParam);
tom@419 36 virtual ~ModuleBoxes();
tom@419 37
tom@419 38 /*! \brief Process a buffer
tom@419 39 */
tom@419 40 virtual void Process(const SignalBank &input);
tom@419 41
tom@419 42 private:
tom@419 43 /*! \brief Reset the internal state of the module
tom@419 44 */
tom@419 45 virtual void ResetInternal();
tom@419 46
tom@419 47 /*! \brief Prepare the module
tom@419 48 * \param input Input signal
tom@419 49 * \param output true on success false on failure
tom@419 50 */
tom@419 51 virtual bool InitializeInternal(const SignalBank &input);
tom@419 52
tom@419 53 float sample_rate_;
tom@419 54 int buffer_length_;
tom@419 55 int channel_count_;
tom@419 56 int box_size_spectral_;
tom@419 57 int box_size_temporal_;
tom@419 58 vector<int> box_limits_time_;
tom@419 59 vector<pair<int, int> > box_limits_channels_;
tom@419 60 int box_count_;
tom@419 61 int feature_size_;
tom@419 62 };
tom@419 63 } // namespace aimc
tom@419 64
tom@419 65 #endif // AIMC_MODULES_FEATURES_BOXES_H_