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