[nas] [PATCH] voxware server: using different in and out devices

Erik Auerswald auerswal at unix-ag.uni-kl.de
Thu Aug 10 15:03:05 MDT 2006


Hi,

when using the voxware server with different input- and output-devices
and the server is configured to close the audio devices when no stream
is active, the configuration for the input-device is lost when playing a
stream. The attached patch fixes this.

To really use two sound cards we would need two mixer devices as well.
At the moment we only use sndStatOut.mixer.

Erik
-------------- next part --------------
Index: server/dda/voxware/auvoxware.c
===================================================================
--- server/dda/voxware/auvoxware.c	(revision 175)
+++ server/dda/voxware/auvoxware.c	(working copy)
@@ -754,8 +754,10 @@
             sndStatOut.curSampleRate = rate;
     }
 
-    if (sndStatIn.fd == sndStatOut.fd)
+    if ((sndStatIn.fd == sndStatOut.fd) && (sndStatIn.fd != -1)) {
         sndStatIn = sndStatOut;
+        osLogMsg("setSampleRate(): setting sndStatIn = sndStatOut\n");
+    }
     else if (sndStatIn.curSampleRate != rate) {
         sndStatIn.curSampleRate = rate;
 
@@ -931,8 +933,8 @@
             }
         } else {
             if (NasConfig.DoDebug)
-                osLogMsg("closeDevice IN %s en %d\n",
-                         sndStatOut.device, sndStatOut.howToOpen);
+                osLogMsg("closeDevice IN %s mode %d\n",
+                         sndStatIn.device, sndStatIn.howToOpen);
 
             while (close(sndStatIn.fd)) {
                 osLogMsg("closeDevice: waiting on input device\n");


More information about the Nas mailing list