fn_03.cc

来自「这是一个从音频信号里提取特征参量的程序」· CC 代码 · 共 78 行

CC
78
字号
// file: $isip/class/shell/Filename/fn_03.cc// version: $Id: fn_03.cc,v 1.3 2001/04/24 15:28:10 peng Exp $//// isip include files//#include "Filename.h"#include <Sof.h>#include <String.h>// method: read//// arguments://  Sof& sof: (input) sof file object//  long tag: (input) sof object instance tag//  const String& name: (input) sof object instance name//// return: a boolean value indicating status//// this method has the object read itself from an Sof file//boolean Filename::read(Sof& sof_a, long tag_a, const String& name_a) {  // get the instance of the object from the Sof file  //  if (!sof_a.find(name_a, tag_a)) {    return false;  }  // read the actual data from the sof file  //  if (!readData(sof_a)) {    return false;  }  // exit gracefully  //  return true;}// method: write//// arguments://  Sof& sof: (input) sof file object//  long tag: (input) sof object instance tag//  const String& name: (input) sof object instance name//// return: a boolean value indicating status//// this method has the object write itself to an Sof file//boolean Filename::write(Sof& sof_a, long tag_a, const String& name_a) const {  // declare local variables  //  long obj_size;  // get the size of the object  //  if (sof_a.isText()) {    obj_size = Sof::ANY_SIZE;  }  else {    obj_size = sofSize();  }    // put the object into the sof file's index  //  if (!sof_a.put(name_a, tag_a, obj_size)) {    return false;  }  // exit gracefully  //  return writeData(sof_a);}

⌨️ 快捷键说明

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