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