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