comparison trunk/src/Modules/NAP/ModuleHCL.cc @ 275:ce2bab04f155

- Imported file input using libsndfile from old AIM-C and updated to the new API - Modified the Module base class to propogate Reset() calls down the module chain. - This required changing all Reset() functions in subclasses to ResetInternal() - Removed some unneeded imports from the Gaussians test
author tomwalters
date Tue, 16 Feb 2010 18:00:16 +0000
parents c26222c51fb7
children e55d0c225a57
comparison
equal deleted inserted replaced
274:3640d25b65ab 275:ce2bab04f155
48 48
49 bool ModuleHCL::InitializeInternal(const SignalBank &input) { 49 bool ModuleHCL::InitializeInternal(const SignalBank &input) {
50 time_constant_ = 1.0f / (2.0f * M_PI * lowpass_cutoff_); 50 time_constant_ = 1.0f / (2.0f * M_PI * lowpass_cutoff_);
51 channel_count_ = input.channel_count(); 51 channel_count_ = input.channel_count();
52 output_.Initialize(input); 52 output_.Initialize(input);
53 Reset(); 53 ResetInternal();
54 return true; 54 return true;
55 } 55 }
56 56
57 void ModuleHCL::Reset() { 57 void ModuleHCL::ResetInternal() {
58 xn_ = 0.0f; 58 xn_ = 0.0f;
59 yn_ = 0.0f; 59 yn_ = 0.0f;
60 yns_.clear(); 60 yns_.clear();
61 yns_.resize(channel_count_); 61 yns_.resize(channel_count_);
62 for (int c = 0; c < channel_count_; ++c) { 62 for (int c = 0; c < channel_count_; ++c) {