📄 const_05.cc
字号:
// file: $isip/class/algo/Constant/const_05.cc// version: $Id: const_05.cc,v 1.9 2002/07/07 23:49:32 picone Exp $//// isip include files//#include "Constant.h"// method: apply//// arguments:// Vector<AlgorithmData>& output: (output) output data// const Vector< CircularBuffer<AlgorithmData> >& input: (input) input data//// return: a boolean value indicating status//// this method calls the appropriate computation methods//boolean Constant::apply(Vector<AlgorithmData>& output_a, const Vector< CircularBuffer<AlgorithmData> >& input_a) { // start the debugging output // displayStart(this); // add one frame to indicator we process one frame // frame_index_d++; // calculate the whole frames needed to process // double num_frames = signal_duration_d / frame_dur_d; long frame = (long)Integral::round(num_frames); // determine the number of input channels and force the output to be // that number // long len = input_a.length(); output_a.setLength(len); data_d.setLength(len); // branch in the implementation: WRITE // if (implementation_d == WRITE) { if (frame_index_d != frame - 1) { // loop over the channels // for (long c = 0; c < len; c++) { // display the channel number // displayChannel(c); output_a(c).assign(input_a(c)(0)); data_d(c).assign(input_a(c)(0)); } // possibly display the data // display(output_a, input_a, name()); return true; } // write output to a file // computeWrite(output_a, input_a); } // implementation: READ // else if (implementation_d == READ) { // read input from a file // computeRead(output_a, input_a); } // implementation: UNKNOWN // else { return Error::handle(name(), L"apply", ERR_UNSUPM, __FILE__, __LINE__); } // finish the debugging output // displayFinish(this); // exit gracefully // return true;}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -