Mercurial > hg > aimc
comparison src/Modules/Features/ModuleGaussians.cc @ 136:4abed4cf1e87
- Fix bug where the fram period wasn't propagating to the output file.
author | tom@acousticscale.org |
---|---|
date | Tue, 26 Oct 2010 16:46:14 +0000 |
parents | bee31e7ebf4b |
children | bbf4728ffa0e |
comparison
equal
deleted
inserted
replaced
135:0c492eada814 | 136:4abed4cf1e87 |
---|---|
94 void ModuleGaussians::Process(const SignalBank &input) { | 94 void ModuleGaussians::Process(const SignalBank &input) { |
95 if (!initialized_) { | 95 if (!initialized_) { |
96 LOG_ERROR(_T("Module ModuleGaussians not initialized.")); | 96 LOG_ERROR(_T("Module ModuleGaussians not initialized.")); |
97 return; | 97 return; |
98 } | 98 } |
99 output_.set_start_time(input.start_time()); | |
99 // Calculate spectral profile | 100 // Calculate spectral profile |
100 for (int ch = 0; ch < input.channel_count(); ++ch) { | 101 for (int ch = 0; ch < input.channel_count(); ++ch) { |
101 m_pSpectralProfile[ch] = 0.0f; | 102 m_pSpectralProfile[ch] = 0.0f; |
102 for (int i = 0; i < input.buffer_length(); ++i) { | 103 for (int i = 0; i < input.buffer_length(); ++i) { |
103 m_pSpectralProfile[ch] += input[ch][i]; | 104 m_pSpectralProfile[ch] += input[ch][i]; |