annotate src/Modules/Strobes/ModuleLocalMax.h @ 647:749b5aed61f6

More #include cleanups.
author ronw@google.com
date Tue, 11 Jun 2013 21:32:50 +0000
parents c5f5e9569863
children
rev   line source
tomwalters@32 1 // Copyright 2010, Thomas Walters
tomwalters@32 2 //
tomwalters@32 3 // AIM-C: A C++ implementation of the Auditory Image Model
tomwalters@32 4 // http://www.acousticscale.org/AIMC
tomwalters@32 5 //
tomwalters@45 6 // Licensed under the Apache License, Version 2.0 (the "License");
tomwalters@45 7 // you may not use this file except in compliance with the License.
tomwalters@45 8 // You may obtain a copy of the License at
tomwalters@32 9 //
tomwalters@45 10 // http://www.apache.org/licenses/LICENSE-2.0
tomwalters@32 11 //
tomwalters@45 12 // Unless required by applicable law or agreed to in writing, software
tomwalters@45 13 // distributed under the License is distributed on an "AS IS" BASIS,
tomwalters@45 14 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
tomwalters@45 15 // See the License for the specific language governing permissions and
tomwalters@45 16 // limitations under the License.
tomwalters@32 17
tomwalters@32 18 /*!
tomwalters@32 19 * \author Thomas Walters <tom@acousticscale.org>
tomwalters@32 20 * \date created 2010/02/23
tomwalters@32 21 * \version \$Id$
tomwalters@32 22 */
tomwalters@32 23
tomwalters@32 24 #ifndef AIMC_MODULES_STROBES_LOCAL_MAX_H_
tomwalters@32 25 #define AIMC_MODULES_STROBES_LOCAL_MAX_H_
tomwalters@32 26
tomwalters@32 27 #include <vector>
tomwalters@32 28 #include "Support/Module.h"
tomwalters@32 29
tomwalters@32 30 namespace aimc {
tomwalters@32 31 using std::vector;
tomwalters@32 32 class ModuleLocalMax : public Module {
tomwalters@32 33 public:
tomwalters@32 34 explicit ModuleLocalMax(Parameters *pParam);
tomwalters@32 35 virtual ~ModuleLocalMax();
tomwalters@32 36
tomwalters@32 37 /*! \brief Process a buffer
tomwalters@32 38 */
tomwalters@32 39 virtual void Process(const SignalBank &input);
tomwalters@32 40
tomwalters@32 41 private:
tomwalters@32 42 /*! \brief Reset the internal state of the module
tomwalters@32 43 */
tomwalters@32 44 virtual void ResetInternal();
tomwalters@32 45
tomwalters@32 46 /*! \brief Prepare the module
tomwalters@32 47 * \param input Input signal
tomwalters@32 48 * \param output true on success false on failure
tomwalters@32 49 */
tomwalters@32 50 virtual bool InitializeInternal(const SignalBank &input);
tomwalters@32 51
tomwalters@32 52 float sample_rate_;
tomwalters@32 53 int buffer_length_;
tomwalters@32 54 int channel_count_;
tomwalters@32 55
tomwalters@32 56 float decay_time_ms_;
tomwalters@32 57 float timeout_ms_;
tomwalters@32 58 int strobe_timeout_samples_;
tomwalters@32 59 int strobe_decay_samples_;
tomwalters@32 60
tomwalters@32 61 vector<float> threshold_;
tomwalters@32 62 vector<float> decay_constant_;
tomwalters@32 63
tomwalters@32 64 vector<float> prev_sample_;
tomwalters@32 65 vector<float> curr_sample_;
tomwalters@32 66 vector<float> next_sample_;
tomwalters@32 67 };
tomwalters@32 68 } // namespace aimc
tomwalters@32 69
tomwalters@32 70 #endif // AIMC_MODULES_STROBES_LOCAL_MAX_H_