tom@134: // Copyright 2010, Google tom@134: // tom@134: // AIM-C: A C++ implementation of the Auditory Image Model tom@134: // http://www.acousticscale.org/AIMC tom@134: // tom@134: // Licensed under the Apache License, Version 2.0 (the "License"); tom@134: // you may not use this file except in compliance with the License. tom@134: // You may obtain a copy of the License at tom@134: // tom@134: // http://www.apache.org/licenses/LICENSE-2.0 tom@134: // tom@134: // Unless required by applicable law or agreed to in writing, software tom@134: // distributed under the License is distributed on an "AS IS" BASIS, tom@134: // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. tom@134: // See the License for the specific language governing permissions and tom@134: // limitations under the License. tom@134: tom@134: /*! tom@134: * \author Thomas Walters tom@134: * \date created 2010-06-14 tom@134: * \version \$Id$ tom@134: */ tom@134: tom@134: #ifndef AIMC_MODULES_FEATURES_BOXES_H_ tom@134: #define AIMC_MODULES_FEATURES_BOXES_H_ tom@134: tom@134: #include tom@134: #include tom@134: #include "Support/Module.h" tom@134: tom@134: namespace aimc { tom@134: using std::pair; tom@134: class ModuleBoxes : public Module { tom@134: public: tom@134: explicit ModuleBoxes(Parameters *pParam); tom@134: virtual ~ModuleBoxes(); tom@134: tom@134: /*! \brief Process a buffer tom@134: */ tom@134: virtual void Process(const SignalBank &input); tom@134: tom@134: private: tom@134: /*! \brief Reset the internal state of the module tom@134: */ tom@134: virtual void ResetInternal(); tom@134: tom@134: /*! \brief Prepare the module tom@134: * \param input Input signal tom@134: * \param output true on success false on failure tom@134: */ tom@134: virtual bool InitializeInternal(const SignalBank &input); tom@134: tom@134: float sample_rate_; tom@134: int buffer_length_; tom@134: int channel_count_; tom@134: int box_size_spectral_; tom@134: int box_size_temporal_; tom@134: vector box_limits_time_; tom@134: vector > box_limits_channels_; tom@134: int box_count_; tom@134: int feature_size_; tom@134: }; tom@134: } // namespace aimc tom@134: tom@134: #endif // AIMC_MODULES_FEATURES_BOXES_H_