Ejemplo n.º 1
0
            HError(-1189,"HList: Warning ALIEN src file format set");

         break;

      case 'T':

         trace = GetChkedInt(0,077,s); break;

      default:

         HError(1119,"HList: Unknown switch %s",s);

      }

   }

   if (NumArgs() == 0 ) 

      ListSpeech(NULL);

   else

      while (NumArgs() > 0 ) {

         if (NextArg() != STRINGARG)

            HError(1119,"HList: List file name expected");

         ListSpeech(GetStrArg());

      }

   Exit(0);

   return (0);          /* never reached -- make compiler happy */

}



/* -------------------- Display Routines  ------------------- */



typedef struct{   /* gather together basic header info */

   char *name;

   Boolean isSource;

   Boolean isAudio;

   FileFormat fmt;
Ejemplo n.º 2
0
/* ReplayAudio:  replay the last audio input */
void ReplayAudio(BufferInfo info)
{
   AudioOut ao;

   if (info.a != NULL) {
      ao = OpenAudioOutput(&repHeap,&(info.srcSampRate));
      PlayReplayBuffer(ao, info.a);
      while (SamplesToPlay(ao) > 0 );
      CloseAudioOutput(ao);
   }
}
Ejemplo n.º 3
0
   barwidth = itemWidth*(nItems+1);

}



/* PrintHeading: print the info in given HeadInfo record */

void PrintHeading(HeadInfo h)

{

   char buf[MAXSTRLEN];

   

   if (h.isSource){

      if (h.isAudio)

         strcpy(buf,"Source: Direct Audio");    

      else

         sprintf(buf,"Source: %s", h.name);

   }else

      strcpy(buf,"Target");

   PrBar(buf);

   printf("  Sample Bytes:  %-7d", h.sampSize);

   if (barwidth < 60 ) printf("\n");

   printf("  Sample Kind:   %s\n", ParmKind2Str(h.kind,buf));

   printf("  Num Comps:     %-7d", h.numComps);

   if (barwidth < 60 ) printf("\n");

   printf("  Sample Period: %.1f us\n", h.period/10.0);     

   if (!h.isAudio) {

      printf("  Num Samples:   %-7ld", h.nSamples);

      if (barwidth < 60 ) printf("\n");

      printf("  File Format:   %s\n", Format2Str(h.fmt));

   }

}



/* PrintWaveLine: print line of waveform samples */

void PrintWaveLine(short *data, int nItems, long idx)

{

   int i;

   

   if (!rawOut) printf("%5ld: ",idx);

   for (i=0; i<nItems; i++)  printf("%7d",*data++);

   printf("\n");

}



/* PrintRawVec: print vector components */

void PrintRawVec(Vector v)

{

   int i;

   

   for (i=1; i<=VectorSize(v); i++)  printf("%e ",v[i]);

   printf("\n");