⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 out_00.cc

📁 这是一个从音频信号里提取特征参量的程序
💻 CC
字号:
// file: $isip/class/algo/Output/out_00.cc// version: $Id: out_00.cc,v 1.10 2002/10/17 19:26:14 gao Exp $//// isip include files//#include "Output.h"//------------------------------------------------------------------------//// required public methods////-----------------------------------------------------------------------// method: assign//// arguments://  const Output& arg: (input) object to be assigned//// return: a boolean value indicating status//// this method assigns the input object to the current object//boolean Output::assign(const Output& arg_a) {  // assign data from the input Output object  //  algorithm_d = arg_a.algorithm_d;  implementation_d = arg_a.implementation_d;  output_extension_d = arg_a.output_extension_d;  debug_level_d = arg_a.debug_level_d;    audio_output_d.assign(arg_a.audio_output_d);  feature_output_d.assign(arg_a.feature_output_d);    return AlgorithmBase::assign(arg_a);}// method: eq//// arguments://  const Output& arg: (input) object to be compared//// return: a boolean value indicating status//// this method checks whether the current object is identical to the// input object//boolean Output::eq(const Output& arg_a) const {  // compare the data members  //  if ((algorithm_d != arg_a.algorithm_d) ||      (implementation_d != arg_a.implementation_d) ||      (!output_extension_d.eq(arg_a.output_extension_d)) ||      (!(audio_output_d.eq(arg_a.audio_output_d))) ||      (!(feature_output_d.eq(arg_a.feature_output_d)))) {    return false;  }  // exit gracefully  //  return true;}// method: clear//// arguments://  Integral::CMODE ctype: (input) clear mode//// return: a boolean value indicating status//// this method resets the data members to the default values//boolean Output::clear(Integral::CMODE ctype_a) {    // reset the data members unless the mode is RETAIN  //  if (ctype_a != Integral::RETAIN) {    // clear the design parameters    //    algorithm_d = DEF_ALGORITHM;    implementation_d = DEF_IMPLEMENTATION;    }  audio_output_d.clear(ctype_a);  feature_output_d.clear(ctype_a);    // exit gracefully  //  return AlgorithmBase::clear(ctype_a);}//---------------------------------------------------------------------------//// class-specific public methods://  public methods required by the AlgorithmBase interface contract////---------------------------------------------------------------------------// method: assign//// arguments://  const AlgorithmBase& arg: (input) object to be assigned//// return: a boolean value indicating status//// this method assigns the input algorithm object to the current object.//boolean Output::assign(const AlgorithmBase& arg_a) {  // case: input is an Output object  //  if (typeid(arg_a) == typeid(Output)) {    return assign((Output&)arg_a);  }  // case: other  //  if the input algorithm object is not an Output object, error.  //  else {    return Error::handle(name(), L"assign", Error::ARG, __FILE__, __LINE__);  }}// method: eq//// arguments://  const AlgorithmBase& arg: (input) object to be compared//// return: a boolean value indicating status//// this method checks whether the current Output object is identical// to the input algorithm object.//boolean Output::eq(const AlgorithmBase& arg_a) const {  // case: input is an Output object  //  if (typeid(arg_a) == typeid(Output)) {    return eq((Output&)arg_a);  }  // case: other  //  if the input algorithm object is not an Output object, error.  //  else {    return Error::handle(name(), L"eq", Error::ARG, __FILE__, __LINE__);  }}// method: init//// arguments: none//// return: a boolean value indicating status//// this method precomputes various Outputs used in this class// boolean Output::init() {  // check algorithm: DATA  //  if (algorithm_d == DATA) {    // no initialization needed  }    is_valid_d = true;    // exit gracefully  //  return true;}//-----------------------------------------------------------------------------//// we define non-integral Outputs in the default constructor//      //-----------------------------------------------------------------------------// Outputs: class name//const String Output::CLASS_NAME(L"Output");// constants: i/o related constants//const String Output::DEF_PARAM(L"");const String Output::PARAM_ALGORITHM(L"algorithm");const String Output::PARAM_IMPLEMENTATION(L"implementation");const String Output::PARAM_FILENAME(L"filename");const String Output::PARAM_EXTENSION(L"file_extension");const String Output::PARAM_DMODE(L"data_mode");const String Output::PARAM_AUDIO_OUTPUT(L"audio_output");const String Output::PARAM_FEATURE_OUTPUT(L"feature_output");// constants: default values of the class data//const String Output::DEF_FILENAME(L"diagnose_file.sof");const String Output::DEF_EXTENSION(L"sof");const String Output::DEF_TMP_FILE(L"__tmp_output");// constants: name map(s) for the enumerated values//const NameMap Output::ALGO_MAP(L"DATA");const NameMap Output::IMPL_MAP(L"FEATURES, SAMPLED_DATA");// static instantiations: memory manager//MemoryManager Output::mgr_d(sizeof(Output), Output::name());

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -