the following allows artsd to be started in full-duplex mode (-d
option).

this allows recording with e.g. krec from kdemultimedia3.

needs recent libossaudio changes to work.

-- 
[EMAIL PROTECTED]
SDF Public Access UNIX System - http://sdf.lonestar.org

Index: Makefile
===================================================================
RCS file: /home/cvs/OpenBSD/ports/x11/kde/arts3/Makefile,v
retrieving revision 1.61
diff -u -r1.61 Makefile
--- Makefile    15 Sep 2007 20:04:21 -0000      1.61
+++ Makefile    28 Sep 2007 07:51:52 -0000
@@ -5,7 +5,7 @@
 VERSION=               3.5.7
 DISTNAME=              arts-1.5.7
 MODKDE_VERSION?=       3.5.7
-PKGNAME=               ${DISTNAME}
+PKGNAME=               ${DISTNAME}p0
 
 SHARED_LIBS += mcop                 2.0      # .1.0
 SHARED_LIBS += artsflow_idl         2.0      # .1.0
Index: patches/patch-flow_audioiooss_cc
===================================================================
RCS file: patches/patch-flow_audioiooss_cc
diff -N patches/patch-flow_audioiooss_cc
--- /dev/null   1 Jan 1970 00:00:00 -0000
+++ patches/patch-flow_audioiooss_cc    28 Sep 2007 07:51:52 -0000
@@ -0,0 +1,24 @@
+$OpenBSD$
+--- flow/audioiooss.cc.orig    Thu Sep 27 22:09:15 2007
++++ flow/audioiooss.cc Thu Sep 27 22:25:52 2007
+@@ -185,6 +185,20 @@ bool AudioIOOSS::open()
+       artsdebug("device capabilities: revision%d %s",
+                                       device_caps & DSP_CAP_REVISION, 
caps.c_str());
+ 
++      if((param(direction) == 3) && (device_caps & DSP_CAP_DUPLEX))
++      {
++              int duplex = 1;
++              if(ioctl(audio_fd,SNDCTL_DSP_SETDUPLEX,&duplex) == -1)
++              {
++                      _error = "SNDCTL_DSP_SETDUPLEX failed - ";
++                      _error += strerror(errno);
++
++                      close();
++                      return false;
++              }
++
++      }
++
+       int requestedFormat = (_format == 8)?AFMT_U8:AFMT_S16_LE;
+       int gotFormat = requestedFormat;
+       if (ioctl(audio_fd, SNDCTL_DSP_SETFMT, &gotFormat)==-1)  

Reply via email to