Re: [linux-audio-dev] Total latency measurement tool

New Message Reply About this list Date view Thread view Subject view Author view Other groups

Subject: Re: [linux-audio-dev] Total latency measurement tool
From: David Olofson (audiality_AT_swipnet.se)
Date: su marras 07 1999 - 20:25:54 EST


On Sun, 07 Nov 1999, Paul Barton-Davis wrote:
> 1) Diffs enclosed below to allow use with something other than /dev/dsp.
> A pet peeve of mine - too many programs assume that you only have
> one soundcard :)

My version enclosed. :-) The device name is now optional, and the
default is /dev/dsp. (Apply with 'patch -p0 <whateveryounameit'.)

> 2) the README should probably make it clearer that to use it
> out, you'll need a physical loopback cable. Neither my Tropez+ nor
> my Hoontech card can be set to record PCM output (I think).

Ok, many cards can't record their PCM outputs, so the loopback cable
should be described as the normal solution. (The AudioPCI seems to
have almost a full matrix of switches - the only problem is to find a
mixer that lets you set it up correctly... amixer works fine.)

//David

 ·A·U·D·I·A·L·I·T·Y· P r o f e s s i o n a l L i n u x A u d i o
- - ------------------------------------------------------------- - -
    ·Rock Solid David Olofson:
    ·Low Latency www.angelfire.com/or/audiality ·Audio Hacker
    ·Plug-Ins audiality_AT_swipnet.se ·Linux Advocate
    ·Open Source ·Singer/Composer

----8<---------------------------------------------------------

diff -ru analoglatency-0.0.1/al.c analoglatency-0.0.2/al.c
--- analoglatency-0.0.1/al.c Sun Nov 7 17:17:45 1999
+++ analoglatency-0.0.2/al.c Mon Nov 8 02:16:33 1999
@@ -1,6 +1,6 @@
 /*
  * al - The Analog Latency test
- * 0.0.1
+ * 0.0.2
 ------------------------------------------------------------
 al.c: The analog latency measurement tool
 ------------------------------------------------------------
@@ -255,10 +255,7 @@
                 if('-'==argv[a][0])
                         err = parse_arg(argv[a]);
                 else
- {
- print_help();
- err = -100;
- }
+ adev.devicename = argv[a];
         }
         if(err)
                 return 0;
diff -ru analoglatency-0.0.1/audiodev.c analoglatency-0.0.2/audiodev.c
--- analoglatency-0.0.1/audiodev.c Sun Nov 7 06:50:50 1999
+++ analoglatency-0.0.2/audiodev.c Mon Nov 8 02:16:36 1999
@@ -19,6 +19,7 @@
 
 void audiodev_init(struct audiodev_t *ad)
 {
+ ad->devicename = "/dev/dsp";
         ad->mode = O_WRONLY;
         ad->rate = 44100;
         ad->fragmentsize = 256;
@@ -38,7 +39,7 @@
                 fragmentshift = 4;
         printf(" Fragment size: %d bytes\n", 1<<fragmentshift);
 
- ad->outfd = ad->infd = open("/dev/dsp", ad->mode);
+ ad->outfd = ad->infd = open(ad->devicename, ad->mode);
         if(ad->outfd < 0)
         {
                 fprintf(stderr, "ERROR: Failed to open audio device!\n");
diff -ru analoglatency-0.0.1/include/audiodev.h analoglatency-0.0.2/include/audiodev.h
--- analoglatency-0.0.1/include/audiodev.h Wed Nov 3 02:50:04 1999
+++ analoglatency-0.0.2/include/audiodev.h Mon Nov 8 02:16:38 1999
@@ -13,6 +13,7 @@
 
 struct audiodev_t
 {
+ const char *devicename;
         int outfd, infd;
         int mode;
         int rate;


New Message Reply About this list Date view Thread view Subject view Author view Other groups

This archive was generated by hypermail 2b28 : pe maalis 10 2000 - 07:28:00 EST