心胸决定格局,眼界决定境界...

wav转aac

//调用neroAacEnc.exe
  STARTUPINFO si={0};
  PROCESS_INFORMATION pi={0};//隐藏窗口
  si.cb=sizeof(si);
  si.dwFlags= STARTF_USESHOWWINDOW| STARTF_USESTDHANDLES;
  si.wShowWindow=SW_HIDE;
 
  char *file_exe="neroAacEnc.exe";
  if(access(file_exe,0)!=0)
  {
     printf("can't find AAC.exe\n");
  }
 
  char cmd[65535]={0};
  string PathName("E:\\Project\\ExtractAudio\\ExtractAudio\\");
  AudioName=PathName + AudioName;
  AACName=PathName + AACName;
  sprintf(cmd,"%s -cbr %d -lc -if \"%s\" -of \"%s\"","neroAacEnc.exe",bitrate,AudioName.c_str(),AACName.c_str());
  if(!CreateProcess(NULL,CA2W(cmd),NULL,NULL,FALSE,NULL,NULL,NULL,&si,&pi))
       printf("transformer is wrong\n"); 

 

posted @ 2014-06-19 10:18  WELEN  阅读(1061)  评论(0编辑  收藏  举报