Esempio n. 1
0
/* IsWave: check config parms to see if target is a waveform */
Boolean IsWave(char *srcFile)
{
   FILE *f;
   long nSamp,sampP, hdrS;
   short sampS,kind;
   Boolean isPipe,bSwap,isWave;
   
   isWave = tgtPK == WAVEFORM;
   if (tgtPK == ANON){
      if ((srcFF == HTK || srcFF == ESIG) && srcFile != NULL){
         if ((f=FOpen(srcFile,WaveFilter,&isPipe)) == NULL)
            HError(1011,"IsWave: cannot open File %s",srcFile);
         switch (srcFF) {
         case HTK:
            if (!ReadHTKHeader(f,&nSamp,&sampP,&sampS,&kind,&bSwap))
               HError(1013, "IsWave: cannot read HTK Header in File %s",
                      srcFile);
            break;
         case ESIG:
            if (!ReadEsignalHeader(f, &nSamp, &sampP, &sampS,
                                   &kind, &bSwap, &hdrS, isPipe))
               HError(1013, "IsWave: cannot read Esignal Header in File %s",
                      srcFile);             
            break;
         }
         isWave = kind == WAVEFORM;
         FClose(f,isPipe);
      } else
         isWave = TRUE;
   }
   return isWave;
}
Esempio n. 2
0
         frcDisc = TRUE; break;

      case 'e':

         gen = GetChkedLong(gst,LONG_MAX,s); break;

      case 'h':

         srcHdr = TRUE; break;

      case 'i':

         nItems = GetChkedInt(1,100,s); break;

      case 'n':

         numS = GetChkedInt(1,SMAX-1,s); break;

      case 'o':

         obsFmt = TRUE; break;

      case 'p':

         replay = TRUE; break;

      case 'r':

         rawOut = TRUE; break;

      case 's':

         gst = GetChkedLong(0,LONG_MAX,s); break;

      case 't':

         tgtHdr = TRUE; break;

      case 'z':

         prData = FALSE; break;

      case 'F':

         if (NextArg() != STRINGARG)