From 987fa0b83639d28f8ec412c7841c0590830dcd64 Mon Sep 17 00:00:00 2001 From: jakemsr Date: Mon, 8 Oct 2007 01:37:15 +0000 Subject: [PATCH] let artsd work in full-duplex mode by explicitly configuring the audio layer for full-duplex please make sure your base system is up-to-date before enabling full-duplex in artsd in your local configuration ok brad@ --- x11/kde/arts3/Makefile | 4 ++-- .../arts3/patches/patch-flow_audioiooss_cc | 24 +++++++++++++++++++ 2 files changed, 26 insertions(+), 2 deletions(-) create mode 100644 x11/kde/arts3/patches/patch-flow_audioiooss_cc diff --git a/x11/kde/arts3/Makefile b/x11/kde/arts3/Makefile index 40db719202d..db3c38cb6bb 100644 --- a/x11/kde/arts3/Makefile +++ b/x11/kde/arts3/Makefile @@ -1,11 +1,11 @@ -# $OpenBSD: Makefile,v 1.61 2007/09/15 20:04:21 merdely Exp $ +# $OpenBSD: Makefile,v 1.62 2007/10/08 01:37:15 jakemsr Exp $ COMMENT= K Desktop Environment, aRTs CATEGORIES= x11 x11/kde 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 diff --git a/x11/kde/arts3/patches/patch-flow_audioiooss_cc b/x11/kde/arts3/patches/patch-flow_audioiooss_cc new file mode 100644 index 00000000000..2f581cb797f --- /dev/null +++ b/x11/kde/arts3/patches/patch-flow_audioiooss_cc @@ -0,0 +1,24 @@ +$OpenBSD: patch-flow_audioiooss_cc,v 1.1 2007/10/08 01:37:15 jakemsr Exp $ +--- 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)