Mercurial > hg > aimc
diff carfac/sai.cc @ 650:f926e0892dee
Update interface to have separate Reset() and Redesign(params) methods.
author | ronw@google.com |
---|---|
date | Wed, 12 Jun 2013 19:24:29 +0000 |
parents | 749b5aed61f6 |
children | a1b82b240328 |
line wrap: on
line diff
--- a/carfac/sai.cc Tue Jun 11 22:05:10 2013 +0000 +++ b/carfac/sai.cc Wed Jun 12 19:24:29 2013 +0000 @@ -22,6 +22,10 @@ #include <assert.h> SAI::SAI(const SAIParams& params) : params_(params) { + Redesign(params); +} + +void SAI::Redesign(const SAIParams& params) { assert(params_.window_width > params_.width && "SAI window_width must be larger than width."); @@ -35,6 +39,11 @@ .sin(); } +void SAI::Reset() { + input_buffer_.setZero(); + output_buffer_.setZero(); +} + void SAI::RunSegment(const std::vector<ArrayX>& input, ArrayXX* output_frame) { assert(!input.empty() || input.size() <= params_.window_width &&