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

📄 example.cc

📁 这是一个从音频信号里提取特征参量的程序
💻 CC
字号:
// file: $isip/doc/examples/class/mmedia/mmedia_example_00/example.cc// version: $Id: example.cc,v 1.1 2001/04/30 03:47:08 duncan Exp $//// isip include files//#include <AudioFile.h>#include <CommandLine.h>// excise_signal: program to excise part of an audio signal from one// file and output it to a new file.//// this is an example excise_signal utility//int main(int argc, const char** argv) {  // configure the command line parser and an Sdb object.  //  CommandLine cmdl;  // 2 parameters: start time and stop time  //  Float start_time;  Float stop_time;  String start_param(L"start_time");  String stop_param(L"stop_time");  cmdl.addOptionParam(start_time, start_param, 0.0);  cmdl.addOptionParam(stop_time, stop_param, 0.0);  // parse the command line  //  cmdl.parse(argc,argv);  Filename input;  Filename output;  // read the input and output as the arguments  //  cmdl.getArgument(input, 0);  cmdl.getArgument(output, 1);    // declare AudioFile objects for read and write  //  AudioFile src;  AudioFile dst;  // open the input file  //  src.open(input);  // we want the output file to have the same format as the input, so  // assign the object before opening the new file  //  dst.assign(src);  dst.open(output, File::WRITE_ONLY);  // read in the data into a buffer and write it to the new file  //  Vector<VectorFloat> buf(src.getNumChannels());  src.getData(buf, start_time, stop_time - start_time);  dst.writeAudioData(buf);  // close the files  //  src.close();  dst.close();    // exit gracefully  //  Integral::exit();}

⌨️ 快捷键说明

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