esound 2.38 revisited

classic Classic list List threaded Threaded
29 messages Options
12
Reply | Threaded
Open this post in threaded view
|

esound 2.38 revisited

Deanna Phillips-2
As you may recall, a long-overdue update to esound was backed
out at the last minute before the 4.2 release.  The thread is
here:

http://marc.info/?l=openbsd-ports&m=118541595130336&w=2

I've just tried the 2.38 update on auich(4) and can't reproduce
the problems we once had.

2.38 also fixes some bugs with socket creation and cleanup that
are causing micropolis to skip some sounds.  This bug can be
reproduced by throwing many files at esdplay at once with
something like 'for file in *.wav ; do esdplay $file& ; done',
or running the Firebomb scenario in Micropolis and watching
stderr.

esd should be able to mix those sounds (that's what it's for),
but with the version in tree it gets very confused and skips
some, fails to open the audio device or resample, etc.

So.  Here's Martynas's old diff pulled from cvs.

Anyone want to try again?

Index: Makefile
===================================================================
RCS file: /cvs/ports/audio/esound/Makefile,v
retrieving revision 1.43
diff -u -p -r1.43 Makefile
--- Makefile 5 Oct 2007 14:14:14 -0000 1.43
+++ Makefile 18 Jan 2008 21:11:48 -0000
@@ -1,11 +1,10 @@
-# $OpenBSD: Makefile,v 1.43 2007/10/05 14:14:14 todd Exp $
+# $OpenBSD: Makefile,v 1.40 2007/06/26 17:10:29 martynas Exp $
 # $FreeBSD: Makefile,v 1.8 1999/03/09 01:08:46 nectar Exp $
 
-COMMENT= sound library for Enlightenment
+COMMENT= "sound library for Enlightenment"
 
-DISTNAME= esound-0.2.34
-PKGNAME= ${DISTNAME}p1v0
-SHARED_LIBS += esd                  2.39     # .2.34
+DISTNAME= esound-0.2.38
+SHARED_LIBS += esd                  2.40     # .2.40
 CATEGORIES= audio
 MASTER_SITES= ${MASTER_SITE_GNOME:=sources/esound/0.2/}
 
@@ -22,14 +21,23 @@ WANTLIB= c m wrap
 
 USE_LIBTOOL= Yes
 SEPARATE_BUILD= concurrent
-AUTOCONF_VERSION=2.13
+AUTOCONF_VERSION=2.61
 CONFIGURE_STYLE= autoconf
-CONFIGURE_ARGS+= ${CONFIGURE_SHARED}
-CONFIGURE_ARGS+= --with-libwrap
+CONFIGURE_ARGS+= ${CONFIGURE_SHARED} \
+ --disable-alsa \
+ --disable-oss \
+ --with-libwrap
 # broken, relies upon v4-mapped addresses
 CONFIGURE_ARGS+= --disable-ipv6
 
+FAKE_FLAGS= DESTDIR=${WRKINST} \
+ esdconfdir=${PREFIX}/share/examples/esound
+
 post-extract:
  @cp -f ${FILESDIR}/audio_sun.c ${WRKSRC}
+
+pre-configure:
+ @perl -pi -e 's|_LOCALBASE_|${LOCALBASE}|' \
+ ${WRKSRC}/test-script
 
 .include <bsd.port.mk>
Index: distinfo
===================================================================
RCS file: /cvs/ports/audio/esound/distinfo,v
retrieving revision 1.8
retrieving revision 1.7
diff -u -p -r1.8 -r1.7
--- distinfo 11 Aug 2007 17:29:36 -0000 1.8
+++ distinfo 26 Jun 2007 17:10:29 -0000 1.7
@@ -1,5 +1,5 @@
-MD5 (esound-0.2.34.tar.gz) = lSbU/7u9lGJ2izjAgscmxw==
-RMD160 (esound-0.2.34.tar.gz) = +/rAann7gX+e9h14CJRfe6h8ARA=
-SHA1 (esound-0.2.34.tar.gz) = T6H7MhIZl/6edQe/WvKWpkvAoiA=
-SHA256 (esound-0.2.34.tar.gz) = ass7wF3kshz9cpH93R9XwooxyHLuYGowp4ktAkLdznU=
-SIZE (esound-0.2.34.tar.gz) = 392336
+MD5 (esound-0.2.38.tar.gz) = d8TpgFoBf7oGVSSH3zxmYg==
+RMD160 (esound-0.2.38.tar.gz) = OwL3H38UZcIECjzwETbzHWJnfmE=
+SHA1 (esound-0.2.38.tar.gz) = QFQ9y1sVcsdwKwuwt1aEQEY1G6U=
+SHA256 (esound-0.2.38.tar.gz) = SKOU83d2M2JmBnlKUpTwHilOERTWzD54lMapDyImsGc=
+SIZE (esound-0.2.38.tar.gz) = 519964
Index: files/md5
===================================================================
RCS file: files/md5
diff -N files/md5
--- files/md5 31 Dec 2001 09:41:46 -0000 1.8
+++ /dev/null 1 Jan 1970 00:00:00 -0000
@@ -1,3 +0,0 @@
-MD5 (esound-0.2.22.tar.gz) = 0ac3c415917898ed0d98722a2f6abf2f
-RMD160 (esound-0.2.22.tar.gz) = c02977750fa642f7054f7b42b4b1a786cba4dc73
-SHA1 (esound-0.2.22.tar.gz) = 85defeb1fc46cdef5d1fd99d82e58c7e24187061
Index: patches/patch-Makefile.in
===================================================================
RCS file: patches/patch-Makefile.in
diff -N patches/patch-Makefile.in
--- patches/patch-Makefile.in 11 Aug 2007 17:29:36 -0000 1.8
+++ /dev/null 1 Jan 1970 00:00:00 -0000
@@ -1,11 +0,0 @@
---- Makefile.in.orig Tue Mar 16 07:26:18 2004
-+++ Makefile.in Thu Jun 24 20:07:12 2004
-@@ -180,7 +180,7 @@ esd_LDADD = $(WRAP_LIB) $(LDADD)
- m4datadir = $(datadir)/aclocal
- m4data_DATA = esd.m4
-
--esdconfdir = $(sysconfdir)
-+esdconfdir = $(datadir)/examples/esound
- esdconf_DATA = esd.conf
-
- pkgconfigdir = $(libdir)/pkgconfig
Index: patches/patch-aa
===================================================================
RCS file: patches/patch-aa
diff -N patches/patch-aa
--- patches/patch-aa 6 Aug 2000 08:21:34 -0000 1.5
+++ /dev/null 1 Jan 1970 00:00:00 -0000
@@ -1,19 +0,0 @@
---- Makefile.in.orig Mon Nov 29 14:39:38 1999
-+++ Makefile.in Mon Nov 29 14:40:56 1999
-@@ -106,14 +106,14 @@
- libesd_la_SOURCES =   esdlib.c esdmgr.c esdfile.c esd_config.c audio.c genrand.c genrand.h
-
-
--libesd_la_LDFLAGS = -version-info @ESD_VERSION_INFO@
-+libesd_la_LDFLAGS = -version-info 2:16:0
-
- libesd_la_LIBADD = @AUDIOFILE_LIBS@ -lm
-
- EXTRA_LTLIBRARIES =   libesddsp.la
-
-
--libesddsp_la_LDFLAGS = -rpath $(libdir) -version-info @ESD_VERSION_INFO@
-+libesddsp_la_LDFLAGS = -rpath $(libdir) -version-info 2:16:0
-
- libesddsp_la_LIBADD = @DL_LIB@ -lm
-
Index: patches/patch-ab
===================================================================
RCS file: patches/patch-ab
diff -N patches/patch-ab
--- patches/patch-ab 6 Aug 2000 08:21:34 -0000 1.4
+++ /dev/null 1 Jan 1970 00:00:00 -0000
@@ -1,10 +0,0 @@
---- configure.orig Mon Nov 29 14:41:32 1999
-+++ configure Mon Nov 29 14:42:30 1999
-@@ -4077,6 +4077,7 @@
-    cat > conftest.$ac_ext <<EOF
- #line 4079 "configure"
- #include "confdefs.h"
-+#include <stdio.h>
- #include <tcpd.h>
- #include <syslog.h>
- int allow_severity = LOG_INFO;
Index: patches/patch-ac
===================================================================
RCS file: patches/patch-ac
diff -N patches/patch-ac
--- patches/patch-ac 6 Aug 2000 08:21:34 -0000 1.4
+++ /dev/null 1 Jan 1970 00:00:00 -0000
@@ -1,11 +0,0 @@
---- audio_oss.c.orig Mon Nov 29 14:43:04 1999
-+++ audio_oss.c Mon Nov 29 14:43:41 1999
-@@ -36,7 +36,7 @@
-         mode = O_RDWR;
-
-     /* open the sound device */
--    device = esd_audio_device ? esd_audio_device : "/dev/dsp";
-+    device = esd_audio_device ? esd_audio_device : "/dev/sound";
-     if ((afd = open(device, mode, 0)) == -1)
-     {   /* Opening device failed */
-         perror(device);
Index: patches/patch-acconfig_h
===================================================================
RCS file: patches/patch-acconfig_h
diff -N patches/patch-acconfig_h
--- patches/patch-acconfig_h 11 Aug 2007 17:29:36 -0000 1.5
+++ /dev/null 1 Jan 1970 00:00:00 -0000
@@ -1,10 +0,0 @@
---- acconfig.h.orig Thu Jan 15 05:49:09 2004
-+++ acconfig.h Thu Jun 24 20:09:24 2004
-@@ -11,6 +11,7 @@
- #undef DRIVER_ALSA_09_NEW_PCM_API
- #undef DRIVER_DART
- #undef DRIVER_COREAUDIO
-+#undef DRIVER_SUN
- #undef DRIVER_NONE
- #undef HAVE_INET_ATON
- #undef HAVE_INET_PTON
Index: patches/patch-ad
===================================================================
RCS file: patches/patch-ad
diff -N patches/patch-ad
--- patches/patch-ad 6 Aug 2000 08:21:34 -0000 1.4
+++ /dev/null 1 Jan 1970 00:00:00 -0000
@@ -1,16 +0,0 @@
---- test-script.orig Mon Nov 29 14:44:16 1999
-+++ test-script Mon Nov 29 14:44:45 1999
-@@ -1,4 +1,4 @@
--#!/bin/tcsh
-+#!/usr/local/bin/tcsh
- echo welcome to the test.
-
- echo ""
-@@ -40,7 +40,6 @@
- esdmon > sample.raw &
- esdcat -b -m -r 11025 test.wav
- sleep 3
--killall esdmon
-
- echo press enter to continue...
- echo $< >& /dev/null
Index: patches/patch-ae
===================================================================
RCS file: patches/patch-ae
diff -N patches/patch-ae
--- patches/patch-ae 6 Aug 2000 08:21:34 -0000 1.4
+++ /dev/null 1 Jan 1970 00:00:00 -0000
@@ -1,43 +0,0 @@
---- ltmain.sh.orig Mon Nov 29 14:53:46 1999
-+++ ltmain.sh Mon Nov 29 14:55:23 1999
-@@ -3326,40 +3326,6 @@
-     # Exit here if they wanted silent mode.
-     test "$show" = : && exit 0
-
--    echo "----------------------------------------------------------------------"
--    echo "Libraries have been installed in:"
--    for libdir in $libdirs; do
--      echo "   $libdir"
--    done
--    echo
--    echo "If you ever happen to want to link against installed libraries"
--    echo "in a given directory, LIBDIR, you must either use libtool, and"
--    echo "specify the full pathname of the library, or use \`-LLIBDIR'"
--    echo "flag during linking and do at least one of the following:"
--    if test -n "$shlibpath_var"; then
--      echo "   - add LIBDIR to the \`$shlibpath_var' environment variable"
--      echo "     during execution"
--    fi
--    if test -n "$runpath_var"; then
--      echo "   - add LIBDIR to the \`$runpath_var' environment variable"
--      echo "     during linking"
--    fi
--    if test -n "$hardcode_libdir_flag_spec"; then
--      libdir=LIBDIR
--      eval flag=\"$hardcode_libdir_flag_spec\"
--
--      echo "   - use the \`$flag' linker flag"
--    fi
--    if test -n "$admincmds"; then
--      echo "   - have your system administrator run these commands:$admincmds"
--    fi
--    if test -f /etc/ld.so.conf; then
--      echo "   - have your system administrator add LIBDIR to \`/etc/ld.so.conf'"
--    fi
--    echo
--    echo "See any operating system documentation about shared libraries for"
--    echo "more information, such as the ld(1) and ld.so(8) manual pages."
--    echo "----------------------------------------------------------------------"
-     exit 0
-     ;;
-
Index: patches/patch-af
===================================================================
RCS file: patches/patch-af
diff -N patches/patch-af
--- patches/patch-af 15 Jun 1999 13:26:24 -0000 1.2
+++ /dev/null 1 Jan 1970 00:00:00 -0000
@@ -1,11 +0,0 @@
---- configure.orig Mon Jun 14 13:51:08 1999
-+++ configure Mon Jun 14 13:51:23 1999
-@@ -1477,7 +1477,7 @@
- aix*)
-   ac_symcode='[BCDTU]'
-   ;;
--sunos* | cygwin32* | mingw32*)
-+sunos* | cygwin32* | mingw32* | openbsd*)
-   ac_sympat='_\([_A-Za-z][_A-Za-z0-9]*\)'
-   ac_symxfrm='_\1 \1'
-   ;;
Index: patches/patch-audio_c
===================================================================
RCS file: /cvs/ports/audio/esound/patches/patch-audio_c,v
retrieving revision 1.4
retrieving revision 1.3
diff -u -p -r1.4 -r1.3
--- patches/patch-audio_c 11 Aug 2007 17:29:36 -0000 1.4
+++ patches/patch-audio_c 26 Jun 2007 17:10:29 -0000 1.3
@@ -1,11 +1,39 @@
---- audio.c.orig Tue Jun  4 10:40:44 2002
-+++ audio.c Fri Jul 19 18:32:52 2002
-@@ -25,6 +25,8 @@ static int esd_audio_fd = -1;
- #  include "audio_alsa.c"
- #elif defined(DRIVER_ALSA_09)
- #include "audio_alsa09.c"
-+#elif defined(DRIVER_SUN)
-+#  include "audio_sun.c"
- #elif defined(DRIVER_OSS)
- #  include "audio_oss.c"
- #elif defined(DRIVER_AIX)
+$OpenBSD: patch-audio_c,v 1.3 2007/06/26 17:10:29 martynas Exp $
+--- audio.c.orig Thu Apr 19 17:43:59 2007
++++ audio.c Sat Jun  2 23:15:49 2007
+@@ -20,34 +20,7 @@ static int esd_audio_fd = -1;
+ /*******************************************************************/
+ /* returns audio_fd for use by main prog - platform dependent */
+
+-/* ALSA before OSS as ALSA is OSS compatible */
+-#if defined(DRIVER_ALSA_09)
+-#  include "audio_alsa09.c"
+-#elif defined(DRIVER_ALSA) || defined(DRIVER_NEWALSA)
+-#  include "audio_alsa.c"
+-#elif defined(DRIVER_OSS)
+-#  include "audio_oss.c"
+-#elif defined(DRIVER_AIX)
+-#  include "audio_aix.c"
+-#elif defined(DRIVER_IRIX)
+-#  include "audio_irix.c"
+-#elif defined(DRIVER_HPUX)
+-#  include "audio_hpux.c"
+-#elif defined(DRIVER_OSF)
+-#  include "audio_osf.c"
+-#elif defined(DRIVER_SOLARIS)
+-#  include "audio_solaris.c"
+-#elif defined(DRIVER_MKLINUX)
+-#  include "audio_mklinux.c"
+-#elif defined(DRIVER_DART)
+-#  include "audio_dart.c"
+-#elif defined(DRIVER_COREAUDIO)
+-#  include "audio_coreaudio.c"
+-#elif defined(DRIVER_ARTS)
+-#  include "audio_arts.c"
+-#else
+-#  include "audio_none.c"
+-#endif
++#include "audio_sun.c"
+
+ /*******************************************************************/
+ /* display available devices */
Index: patches/patch-audio_oss.c
===================================================================
RCS file: patches/patch-audio_oss.c
diff -N patches/patch-audio_oss.c
--- patches/patch-audio_oss.c 4 Aug 2001 05:03:20 -0000 1.2
+++ /dev/null 1 Jan 1970 00:00:00 -0000
@@ -1,11 +0,0 @@
---- audio_oss.c.orig Tue Jul 18 12:34:13 2000
-+++ audio_oss.c Sun Aug  6 03:27:01 2000
-@@ -38,7 +38,7 @@
-     mode |= O_NONBLOCK;
-
-     /* open the sound device */
--    device = esd_audio_device ? esd_audio_device : "/dev/dsp";
-+    device = esd_audio_device ? esd_audio_device : "/dev/sound";
-     if ((afd = open(device, mode, 0)) == -1)
-     {   /* Opening device failed */
-         perror(device);
Index: patches/patch-config_h_in
===================================================================
RCS file: patches/patch-config_h_in
diff -N patches/patch-config_h_in
--- patches/patch-config_h_in 11 Aug 2007 17:29:36 -0000 1.6
+++ /dev/null 1 Jan 1970 00:00:00 -0000
@@ -1,10 +0,0 @@
---- config.h.in.orig Tue Mar 16 07:25:33 2004
-+++ config.h.in Thu Jun 24 20:10:12 2004
-@@ -45,6 +45,7 @@
- #undef DRIVER_ALSA_09_NEW_PCM_API
- #undef DRIVER_DART
- #undef DRIVER_COREAUDIO
-+#undef DRIVER_SUN
- #undef DRIVER_NONE
- #undef HAVE_INET_ATON
- #undef HAVE_INET_PTON
Index: patches/patch-configure
===================================================================
RCS file: patches/patch-configure
diff -N patches/patch-configure
--- patches/patch-configure 17 Feb 2002 23:10:10 -0000 1.6
+++ /dev/null 1 Jan 1970 00:00:00 -0000
@@ -1,408 +0,0 @@
---- configure.orig Tue Nov 28 14:41:52 2000
-+++ configure Sun Jul 22 19:56:57 2001
-@@ -3389,6 +3389,19 @@ EOF
-       esac
-    fi
-
-+   if test "${ac_cv_header_sys_audioio_h}" = "yes"; then
-+      case ${host_os} in
-+      openbsd* | netbsd*)
-+         found_sound=yes
-+         DRIVER_SUN=1
-+         cat >> confdefs.h <<\EOF
-+#define DRIVER_SUN 1
-+EOF
-+
-+         ;;
-+      esac
-+   fi
-+
-    case ${host_os} in
-    os2*)
-       found_sound=yes
-@@ -3459,13 +3472,14 @@ EOF
-    echo "---------------------------------------------------------------------"
-    echo "--- Checking to see which audio libraries are required for linking.";
-    echo "--- Most of these checks should also fail. Do not be alarmed.";
--   echo $ac_n "checking for _oss_ioctl""... $ac_c" 1>&6
--echo "configure:3464: checking for _oss_ioctl" >&5
-+   if test ! "$DRIVER_SUN"; then
-+     echo $ac_n "checking for _oss_ioctl""... $ac_c" 1>&6
-+echo "configure:3478: checking for _oss_ioctl" >&5
- if eval "test \"`echo '$''{'ac_cv_func__oss_ioctl'+set}'`\" = set"; then
-   echo $ac_n "(cached) $ac_c" 1>&6
- else
-   cat > conftest.$ac_ext <<EOF
--#line 3469 "configure"
-+#line 3483 "configure"
- #include "confdefs.h"
- /* System header to define __stub macros and hopefully few prototypes,
-     which can conflict with char _oss_ioctl(); below.  */
-@@ -3488,7 +3502,7 @@ _oss_ioctl();
-
- ; return 0; }
- EOF
--if { (eval echo configure:3492: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
-+if { (eval echo configure:3506: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
-   rm -rf conftest*
-   eval "ac_cv_func__oss_ioctl=yes"
- else
-@@ -3506,7 +3520,7 @@ if eval "test \"`echo '$ac_cv_func_'_oss
- else
-   echo "$ac_t""no" 1>&6
- echo $ac_n "checking for _oss_ioctl in -lossaudio""... $ac_c" 1>&6
--echo "configure:3510: checking for _oss_ioctl in -lossaudio" >&5
-+echo "configure:3524: checking for _oss_ioctl in -lossaudio" >&5
- ac_lib_var=`echo ossaudio'_'_oss_ioctl | sed 'y%./+-%__p_%'`
- if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
-   echo $ac_n "(cached) $ac_c" 1>&6
-@@ -3514,7 +3528,7 @@ else
-   ac_save_LIBS="$LIBS"
- LIBS="-lossaudio  $LIBS"
- cat > conftest.$ac_ext <<EOF
--#line 3518 "configure"
-+#line 3532 "configure"
- #include "confdefs.h"
- /* Override any gcc2 internal prototype to avoid an error.  */
- /* We use char because int might match the return type of a gcc2
-@@ -3525,7 +3539,7 @@ int main() {
- _oss_ioctl()
- ; return 0; }
- EOF
--if { (eval echo configure:3529: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
-+if { (eval echo configure:3543: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
-   rm -rf conftest*
-   eval "ac_cv_lib_$ac_lib_var=yes"
- else
-@@ -3554,13 +3568,14 @@ fi
-
- fi
-
-+   fi
-    echo $ac_n "checking for ALnewconfig""... $ac_c" 1>&6
--echo "configure:3559: checking for ALnewconfig" >&5
-+echo "configure:3574: checking for ALnewconfig" >&5
- if eval "test \"`echo '$''{'ac_cv_func_ALnewconfig'+set}'`\" = set"; then
-   echo $ac_n "(cached) $ac_c" 1>&6
- else
-   cat > conftest.$ac_ext <<EOF
--#line 3564 "configure"
-+#line 3579 "configure"
- #include "confdefs.h"
- /* System header to define __stub macros and hopefully few prototypes,
-     which can conflict with char ALnewconfig(); below.  */
-@@ -3583,7 +3598,7 @@ ALnewconfig();
-
- ; return 0; }
- EOF
--if { (eval echo configure:3587: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
-+if { (eval echo configure:3602: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
-   rm -rf conftest*
-   eval "ac_cv_func_ALnewconfig=yes"
- else
-@@ -3601,7 +3616,7 @@ if eval "test \"`echo '$ac_cv_func_'ALne
- else
-   echo "$ac_t""no" 1>&6
- echo $ac_n "checking for ALnewconfig in -laudio""... $ac_c" 1>&6
--echo "configure:3605: checking for ALnewconfig in -laudio" >&5
-+echo "configure:3620: checking for ALnewconfig in -laudio" >&5
- ac_lib_var=`echo audio'_'ALnewconfig | sed 'y%./+-%__p_%'`
- if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
-   echo $ac_n "(cached) $ac_c" 1>&6
-@@ -3609,7 +3624,7 @@ else
-   ac_save_LIBS="$LIBS"
- LIBS="-laudio  $LIBS"
- cat > conftest.$ac_ext <<EOF
--#line 3613 "configure"
-+#line 3628 "configure"
- #include "confdefs.h"
- /* Override any gcc2 internal prototype to avoid an error.  */
- /* We use char because int might match the return type of a gcc2
-@@ -3620,7 +3635,7 @@ int main() {
- ALnewconfig()
- ; return 0; }
- EOF
--if { (eval echo configure:3624: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
-+if { (eval echo configure:3639: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
-   rm -rf conftest*
-   eval "ac_cv_lib_$ac_lib_var=yes"
- else
-@@ -3651,12 +3666,12 @@ fi
-
-    if test "x$enable_alsa" = "xyes"; then
-       echo $ac_n "checking for snd_cards""... $ac_c" 1>&6
--echo "configure:3655: checking for snd_cards" >&5
-+echo "configure:3670: checking for snd_cards" >&5
- if eval "test \"`echo '$''{'ac_cv_func_snd_cards'+set}'`\" = set"; then
-   echo $ac_n "(cached) $ac_c" 1>&6
- else
-   cat > conftest.$ac_ext <<EOF
--#line 3660 "configure"
-+#line 3675 "configure"
- #include "confdefs.h"
- /* System header to define __stub macros and hopefully few prototypes,
-     which can conflict with char snd_cards(); below.  */
-@@ -3679,7 +3694,7 @@ snd_cards();
-
- ; return 0; }
- EOF
--if { (eval echo configure:3683: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
-+if { (eval echo configure:3698: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
-   rm -rf conftest*
-   eval "ac_cv_func_snd_cards=yes"
- else
-@@ -3697,7 +3712,7 @@ if eval "test \"`echo '$ac_cv_func_'snd_
- else
-   echo "$ac_t""no" 1>&6
- echo $ac_n "checking for snd_cards in -lsound""... $ac_c" 1>&6
--echo "configure:3701: checking for snd_cards in -lsound" >&5
-+echo "configure:3716: checking for snd_cards in -lsound" >&5
- ac_lib_var=`echo sound'_'snd_cards | sed 'y%./+-%__p_%'`
- if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
-   echo $ac_n "(cached) $ac_c" 1>&6
-@@ -3705,7 +3720,7 @@ else
-   ac_save_LIBS="$LIBS"
- LIBS="-lsound  $LIBS"
- cat > conftest.$ac_ext <<EOF
--#line 3709 "configure"
-+#line 3724 "configure"
- #include "confdefs.h"
- /* Override any gcc2 internal prototype to avoid an error.  */
- /* We use char because int might match the return type of a gcc2
-@@ -3716,7 +3731,7 @@ int main() {
- snd_cards()
- ; return 0; }
- EOF
--if { (eval echo configure:3720: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
-+if { (eval echo configure:3735: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
-   rm -rf conftest*
-   eval "ac_cv_lib_$ac_lib_var=yes"
- else
-@@ -3746,12 +3761,12 @@ fi
- fi
-
-       echo $ac_n "checking for snd_cards""... $ac_c" 1>&6
--echo "configure:3750: checking for snd_cards" >&5
-+echo "configure:3765: checking for snd_cards" >&5
- if eval "test \"`echo '$''{'ac_cv_func_snd_cards'+set}'`\" = set"; then
-   echo $ac_n "(cached) $ac_c" 1>&6
- else
-   cat > conftest.$ac_ext <<EOF
--#line 3755 "configure"
-+#line 3770 "configure"
- #include "confdefs.h"
- /* System header to define __stub macros and hopefully few prototypes,
-     which can conflict with char snd_cards(); below.  */
-@@ -3774,7 +3789,7 @@ snd_cards();
-
- ; return 0; }
- EOF
--if { (eval echo configure:3778: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
-+if { (eval echo configure:3793: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
-   rm -rf conftest*
-   eval "ac_cv_func_snd_cards=yes"
- else
-@@ -3792,7 +3807,7 @@ if eval "test \"`echo '$ac_cv_func_'snd_
- else
-   echo "$ac_t""no" 1>&6
- echo $ac_n "checking for snd_cards in -lasound""... $ac_c" 1>&6
--echo "configure:3796: checking for snd_cards in -lasound" >&5
-+echo "configure:3811: checking for snd_cards in -lasound" >&5
- ac_lib_var=`echo asound'_'snd_cards | sed 'y%./+-%__p_%'`
- if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
-   echo $ac_n "(cached) $ac_c" 1>&6
-@@ -3800,7 +3815,7 @@ else
-   ac_save_LIBS="$LIBS"
- LIBS="-lasound  $LIBS"
- cat > conftest.$ac_ext <<EOF
--#line 3804 "configure"
-+#line 3819 "configure"
- #include "confdefs.h"
- /* Override any gcc2 internal prototype to avoid an error.  */
- /* We use char because int might match the return type of a gcc2
-@@ -3811,7 +3826,7 @@ int main() {
- snd_cards()
- ; return 0; }
- EOF
--if { (eval echo configure:3815: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
-+if { (eval echo configure:3830: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
-   rm -rf conftest*
-   eval "ac_cv_lib_$ac_lib_var=yes"
- else
-@@ -3904,7 +3919,7 @@ fi
-   # Extract the first word of "audiofile-config", so it can be a program name with args.
- set dummy audiofile-config; ac_word=$2
- echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
--echo "configure:3908: checking for $ac_word" >&5
-+echo "configure:3923: checking for $ac_word" >&5
- if eval "test \"`echo '$''{'ac_cv_path_AUDIOFILE_CONFIG'+set}'`\" = set"; then
-   echo $ac_n "(cached) $ac_c" 1>&6
- else
-@@ -3939,7 +3954,7 @@ fi
-
-   min_audiofile_version=0.1.5
-   echo $ac_n "checking for AUDIOFILE - version >= $min_audiofile_version""... $ac_c" 1>&6
--echo "configure:3943: checking for AUDIOFILE - version >= $min_audiofile_version" >&5
-+echo "configure:3958: checking for AUDIOFILE - version >= $min_audiofile_version" >&5
-   no_audiofile=""
-   if test "$AUDIOFILE_CONFIG" = "no" ; then
-     no_audiofile=yes
-@@ -3962,7 +3977,7 @@ echo "configure:3943: checking for AUDIO
-   echo $ac_n "cross compiling; assumed OK... $ac_c"
- else
-   cat > conftest.$ac_ext <<EOF
--#line 3966 "configure"
-+#line 3981 "configure"
- #include "confdefs.h"
-
- #include <stdio.h>
-@@ -4020,7 +4035,7 @@ int main ()
-
-
- EOF
--if { (eval echo configure:4024: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
-+if { (eval echo configure:4039: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
- then
-   :
- else
-@@ -4058,7 +4073,7 @@ echo "--- libaudiofile found. Building e
-           CFLAGS="$CFLAGS $AUDIOFILE_CFLAGS"
-           LIBS="$LIBS $AUDIOFILE_LIBS"
-           cat > conftest.$ac_ext <<EOF
--#line 4062 "configure"
-+#line 4077 "configure"
- #include "confdefs.h"
-
- #include <stdio.h>
-@@ -4068,7 +4083,7 @@ int main() {
-  return 0;
- ; return 0; }
- EOF
--if { (eval echo configure:4072: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
-+if { (eval echo configure:4087: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
-   rm -rf conftest*
-    echo "*** The test program compiled, but did not run. This usually means"
-           echo "*** that the run-time linker is not finding AUDIOFILE or finding the wrong"
-@@ -4133,7 +4148,7 @@ DB2HTML=true
- # Extract the first word of "db2html", so it can be a program name with args.
- set dummy db2html; ac_word=$2
- echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
--echo "configure:4137: checking for $ac_word" >&5
-+echo "configure:4152: checking for $ac_word" >&5
- if eval "test \"`echo '$''{'ac_cv_prog_have_db2html'+set}'`\" = set"; then
-   echo $ac_n "(cached) $ac_c" 1>&6
- else
-@@ -4170,7 +4185,7 @@ DB2PS=true
- # Extract the first word of "db2ps", so it can be a program name with args.
- set dummy db2ps; ac_word=$2
- echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
--echo "configure:4174: checking for $ac_word" >&5
-+echo "configure:4189: checking for $ac_word" >&5
- if eval "test \"`echo '$''{'ac_cv_prog_have_db2ps'+set}'`\" = set"; then
-   echo $ac_n "(cached) $ac_c" 1>&6
- else
-@@ -4218,12 +4233,13 @@ if test "x$with_libwrap" = "xyes"; then
-    LIBS="$LIBS -lwrap"
-
-    echo $ac_n "checking for tcp_wrapper library and headers""... $ac_c" 1>&6
--echo "configure:4222: checking for tcp_wrapper library and headers" >&5
-+echo "configure:4237: checking for tcp_wrapper library and headers" >&5
-
-    wrap_ok=no
-    cat > conftest.$ac_ext <<EOF
--#line 4226 "configure"
-+#line 4241 "configure"
- #include "confdefs.h"
-+#include <stdio.h>
- #include <tcpd.h>
- #include <syslog.h>
- int allow_severity = LOG_INFO;
-@@ -4232,7 +4248,7 @@ int main() {
- struct request_info *request; return hosts_access (request);
- ; return 0; }
- EOF
--if { (eval echo configure:4236: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
-+if { (eval echo configure:4252: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
-   rm -rf conftest*
-   cat >> confdefs.h <<\EOF
- #define USE_LIBWRAP 1
-@@ -4246,8 +4262,9 @@ else
-   rm -rf conftest*
-   LIBS="$LIBS -lnsl"
-        cat > conftest.$ac_ext <<EOF
--#line 4250 "configure"
-+#line 4266 "configure"
- #include "confdefs.h"
-+#include <stdio.h>
- #include <tcpd.h>
- #include <syslog.h>
- int allow_severity = LOG_INFO;
-@@ -4256,7 +4273,7 @@ int main() {
- struct request_info *request; return hosts_access (request);
- ; return 0; }
- EOF
--if { (eval echo configure:4260: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
-+if { (eval echo configure:4277: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
-   rm -rf conftest*
-   cat >> confdefs.h <<\EOF
- #define USE_LIBWRAP 1
-@@ -4280,7 +4297,7 @@ fi
- dsp_ok=no ESDDSP= LIBESDDSP= DL_LIB=
-
- echo $ac_n "checking if your platform supports esddsp""... $ac_c" 1>&6
--echo "configure:4284: checking if your platform supports esddsp" >&5
-+echo "configure:4301: checking if your platform supports esddsp" >&5
- case "$host_os" in
-   linux* | freebsd* | bsdi4* )
-     dsp_ok=yes
-@@ -4290,12 +4307,12 @@ echo "$ac_t""$dsp_ok" 1>&6
-
- if test "$dsp_ok" = "yes"; then
-    echo $ac_n "checking for dlopen""... $ac_c" 1>&6
--echo "configure:4294: checking for dlopen" >&5
-+echo "configure:4311: checking for dlopen" >&5
- if eval "test \"`echo '$''{'ac_cv_func_dlopen'+set}'`\" = set"; then
-   echo $ac_n "(cached) $ac_c" 1>&6
- else
-   cat > conftest.$ac_ext <<EOF
--#line 4299 "configure"
-+#line 4316 "configure"
- #include "confdefs.h"
- /* System header to define __stub macros and hopefully few prototypes,
-     which can conflict with char dlopen(); below.  */
-@@ -4318,7 +4335,7 @@ dlopen();
-
- ; return 0; }
- EOF
--if { (eval echo configure:4322: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
-+if { (eval echo configure:4339: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
-   rm -rf conftest*
-   eval "ac_cv_func_dlopen=yes"
- else
-@@ -4336,7 +4353,7 @@ if eval "test \"`echo '$ac_cv_func_'dlop
- else
-   echo "$ac_t""no" 1>&6
- echo $ac_n "checking for dlopen in -ldl""... $ac_c" 1>&6
--echo "configure:4340: checking for dlopen in -ldl" >&5
-+echo "configure:4357: checking for dlopen in -ldl" >&5
- ac_lib_var=`echo dl'_'dlopen | sed 'y%./+-%__p_%'`
- if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
-   echo $ac_n "(cached) $ac_c" 1>&6
-@@ -4344,7 +4361,7 @@ else
-   ac_save_LIBS="$LIBS"
- LIBS="-ldl  $LIBS"
- cat > conftest.$ac_ext <<EOF
--#line 4348 "configure"
-+#line 4365 "configure"
- #include "confdefs.h"
- /* Override any gcc2 internal prototype to avoid an error.  */
- /* We use char because int might match the return type of a gcc2
-@@ -4355,7 +4372,7 @@ int main() {
- dlopen()
- ; return 0; }
- EOF
--if { (eval echo configure:4359: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
-+if { (eval echo configure:4376: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
-   rm -rf conftest*
-   eval "ac_cv_lib_$ac_lib_var=yes"
- else
Index: patches/patch-configure_ac
===================================================================
RCS file: patches/patch-configure_ac
diff -N patches/patch-configure_ac
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ patches/patch-configure_ac 26 Jun 2007 17:10:29 -0000 1.1
@@ -0,0 +1,40 @@
+$OpenBSD: patch-configure_ac,v 1.1 2007/06/26 17:10:29 martynas Exp $
+--- configure.ac.orig Thu May  3 23:47:30 2007
++++ configure.ac Sun Jun  3 00:20:33 2007
+@@ -306,16 +306,11 @@ if test "x$enable_local_sound" = "xyes"; then
+      fi
+    fi
+
+-   if test "$found_sound" = "no"; then
+-      AC_MSG_ERROR([Could not find a support sound driver])
+-   fi
+-
+    dnl Check for additional audio libs needed
+
+    echo "---------------------------------------------------------------------"
+    echo "--- Checking to see which audio libraries are required for linking.";
+    echo "--- Most of these checks should also fail. Do not be alarmed.";
+-   AC_CHECK_FUNC(_oss_ioctl,,[AC_CHECK_LIB(ossaudio,_oss_ioctl)])
+    AC_CHECK_FUNC(ALnewconfig,,[AC_CHECK_LIB(audio,ALnewconfig)])
+    if test "x$enable_alsa" = "xyes"; then
+       AC_CHECK_FUNC(snd_cards,,[AC_CHECK_LIB(sound,snd_cards)])
+@@ -393,7 +388,8 @@ if test "x$with_libwrap" = "xyes"; then
+
+    wrap_ok=no
+    AC_TRY_LINK(
+-[#include <tcpd.h>
++[#include <stdio.h>
++#include <tcpd.h>
+ #include <syslog.h>
+ int allow_severity = LOG_INFO;
+ int deny_severity = LOG_WARNING;],
+@@ -403,7 +399,8 @@ int deny_severity = LOG_WARNING;],
+        wrap_ok=yes],
+       [LIBS="$LIBS -lnsl"
+        AC_TRY_LINK(
+-[#include <tcpd.h>
++[#include <stdio.h>
++#include <tcpd.h>
+ #include <syslog.h>
+ int allow_severity = LOG_INFO;
+ int deny_severity = LOG_WARNING;],
Index: patches/patch-configure_in
===================================================================
RCS file: patches/patch-configure_in
diff -N patches/patch-configure_in
--- patches/patch-configure_in 11 Aug 2007 17:29:36 -0000 1.6
+++ /dev/null 1 Jan 1970 00:00:00 -0000
@@ -1,50 +0,0 @@
---- configure.in.orig Tue Mar 16 16:20:39 2004
-+++ configure.in Thu Aug  9 17:02:45 2007
-@@ -205,6 +205,16 @@ if test "x$enable_local_sound" = "xyes"; then
-       esac
-    fi
-
-+   if test "${ac_cv_header_sys_audioio_h}" = "yes"; then
-+      case ${host_os} in
-+      openbsd* | netbsd*)
-+         found_sound=yes
-+         DRIVER_SUN=1
-+         AC_DEFINE(DRIVER_SUN)
-+         ;;
-+      esac
-+   fi
-+
-    case ${host_os} in
-    os2*)
-       found_sound=yes
-@@ -263,7 +273,9 @@ if test "x$enable_local_sound" = "xyes"; then
-    echo "---------------------------------------------------------------------"
-    echo "--- Checking to see which audio libraries are required for linking.";
-    echo "--- Most of these checks should also fail. Do not be alarmed.";
--   AC_CHECK_FUNC(_oss_ioctl,,[AC_CHECK_LIB(ossaudio,_oss_ioctl)])
-+   if test ! "$DRIVER_SUN"; then
-+     AC_CHECK_FUNC(_oss_ioctl,,[AC_CHECK_LIB(ossaudio,_oss_ioctl)])
-+   fi
-    AC_CHECK_FUNC(ALnewconfig,,[AC_CHECK_LIB(audio,ALnewconfig)])
-    if test "x$enable_alsa" = "xyes"; then
-       AC_CHECK_FUNC(snd_cards,,[AC_CHECK_LIB(sound,snd_cards)])
-@@ -382,7 +394,8 @@ if test "x$with_libwrap" = "xyes"; then
-
-    wrap_ok=no
-    AC_TRY_LINK(
--[#include <tcpd.h>
-+[#include <stdio.h>
-+#include <tcpd.h>
- #include <syslog.h>
- int allow_severity = LOG_INFO;
- int deny_severity = LOG_WARNING;],
-@@ -392,7 +405,8 @@ int deny_severity = LOG_WARNING;],
-        wrap_ok=yes],
-       [LIBS="$LIBS -lnsl"
-        AC_TRY_LINK(
--[#include <tcpd.h>
-+[#include <stdio.h>
-+#include <tcpd.h>
- #include <syslog.h>
- int allow_severity = LOG_INFO;
- int deny_severity = LOG_WARNING;],
Index: patches/patch-esd.c
===================================================================
RCS file: patches/patch-esd.c
diff -N patches/patch-esd.c
--- patches/patch-esd.c 11 Aug 2007 17:29:36 -0000 1.9
+++ /dev/null 1 Jan 1970 00:00:00 -0000
@@ -1,19 +0,0 @@
---- esd.c.orig Wed Jan 14 07:00:46 2004
-+++ esd.c Thu Jun 24 20:07:12 2004
-@@ -236,12 +236,12 @@ struct stat dir_stats;
-
- #if defined(S_ISVTX)
- #define ESD_UNIX_SOCKET_DIR_MODE (S_IRUSR|S_IWUSR|S_IXUSR|\
--  S_IRGRP|S_IWGRP|S_IXGRP|\
--  S_IROTH|S_IWOTH|S_IXOTH|S_ISVTX)
-+  S_IRGRP|S_IXGRP|\
-+  S_IROTH|S_IXOTH|S_ISVTX)
- #else
- #define ESD_UNIX_SOCKET_DIR_MODE (S_IRUSR|S_IWUSR|S_IXUSR|\
--  S_IRGRP|S_IWGRP|S_IXGRP|\
--  S_IROTH|S_IWOTH|S_IXOTH)
-+  S_IRGRP|S_IXGRP|\
-+  S_IROTH|S_IXOTH)
- #endif
-
-   if (mkdir(ESD_UNIX_SOCKET_DIR, ESD_UNIX_SOCKET_DIR_MODE) == 0) {
Index: patches/patch-esd.h
===================================================================
RCS file: patches/patch-esd.h
diff -N patches/patch-esd.h
--- patches/patch-esd.h 26 Jul 2002 19:57:23 -0000 1.5
+++ /dev/null 1 Jan 1970 00:00:00 -0000
@@ -1,19 +0,0 @@
---- esd.h.orig Tue Oct  3 20:36:53 2000
-+++ esd.h Mon Mar  4 17:02:28 2002
-@@ -7,8 +7,16 @@ extern "C" {
- #endif
-
- /* path and name of the default EsounD domain socket */
-+#if 0
- #define ESD_UNIX_SOCKET_DIR "/tmp/.esd"
- #define ESD_UNIX_SOCKET_NAME ESD_UNIX_SOCKET_DIR "/socket"
-+#else
-+#define ESD_UNIX_SOCKET_DIR esd_unix_socket_dir()
-+#define ESD_UNIX_SOCKET_NAME esd_unix_socket_name()
-+
-+char *esd_unix_socket_dir(void);
-+char *esd_unix_socket_name(void);
-+#endif
-
- /* length of the audio buffer size */
- #define ESD_BUF_SIZE (4 * 1024)
Index: patches/patch-esd_c
===================================================================
RCS file: patches/patch-esd_c
diff -N patches/patch-esd_c
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ patches/patch-esd_c 26 Jun 2007 17:10:29 -0000 1.1
@@ -0,0 +1,20 @@
+$OpenBSD: patch-esd_c,v 1.1 2007/06/26 17:10:29 martynas Exp $
+--- esd.c.orig Thu May  3 23:28:35 2007
++++ esd.c Sat Jun  2 23:17:14 2007
+@@ -274,12 +274,12 @@ struct stat dir_stats;
+
+ #if defined(S_ISVTX)
+ #define ESD_UNIX_SOCKET_DIR_MODE (S_IRUSR|S_IWUSR|S_IXUSR|\
+-  S_IRGRP|S_IWGRP|S_IXGRP|\
+-  S_IROTH|S_IWOTH|S_IXOTH|S_ISVTX)
++  S_IRGRP|S_IXGRP|\
++  S_IROTH|S_IXOTH|S_ISVTX)
+ #else
+ #define ESD_UNIX_SOCKET_DIR_MODE (S_IRUSR|S_IWUSR|S_IXUSR|\
+-  S_IRGRP|S_IWGRP|S_IXGRP|\
+-  S_IROTH|S_IWOTH|S_IXOTH)
++  S_IRGRP|S_IXGRP|\
++  S_IROTH|S_IXOTH)
+ #endif
+
+   if (mkdir(ESD_UNIX_SOCKET_DIR, ESD_UNIX_SOCKET_DIR_MODE) == 0) {
Index: patches/patch-esdlib.c
===================================================================
RCS file: patches/patch-esdlib.c
diff -N patches/patch-esdlib.c
--- patches/patch-esdlib.c 2 Aug 2002 13:03:28 -0000 1.6
+++ /dev/null 1 Jan 1970 00:00:00 -0000
@@ -1,11 +0,0 @@
---- esdlib.c.orig Wed Jun 19 09:45:14 2002
-+++ esdlib.c Fri Jul 19 18:26:44 2002
-@@ -660,7 +660,7 @@ int esd_open_sound( const char *host )
- setsid();
- cmd = malloc(sizeof("esd  -spawnfd 999999") + (esd_spawn_options?strlen(esd_spawn_options):0));
-
-- sprintf(cmd, "esd %s -spawnfd %d", esd_spawn_options?esd_spawn_options:"", esd_pipe[1]);
-+ sprintf(cmd, "exec esd %s -spawnfd %d", esd_spawn_options?esd_spawn_options:"", esd_pipe[1]);
-
- execl("/bin/sh", "/bin/sh", "-c", cmd, NULL);
- perror("execl");
Index: patches/patch-ltconfig
===================================================================
RCS file: patches/patch-ltconfig
diff -N patches/patch-ltconfig
--- patches/patch-ltconfig 26 Jul 2002 19:57:23 -0000 1.9
+++ /dev/null 1 Jan 1970 00:00:00 -0000
@@ -1,85 +0,0 @@
---- ltconfig.orig Fri Apr  9 02:12:57 1999
-+++ ltconfig Thu Oct 11 09:39:00 2001
-@@ -484,7 +484,14 @@ fi
-
- if test -n "$RANLIB"; then
-   old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib"
--  old_postinstall_cmds="\$RANLIB \$oldlib~$old_postinstall_cmds"
-+  case "$host_os" in
-+  openbsd*)
-+    old_postinstall_cmds="\$RANLIB -t \$oldlib~$old_postinstall_cmds"
-+  ;;
-+  *)
-+    old_postinstall_cmds="\$RANLIB \$oldlib~$old_postinstall_cmds"
-+  ;;
-+  esac
- fi
-
- # Set sane defaults for `DLLTOOL' and `AS', used on cygwin.
-@@ -1030,7 +1037,9 @@ cygwin* | mingw*)
- freebsd2* | sunos4*)
-   exclude_expsyms="_GLOBAL_OFFSET_TABLE_"
-   ;;
--
-+openbsd*)
-+  with_gnu_ld=no
-+  ;;
- esac
-
- ld_shlibs=yes
-@@ -1262,10 +1271,24 @@ else
-     ;;
-
-   openbsd*)
--    archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linkopts'
--    hardcode_libdir_flag_spec='-R$libdir'
-     hardcode_direct=yes
-     hardcode_shlibpath_var=no
-+    if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
-+      archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $linkopts'
-+      hardcode_libdir_flag_spec='${wl}-R$libdir'
-+      export_dynamic_flag_spec='${wl}-E'
-+    else
-+      case "$host_os" in
-+      openbsd[01].* | openbsd2.[0-7] | openbsd2.[0-7].*)
-+ archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linkopts'
-+ hardcode_libdir_flag_spec='-R$libdir'
-+ ;;
-+      *)
-+ archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $linkopts'
-+ hardcode_libdir_flag_spec='${wl}-R$libdir'
-+ ;;
-+      esac
-+    fi
-     ;;
-
-   os2*)
-@@ -1789,9 +1812,25 @@ netbsd*)
-
- openbsd*)
-   version_type=sunos
--  if test "$with_gnu_ld" = yes; then
--    need_lib_prefix=no
--    need_version=no
-+  need_lib_prefix=no
-+  need_version=no
-+  sys_lib_search_path_spec="/usr/lib"
-+  sys_lib_dlsearch_path_spec="/usr/lib /usr/local/lib"
-+  file_magic_cmd=/usr/bin/file
-+  file_magic_test_file=`echo /usr/lib/libc.so.*`
-+  if test "`echo __ELF__ | $CC -E - | grep __ELF__`" = "" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
-+    deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [LM]SB shared object'
-+    case "$host_os" in
-+    openbsd2.[89] | openbsd2.[89].*)
-+      shlibpath_overrides_runpath=no
-+    ;;
-+    *)
-+      shlibpath_overrides_runpath=yes
-+    ;;
-+    esac
-+  else
-+    deplibs_check_method='file_magic OpenBSD.* shared library'
-+    shlibpath_overrides_runpath=yes
-   fi
-   library_names_spec='${libname}${release}.so$versuffix ${libname}.so$versuffix'
-   finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
Index: patches/patch-ltmain.sh
===================================================================
RCS file: patches/patch-ltmain.sh
diff -N patches/patch-ltmain.sh
--- patches/patch-ltmain.sh 26 Jul 2002 19:57:23 -0000 1.6
+++ /dev/null 1 Jan 1970 00:00:00 -0000
@@ -1,89 +0,0 @@
---- ltmain.sh.orig Fri Apr  9 02:12:58 1999
-+++ ltmain.sh Thu Oct 11 12:46:12 2001
-@@ -1010,9 +1010,35 @@ compiler."
- ;;
-
-       -l*)
-+ if test "$arg" = "-lc"; then
-+  case "$host" in
-+  *-*-openbsd*)
-+    # Do not include libc due to us having libc/libc_r.
-+    continue
-+    ;;
-+  esac
-+ elif test "$arg" = "-lc_r"; then
-+  case "$host" in
-+  *-*-openbsd*)
-+    # Do not include libc_r directly, use -pthread flag.
-+    continue
-+    ;;
-+  esac
-+ fi
- deplibs="$deplibs $arg"
- ;;
-
-+      -pthread)
-+ case $host in
-+ *-*-openbsd*)
-+  deplibs="$deplibs $arg"
-+  ;;
-+ *)
-+  continue
-+  ;;
-+ esac
-+ ;;
-+
-       -module)
- if test "$module" != yes; then
-  module=yes
-@@ -1702,6 +1728,9 @@ compiler."
- *-*-cygwin* | *-*-mingw* | *-*-os2*)
-  # these systems don't actually have a c library (as such)!
-  ;;
-+ *-*-openbsd*)
-+  # Do not include libc due to us having libc/libc_r.
-+  ;;
- *)
-  # Add libc to deplibs on all other systems.
-  deplibs="$deplibs -lc"
-@@ -3326,40 +3355,6 @@ libdir='$install_libdir'\
-     # Exit here if they wanted silent mode.
-     test "$show" = : && exit 0
-
--    echo "----------------------------------------------------------------------"
--    echo "Libraries have been installed in:"
--    for libdir in $libdirs; do
--      echo "   $libdir"
--    done
--    echo
--    echo "If you ever happen to want to link against installed libraries"
--    echo "in a given directory, LIBDIR, you must either use libtool, and"
--    echo "specify the full pathname of the library, or use \`-LLIBDIR'"
--    echo "flag during linking and do at least one of the following:"
--    if test -n "$shlibpath_var"; then
--      echo "   - add LIBDIR to the \`$shlibpath_var' environment variable"
--      echo "     during execution"
--    fi
--    if test -n "$runpath_var"; then
--      echo "   - add LIBDIR to the \`$runpath_var' environment variable"
--      echo "     during linking"
--    fi
--    if test -n "$hardcode_libdir_flag_spec"; then
--      libdir=LIBDIR
--      eval flag=\"$hardcode_libdir_flag_spec\"
--
--      echo "   - use the \`$flag' linker flag"
--    fi
--    if test -n "$admincmds"; then
--      echo "   - have your system administrator run these commands:$admincmds"
--    fi
--    if test -f /etc/ld.so.conf; then
--      echo "   - have your system administrator add LIBDIR to \`/etc/ld.so.conf'"
--    fi
--    echo
--    echo "See any operating system documentation about shared libraries for"
--    echo "more information, such as the ld(1) and ld.so(8) manual pages."
--    echo "----------------------------------------------------------------------"
-     exit 0
-     ;;
-
Index: patches/patch-test-script
===================================================================
RCS file: /cvs/ports/audio/esound/patches/patch-test-script,v
retrieving revision 1.4
retrieving revision 1.3
diff -u -p -r1.4 -r1.3
--- patches/patch-test-script 11 Aug 2007 17:29:36 -0000 1.4
+++ patches/patch-test-script 26 Jun 2007 17:10:29 -0000 1.3
@@ -1,16 +1,18 @@
---- test-script.orig Wed Jul 15 04:26:14 1998
-+++ test-script Tue Mar  5 09:21:40 2002
+$OpenBSD: patch-test-script,v 1.3 2007/06/26 17:10:29 martynas Exp $
+--- test-script.orig Thu Apr 19 17:43:59 2007
++++ test-script Sat Jun  2 23:18:12 2007
 @@ -1,4 +1,4 @@
 -#!/bin/tcsh
-+#!/usr/local/bin/tcsh
++#!_LOCALBASE_/bin/tcsh
  echo welcome to the test.
 
  echo ""
-@@ -40,7 +40,6 @@ echo $< >& /dev/null
+@@ -40,7 +40,7 @@ echo $< >& /dev/null
  esdmon > sample.raw &
  esdcat -b -m -r 11025 test.wav
  sleep 3
 -killall esdmon
++pkill esdmon
 
  echo press enter to continue...
  echo $< >& /dev/null
Index: patches/patch-util_c
===================================================================
RCS file: /cvs/ports/audio/esound/patches/patch-util_c,v
retrieving revision 1.4
retrieving revision 1.3
diff -u -p -r1.4 -r1.3
--- patches/patch-util_c 11 Aug 2007 17:29:36 -0000 1.4
+++ patches/patch-util_c 26 Jun 2007 17:10:29 -0000 1.3
@@ -1,6 +1,6 @@
-$OpenBSD: patch-util_c,v 1.4 2007/08/11 17:29:36 martynas Exp $
---- util.c.orig Mon Mar  1 12:06:58 2004
-+++ util.c Thu Jun 24 20:15:35 2004
+$OpenBSD: patch-util_c,v 1.3 2007/06/26 17:10:29 martynas Exp $
+--- util.c.orig Thu Apr 19 17:43:59 2007
++++ util.c Sat Jun  2 23:38:31 2007
 @@ -1,5 +1,8 @@
  #include "config.h"
  #include "esd.h"
@@ -10,11 +10,11 @@ $OpenBSD: patch-util_c,v 1.4 2007/08/11
  #include <sys/types.h>
  #include <sys/socket.h>
  #include <stdlib.h>
-@@ -23,38 +26,31 @@ have_ipv6() {
+@@ -23,38 +26,31 @@ have_ipv6(void) {
  const char*
  esd_get_socket_dirname (void)
  {
-- char *audiodev;
+- const char *audiodev;
 - static char *dirname = NULL;
 + static char *sockdir = NULL, sockdirbuf[PATH_MAX];
 + struct passwd *pw;
@@ -32,7 +32,7 @@ $OpenBSD: patch-util_c,v 1.4 2007/08/11
 - strcpy(dirname, "/tmp/.esd");
 - strcat(dirname, audiodev);
 + if (sockdir != NULL)
-+ return (sockdir);
++ return sockdir;
 + pw = getpwuid(getuid());
 + if (pw == NULL || pw->pw_dir == NULL) {
 + fprintf(stderr, "esd: could not find home directory\n");
@@ -43,7 +43,7 @@ $OpenBSD: patch-util_c,v 1.4 2007/08/11
 + snprintf(sockdirbuf, sizeof(sockdirbuf), "%s/.esd", pw->pw_dir);
 + endpwent();
 + sockdir = sockdirbuf;
-+ return (sockdir);
++ return sockdir;
  }
 
  const char*
@@ -62,9 +62,9 @@ $OpenBSD: patch-util_c,v 1.4 2007/08/11
 -
 - return name;
 + if (sockname != NULL)
-+ return (sockname);
++ return sockname;
 + snprintf(socknamebuf, sizeof(socknamebuf), "%s/socket",
 + esd_get_socket_dirname());
 + sockname = socknamebuf;
-+ return (sockname);
++ return sockname;
  }
Index: pkg/COMMENT
===================================================================
RCS file: pkg/COMMENT
diff -N pkg/COMMENT
--- pkg/COMMENT 25 Mar 2001 17:40:16 -0000 1.4
+++ /dev/null 1 Jan 1970 00:00:00 -0000
@@ -1 +0,0 @@
-sound library for Enlightenment
Index: pkg/DEINSTALL
===================================================================
RCS file: pkg/DEINSTALL
diff -N pkg/DEINSTALL
--- pkg/DEINSTALL 5 Aug 2004 03:02:01 -0000 1.5
+++ /dev/null 1 Jan 1970 00:00:00 -0000
@@ -1,24 +0,0 @@
-#!/bin/sh
-# $OpenBSD: DEINSTALL,v 1.5 2004/08/05 03:02:01 espie dead $
-#
-# esound de-installation
-
-PATH=/bin:/usr/bin:/sbin:/usr/sbin
-PREFIX=${PKG_PREFIX:-/usr/local}
-CONFIG_FILE=${SYSCONFDIR}/esd.conf
-
-if [ "$PKG_DELETE_EXTRA" != Yes -a -f $CONFIG_FILE ]; then
-    echo
-    echo "+---------------"
-    echo "| To completely deinstall the $1 package you need to perform"
-    echo "| this step as root:"
-    echo "|"
-    echo "|           rm -f $CONFIG_FILE"
-    echo "|"
-    echo "| Do not do this if you plan on re-installing $1"
-    echo "| at some future time."
-    echo "+---------------"
-    echo
-fi
-
-exit 0
Index: pkg/DESCR
===================================================================
RCS file: /cvs/ports/audio/esound/pkg/DESCR,v
retrieving revision 1.6
retrieving revision 1.5
diff -u -p -r1.6 -r1.5
--- pkg/DESCR 11 Aug 2007 17:29:36 -0000 1.6
+++ pkg/DESCR 26 Jun 2007 17:10:29 -0000 1.5
@@ -1 +1,6 @@
-sound library for Enlightenment
+Esound is an audio mixing server that allows multiple applications
+to output sound to the same audio device.
+
+Esound is seriously lacking in features required for a modern desktop
+environment, particularly for multi-channel audio and audio/video
+synchronization.
Index: pkg/INSTALL
===================================================================
RCS file: pkg/INSTALL
diff -N pkg/INSTALL
--- pkg/INSTALL 5 Aug 2004 03:02:01 -0000 1.6
+++ /dev/null 1 Jan 1970 00:00:00 -0000
@@ -1,58 +0,0 @@
-#!/bin/sh
-# $OpenBSD: INSTALL,v 1.6 2004/08/05 03:02:01 espie dead $
-#
-# Pre/post-installation setup of esound
-
-PATH=/bin:/usr/bin:/sbin:/usr/sbin
-PREFIX=${PKG_PREFIX:-/usr/local}
-CONFIG_FILE=${SYSCONFDIR}/esd.conf
-SAMPLE_CONFIG_FILE=$PREFIX/share/examples/esound/esd.conf
-
-do_notice()
-{
-    echo
-    echo "+---------------"
-    echo "| The existing $1 configuration file, $CONFIG_FILE,"
-    echo "| has NOT been changed.  You may want to compare it to the"
-    echo "| current sample file, $SAMPLE_CONFIG_FILE,"
-    echo "| and update your configuration as needed."
-    echo "+---------------"
-    echo
-}
-
-do_install()
-{
-    install -o root -g wheel -m 644 $SAMPLE_CONFIG_FILE $CONFIG_FILE
-    echo
-    echo "+---------------"
-    echo "| The $1 configuration file, $CONFIG_FILE,"
-    echo "| has been installed.  Please view this file and change"
-    echo "| the configuration to meet your needs."
-    echo "+---------------"
-    echo
-
-}
-
-if [ $# -ne 2 ]; then
-    echo "usage: $0 distname { PRE-INSTALL | POST-INSTALL }" >&2
-    exit 1
-fi
-
-case $2 in
-    PRE-INSTALL)
- : nothing to pre-install for this port
- ;;
-    POST-INSTALL)
- if [ -f $CONFIG_FILE ]; then
-    do_notice $1
- else
-    do_install $1
- fi
- ;;
-    *)
- echo "usage: $0 distname { PRE-INSTALL | POST-INSTALL }" >&2
- exit 1
- ;;
-esac
-
-exit 0
Index: pkg/PFRAG.no-shared
===================================================================
RCS file: pkg/PFRAG.no-shared
diff -N pkg/PFRAG.no-shared
--- pkg/PFRAG.no-shared 26 Jun 2004 04:38:33 -0000 1.2
+++ /dev/null 1 Jan 1970 00:00:00 -0000
@@ -1,2 +0,0 @@
-@comment $OpenBSD: PFRAG.no-shared,v 1.2 2004/06/26 04:38:33 brad dead $
-@dirrm lib/pkgconfig
Index: pkg/PLIST
===================================================================
RCS file: /cvs/ports/audio/esound/pkg/PLIST,v
retrieving revision 1.17
retrieving revision 1.16
diff -u -p -r1.17 -r1.16
--- pkg/PLIST 11 Aug 2007 17:29:36 -0000 1.17
+++ pkg/PLIST 26 Jun 2007 17:10:29 -0000 1.16
@@ -1,4 +1,4 @@
-@comment $OpenBSD: PLIST,v 1.17 2007/08/11 17:29:36 martynas Exp $
+@comment $OpenBSD: PLIST,v 1.16 2007/06/26 17:10:29 martynas Exp $
 bin/esd
 bin/esd-config
 bin/esdcat
@@ -18,7 +18,6 @@ lib/pkgconfig/esound.pc
 @man man/man1/esd.1
 @man man/man1/esdcat.1
 @man man/man1/esdctl.1
-@man man/man1/esddsp.1
 @man man/man1/esdfilt.1
 @man man/man1/esdloop.1
 @man man/man1/esdmon.1
Index: pkg/PLIST.noshared
===================================================================
RCS file: pkg/PLIST.noshared
diff -N pkg/PLIST.noshared
--- pkg/PLIST.noshared 10 Jun 2000 17:39:13 -0000 1.3
+++ /dev/null 1 Jan 1970 00:00:00 -0000
@@ -1,14 +0,0 @@
-bin/esd
-bin/esd-config
-bin/esdcat
-bin/esdctl
-bin/esdfilt
-bin/esdloop
-bin/esdmon
-bin/esdplay
-bin/esdrec
-bin/esdsample
-include/esd.h
-lib/libesd.a
-lib/libesd.la
-share/aclocal/esd.m4

Reply | Threaded
Open this post in threaded view
|

Re: esound 2.38 revisited

Tim van der Molen-3
On Fri, 18 Jan 2008 22:23:36 +0100, Deanna Phillips wrote:

> As you may recall, a long-overdue update to esound was backed
> out at the last minute before the 4.2 release.  The thread is
> here:
>
> http://marc.info/?l=openbsd-ports&m=118541595130336&w=2
>
> I've just tried the 2.38 update on auich(4) and can't reproduce
> the problems we once had.
>
> 2.38 also fixes some bugs with socket creation and cleanup that
> are causing micropolis to skip some sounds.  This bug can be
> reproduced by throwing many files at esdplay at once with
> something like 'for file in *.wav ; do esdplay $file& ; done',
> or running the Firebomb scenario in Micropolis and watching
> stderr.
>
> esd should be able to mix those sounds (that's what it's for),
> but with the version in tree it gets very confused and skips
> some, fails to open the audio device or resample, etc.
>
> So.  Here's Martynas's old diff pulled from cvs.
>
> Anyone want to try again?

Using the same laptop as I did in the thread referenced above, I still
have the behaviour I described at
<http://marc.info/?l=openbsd-ports&m=118616452718942&w=2>.

Regards,
Tim

OpenBSD 4.2-current (GENERIC) #651: Tue Jan 22 17:34:45 MST 2008
    [hidden email]:/usr/src/sys/arch/i386/compile/GENERIC
cpu0: Intel(R) Pentium(R) III Mobile CPU 933MHz ("GenuineIntel" 686-class) 931 MHz
cpu0: FPU,V86,DE,PSE,TSC,MSR,PAE,MCE,CX8,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,MMX,FXSR,SSE
real mem  = 267350016 (254MB)
avail mem = 250601472 (238MB)
mainbus0 at root
bios0 at mainbus0: AT/286+ BIOS, date 07/30/01, BIOS32 rev. 0 @ 0xfd860, SMBIOS rev. 2.3 @ 0xfef0000 (53 entries)
bios0: vendor Phoenix/FUJITSU version "Version  1.06" date 07/30/2001
bios0: FUJITSU SIEMENS LIFEBOOK E Series
apm0 at bios0: Power Management spec V1.2
apm0: battery life expectancy 90%
apm0: AC on, battery charge high, charging
acpi at bios0 function 0x0 not configured
pcibios0 at bios0: rev 2.1 @ 0xfd860/0x7a0
pcibios0: PCI IRQ Routing Table rev 1.0 @ 0xfdf40/160 (8 entries)
pcibios0: PCI Interrupt Router at 000:31:0 ("Intel 82371FB ISA" rev 0x00)
pcibios0: PCI bus #4 is the last bus
bios0: ROM list: 0xc0000/0xe000
cpu0 at mainbus0
pci0 at mainbus0 bus 0: configuration mode 1 (no bios)
pchb0 at pci0 dev 0 function 0 "Intel 82830M Host" rev 0x02
agp0 at pchb0: no integrated graphics
ppb0 at pci0 dev 1 function 0 "Intel 82830M AGP" rev 0x02
pci1 at ppb0 bus 1
vga1 at pci1 dev 0 function 0 "ATI Radeon Mobility M6 LY" rev 0x00
wsdisplay0 at vga1 mux 1: console (80x25, vt100 emulation)
wsdisplay0: screen 1-5 added (80x25, vt100 emulation)
uhci0 at pci0 dev 29 function 0 "Intel 82801CA/CAM USB" rev 0x01: irq 11
uhci1 at pci0 dev 29 function 2 "Intel 82801CA/CAM USB" rev 0x01: irq 11
ppb1 at pci0 dev 30 function 0 "Intel 82801BAM Hub-to-PCI" rev 0x41
pci2 at ppb1 bus 2
cbb0 at pci2 dev 10 function 0 "O2 Micro OZ6933 CardBus" rev 0x02: irq 11
cbb1 at pci2 dev 10 function 1 "O2 Micro OZ6933 CardBus" rev 0x02: irq 11
rl0 at pci2 dev 13 function 0 "Realtek 8139" rev 0x10: irq 11, address 00:e0:00:58:97:2d
rlphy0 at rl0 phy 0: RTL internal PHY
cardslot0 at cbb0 slot 0 flags 0
cardbus0 at cardslot0: bus 3 device 0 cacheline 0x0, lattimer 0x20
pcmcia0 at cardslot0
cardslot1 at cbb1 slot 1 flags 0
cardbus1 at cardslot1: bus 4 device 0 cacheline 0x0, lattimer 0x20
pcmcia1 at cardslot1
ichpcib0 at pci0 dev 31 function 0 "Intel 82801CAM LPC" rev 0x01: 24-bit timer at 3579545Hz: SpeedStep
pciide0 at pci0 dev 31 function 1 "Intel 82801CAM IDE" rev 0x01: DMA, channel 0 configured to compatibility, channel 1 configured to compatibility
wd0 at pciide0 channel 0 drive 0: <TOSHIBA MK6014MAP>
wd0: 16-sector PIO, LBA, 5729MB, 11733120 sectors
wd0(pciide0:0:0): using PIO mode 4, Ultra-DMA mode 4
atapiscsi0 at pciide0 channel 1 drive 0
scsibus0 at atapiscsi0: 2 targets
cd0 at scsibus0 targ 0 lun 0: <TEAC, CD-224E, 1.7A> SCSI0 5/cdrom removable
cd0(pciide0:1:0): using PIO mode 4, Ultra-DMA mode 2
ichiic0 at pci0 dev 31 function 3 "Intel 82801CA/CAM SMBus" rev 0x01: SMI
iic0 at ichiic0
iic0: addr 0x19 00=00 01=00 02=00 03=00 04=00 05=00 06=00 07=00 08=00 09=00 0a=00 0b=00 0c=00 0d=00 0e=00 0f=00 10=00 11=20 24=00 b9=00 ba=00 words 00=0000 01=0000 02=0000 03=0000 04=0000 05=0000 06=0000 07=0000 08=0000 09=0000 0a=0000 0b=0000 0c=0000 0d=0000 0e=0000 0f=0000
auich0 at pci0 dev 31 function 5 "Intel 82801CA/CAM AC97" rev 0x01: irq 11, ICH3 AC97
ac97: codec id 0x83847609 (SigmaTel STAC9721/23)
ac97: codec features 18 bit DAC, 18 bit ADC, SigmaTel 3D
audio0 at auich0
usb0 at uhci0: USB revision 1.0
uhub0 at usb0 "Intel UHCI root hub" rev 1.00/1.00 addr 1
usb1 at uhci1: USB revision 1.0
uhub1 at usb1 "Intel UHCI root hub" rev 1.00/1.00 addr 1
isa0 at ichpcib0
isadma0 at isa0
pckbc0 at isa0 port 0x60/5
pckbd0 at pckbc0 (kbd slot)
pckbc0: using irq 1 for kbd slot
wskbd0 at pckbd0: console keyboard, using wsdisplay0
pms0 at pckbc0 (aux slot)
pckbc0: using irq 12 for aux slot
wsmouse0 at pms0 mux 0
pcppi0 at isa0 port 0x61
midi0 at pcppi0: <PC speaker>
spkr0 at pcppi0
lpt0 at isa0 port 0x378/4 irq 7
npx0 at isa0 port 0xf0/16: reported by CPUID; using exception 16
pccom0 at isa0 port 0x3f8/8 irq 4: ns16550a, 16 byte fifo
fdc0 at isa0 port 0x3f0/6 irq 6 drq 2
biomask ef6d netmask ef6d ttymask ffef
mtrr: Pentium Pro MTRR support
softraid0 at root
root on wd0a swap on wd0b dump on wd0b

Reply | Threaded
Open this post in threaded view
|

Re: esound 2.38 revisited

j4nKy
On Fri, Jan 25, 2008 at 06:00:12PM +0100, Tim van der Molen wrote:

> On Fri, 18 Jan 2008 22:23:36 +0100, Deanna Phillips wrote:
> > As you may recall, a long-overdue update to esound was backed
> > out at the last minute before the 4.2 release.  The thread is
> > here:
> >
> > http://marc.info/?l=openbsd-ports&m=118541595130336&w=2
> >
> > I've just tried the 2.38 update on auich(4) and can't reproduce
> > the problems we once had.
> >
> > 2.38 also fixes some bugs with socket creation and cleanup that
> > are causing micropolis to skip some sounds.  This bug can be
> > reproduced by throwing many files at esdplay at once with
> > something like 'for file in *.wav ; do esdplay $file& ; done',
> > or running the Firebomb scenario in Micropolis and watching
> > stderr.
> >
> > esd should be able to mix those sounds (that's what it's for),
> > but with the version in tree it gets very confused and skips
> > some, fails to open the audio device or resample, etc.
> >
> > So.  Here's Martynas's old diff pulled from cvs.
> >
> > Anyone want to try again?
>
> Using the same laptop as I did in the thread referenced above, I still
> have the behaviour I described at
> <http://marc.info/?l=openbsd-ports&m=118616452718942&w=2>.

esd should use AUMODE_PLAY_ALL.  it should have always been using
that, but AUMODE_PLAY_ALL was broken for emulated formats for a
really long time.  it's been fixed for a while now though.

*anything* ported from OSS to audio(4) should use AUMODE_PLAY_ALL.
AFAIK, audio(4) is the only (relatively) common audio system that
even has a mode that tries to enforce "realtime" by eating "late"
data.

--
[hidden email]
SDF Public Access UNIX System - http://sdf.lonestar.org

Reply | Threaded
Open this post in threaded view
|

Re: esound 2.38 revisited

j4nKy
In reply to this post by Deanna Phillips-2
On Fri, Jan 18, 2008 at 04:23:36PM -0500, Deanna Phillips wrote:

> As you may recall, a long-overdue update to esound was backed
> out at the last minute before the 4.2 release.  The thread is
> here:
>
> http://marc.info/?l=openbsd-ports&m=118541595130336&w=2
>
> I've just tried the 2.38 update on auich(4) and can't reproduce
> the problems we once had.
>
> 2.38 also fixes some bugs with socket creation and cleanup that
> are causing micropolis to skip some sounds.  This bug can be
> reproduced by throwing many files at esdplay at once with
> something like 'for file in *.wav ; do esdplay $file& ; done',
> or running the Firebomb scenario in Micropolis and watching
> stderr.
>
> esd should be able to mix those sounds (that's what it's for),
> but with the version in tree it gets very confused and skips
> some, fails to open the audio device or resample, etc.
>
> So.  Here's Martynas's old diff pulled from cvs.
>
> Anyone want to try again?

here's a new diff, with some improvements in the audio(4) interface,
and an -arts FLAVOR.  yes, arts depends on esd, so you have to build
a non-flavored esd, then arts, then -arts FLAVORed esd, and then
install the FLAVORed esd with pkg_add -r -F installed esd-arts.  after
all that, it has worked quite well in my testing.

--
[hidden email]
SDF Public Access UNIX System - http://sdf.lonestar.org

Index: Makefile
===================================================================
RCS file: /home/cvs/OpenBSD/ports/audio/esound/Makefile,v
retrieving revision 1.39
diff -u -r1.39 Makefile
--- Makefile 28 Oct 2006 10:30:41 -0000 1.39
+++ Makefile 10 Mar 2008 20:53:14 -0000
@@ -1,11 +1,10 @@
-# $OpenBSD: Makefile,v 1.39 2006/10/28 10:30:41 espie Exp $
+# $OpenBSD: Makefile,v 1.40 2007/06/26 17:10:29 martynas Exp $
 # $FreeBSD: Makefile,v 1.8 1999/03/09 01:08:46 nectar Exp $
 
 COMMENT= "sound library for Enlightenment"
 
-DISTNAME= esound-0.2.34
-PKGNAME= ${DISTNAME}p0
-SHARED_LIBS += esd                  2.34     # .2.34
+DISTNAME= esound-0.2.38
+SHARED_LIBS += esd                  2.40     # .2.38
 CATEGORIES= audio
 MASTER_SITES= ${MASTER_SITE_GNOME:=sources/esound/0.2/}
 
@@ -20,16 +19,37 @@
 PERMIT_DISTFILES_FTP= Yes
 WANTLIB= c m wrap
 
+FLAVORS= arts
+FLAVOR?=
+
 USE_LIBTOOL= Yes
 SEPARATE_BUILD= concurrent
-AUTOCONF_VERSION=2.13
+AUTOCONF_VERSION=2.61
 CONFIGURE_STYLE= autoconf
-CONFIGURE_ARGS+= ${CONFIGURE_SHARED}
-CONFIGURE_ARGS+= --with-libwrap
+CONFIGURE_ARGS+= ${CONFIGURE_SHARED} \
+ --disable-alsa \
+ --disable-oss \
+ --with-libwrap
 # broken, relies upon v4-mapped addresses
 CONFIGURE_ARGS+= --disable-ipv6
 
+.if ${FLAVOR:L:Marts}
+CONFIGURE_ARGS+=--enable-arts
+MODULES+= devel/gettext
+LIB_DEPENDS+= artsc::x11/kde/arts3
+WANTLIB+= glib-2.0 gthread-2.0 gmodule-2.0 pcre pthread stdc++
+.else
+CONFIGURE_ARGS+=--disable-arts
+.endif
+
+FAKE_FLAGS= DESTDIR=${WRKINST} \
+ esdconfdir=${PREFIX}/share/examples/esound
+
 post-extract:
  @cp -f ${FILESDIR}/audio_sun.c ${WRKSRC}
+
+pre-configure:
+ @perl -pi -e 's|_LOCALBASE_|${LOCALBASE}|' \
+ ${WRKSRC}/test-script
 
 .include <bsd.port.mk>
Index: distinfo
===================================================================
RCS file: /home/cvs/OpenBSD/ports/audio/esound/distinfo,v
retrieving revision 1.6
diff -u -r1.6 distinfo
--- distinfo 5 Apr 2007 15:37:41 -0000 1.6
+++ distinfo 10 Mar 2008 20:53:14 -0000
@@ -1,5 +1,5 @@
-MD5 (esound-0.2.34.tar.gz) = lSbU/7u9lGJ2izjAgscmxw==
-RMD160 (esound-0.2.34.tar.gz) = +/rAann7gX+e9h14CJRfe6h8ARA=
-SHA1 (esound-0.2.34.tar.gz) = T6H7MhIZl/6edQe/WvKWpkvAoiA=
-SHA256 (esound-0.2.34.tar.gz) = ass7wF3kshz9cpH93R9XwooxyHLuYGowp4ktAkLdznU=
-SIZE (esound-0.2.34.tar.gz) = 392336
+MD5 (esound-0.2.38.tar.gz) = d8TpgFoBf7oGVSSH3zxmYg==
+RMD160 (esound-0.2.38.tar.gz) = OwL3H38UZcIECjzwETbzHWJnfmE=
+SHA1 (esound-0.2.38.tar.gz) = QFQ9y1sVcsdwKwuwt1aEQEY1G6U=
+SHA256 (esound-0.2.38.tar.gz) = SKOU83d2M2JmBnlKUpTwHilOERTWzD54lMapDyImsGc=
+SIZE (esound-0.2.38.tar.gz) = 519964
Index: files/audio_sun.c
===================================================================
RCS file: /home/cvs/OpenBSD/ports/audio/esound/files/audio_sun.c,v
retrieving revision 1.3
diff -u -r1.3 audio_sun.c
--- files/audio_sun.c 25 Jan 2004 22:07:28 -0000 1.3
+++ files/audio_sun.c 10 Mar 2008 20:53:14 -0000
@@ -27,7 +27,10 @@
 
 #include "config.h"
 
+#include <sys/types.h>
+#include <sys/ioctl.h>
 #include <sys/audioio.h>
+#include <string.h>
 
 static void sun_panic(int fd, char *s)
 {
@@ -48,9 +51,8 @@
 {
     const char *device;
     int afd = -1;
-    int fmt = 0, channels = 0;
+    int fmt = 0, channels = 0, bits = 0;
     int mode = O_WRONLY;
-    audio_encoding_t enc;
     audio_info_t info;
 
     AUDIO_INITINFO(&info);
@@ -58,13 +60,11 @@
     /* set the appropriate mode */
     if((esd_audio_format & ESD_MASK_FUNC) == ESD_RECORD) {
         mode = O_RDWR;
- info.mode = AUMODE_PLAY | AUMODE_RECORD;
+ info.mode = AUMODE_PLAY | AUMODE_PLAY_ALL | AUMODE_RECORD;
     } else {
- info.mode = AUMODE_PLAY;
+ info.mode = AUMODE_PLAY | AUMODE_PLAY_ALL;
     }
 
-    mode |= O_NONBLOCK;
-
     /* open the sound device */
     device = esd_audio_device ? esd_audio_device : "/dev/audio";
     if ((afd = open(device, mode, 0)) == -1) {
@@ -72,10 +72,6 @@
         return( -2 );
     }
 
-    mode = fcntl(afd, F_GETFL);
-    mode &= ~O_NONBLOCK;
-    fcntl(afd, F_SETFL, mode);
-
     /* set the requested mode */
     if(ioctl(afd, AUDIO_SETINFO, &info) < 0) {
  sun_panic(afd, "AUDIO_SETINFO");
@@ -91,22 +87,24 @@
     }
 
     /* pick a supported encoding */
-    
-#if defined(WORDS_BIGENDIAN)
-    fmt = ( (esd_audio_format & ESD_MASK_BITS) == ESD_BITS16 )
-        ? /* 16 bit */  AUDIO_ENCODING_SLINEAR_BE
- : /* 8 bit */ AUDIO_ENCODING_PCM8;
-#else
-    fmt = ( (esd_audio_format & ESD_MASK_BITS) == ESD_BITS16 )
-        ? /* 16 bit */ AUDIO_ENCODING_SLINEAR_LE
- : /* 8 bit */ AUDIO_ENCODING_PCM8;
-#endif
-
-    enc.index = 0;
-    while(!ioctl(afd, AUDIO_GETENC, &enc) && enc.encoding != fmt) {
- enc.index++;
+    if ((esd_audio_format & ESD_MASK_BITS) == ESD_BITS16) {
+        bits = 16;
+        fmt = (BYTE_ORDER == 4321) ?
+          AUDIO_ENCODING_SLINEAR_BE : AUDIO_ENCODING_SLINEAR_LE;
+    } else {
+        bits = 8;
+        fmt = (BYTE_ORDER == 4321) ?
+          AUDIO_ENCODING_ULINEAR_BE : AUDIO_ENCODING_ULINEAR_LE;
+    }
+    info.play.encoding = fmt;
+    info.play.precision = bits;
+    if(ioctl(afd, AUDIO_SETINFO, &info) == -1) {
+ fprintf(stderr, "Unsupported encoding: %i-bit (0x%x)\n",
+    bits, fmt);
+ sun_panic(afd, "SETINFO");
+ return(-1);
     }
-    
+
     /* number of channels */
     channels = (((esd_audio_format & ESD_MASK_CHAN) == ESD_STEREO)
         ? /* stereo */ 2
@@ -116,13 +114,19 @@
     if((esd_audio_format & ESD_MASK_FUNC) == ESD_RECORD) {
  info.record.channels = channels;
     }
-
-    info.play.encoding = fmt;
-    info.play.precision = enc.precision;
-
     if(ioctl(afd, AUDIO_SETINFO, &info) == -1) {
- fprintf(stderr, "Unsupported encoding: %i-bit \"%s\" (0x%x)\n",
-    enc.precision, enc.name, fmt);
+ fprintf(stderr, "Unsupported channel count: %d\n",
+    channels);
+ sun_panic(afd, "SETINFO");
+ return(-1);
+    }
+
+    /* blocksize, a common power of 2 */
+    info.blocksize = 4096;
+    info.hiwat = 4;
+    if(ioctl(afd, AUDIO_SETINFO, &info) < 0) {
+ fprintf(stderr, "Unsupported blocksize: %d\n",
+    info.blocksize);
  sun_panic(afd, "SETINFO");
  return(-1);
     }
Index: patches/patch-Makefile.in
===================================================================
RCS file: patches/patch-Makefile.in
diff -N patches/patch-Makefile.in
--- patches/patch-Makefile.in 26 Jun 2004 04:38:33 -0000 1.6
+++ /dev/null 1 Jan 1970 00:00:00 -0000
@@ -1,11 +0,0 @@
---- Makefile.in.orig Tue Mar 16 07:26:18 2004
-+++ Makefile.in Thu Jun 24 20:07:12 2004
-@@ -180,7 +180,7 @@ esd_LDADD = $(WRAP_LIB) $(LDADD)
- m4datadir = $(datadir)/aclocal
- m4data_DATA = esd.m4
-
--esdconfdir = $(sysconfdir)
-+esdconfdir = $(datadir)/examples/esound
- esdconf_DATA = esd.conf
-
- pkgconfigdir = $(libdir)/pkgconfig
Index: patches/patch-acconfig_h
===================================================================
RCS file: patches/patch-acconfig_h
diff -N patches/patch-acconfig_h
--- patches/patch-acconfig_h 26 Jun 2004 04:38:33 -0000 1.3
+++ /dev/null 1 Jan 1970 00:00:00 -0000
@@ -1,10 +0,0 @@
---- acconfig.h.orig Thu Jan 15 05:49:09 2004
-+++ acconfig.h Thu Jun 24 20:09:24 2004
-@@ -11,6 +11,7 @@
- #undef DRIVER_ALSA_09_NEW_PCM_API
- #undef DRIVER_DART
- #undef DRIVER_COREAUDIO
-+#undef DRIVER_SUN
- #undef DRIVER_NONE
- #undef HAVE_INET_ATON
- #undef HAVE_INET_PTON
Index: patches/patch-audio_arts_c
===================================================================
RCS file: patches/patch-audio_arts_c
diff -N patches/patch-audio_arts_c
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ patches/patch-audio_arts_c 10 Mar 2008 20:53:14 -0000
@@ -0,0 +1,89 @@
+$OpenBSD$
+--- audio_arts.c.orig Thu Apr 19 07:43:59 2007
++++ audio_arts.c Sun Mar  9 22:03:23 2008
+@@ -19,6 +19,7 @@
+  *
+  */
+
++#if 0
+ #include <dlfcn.h>
+
+ enum arts_parameter_t_enum { ARTS_P_BUFFER_TIME = 2 };
+@@ -37,14 +38,17 @@ static int (*arts_stream_set)(arts_stream_t sst, arts_
+
+ static arts_stream_t (*arts_play_stream)(int rrate, int bbits, int cch, const char *nn);
+ static arts_stream_t (*arts_record_stream)(int rrate, int bbits, int cch, const char *nn);
++#endif
+
++#include <artsc/artsc.h>
++
+ static arts_stream_t stream;
+ static int err_arts = -1;
+ static int arts_exit = 1;
+
+ static int arts()
+ {
+-
++#if 0
+     handle = dlopen ("libartsc.so", RTLD_LAZY);
+
+     if (!handle) {
+@@ -61,12 +65,13 @@ static int arts()
+     arts_record_stream = dlsym(handle, "arts_record_stream");
+     arts_close_stream = dlsym(handle, "arts_close_stream");
+     arts_stream_set = dlsym(handle, "arts_stream_set");
++#endif
+
+     err_arts = arts_init();
+
+     if (err_arts < 0) {
+ arts_exit = 0;
+-        dlclose(handle);
++        // dlclose(handle);
+         return err_arts;
+     }
+    
+@@ -83,6 +88,8 @@ int arts_esd_audio_open()
+     int channels;
+     int bits;
+
++    err_arts = arts_init();
++
+     channels = ( ( ( esd_audio_format & ESD_MASK_CHAN) == ESD_STEREO )
+         ? /* stereo */ 2 : /* mono */ 1 );
+     bits = ( (esd_audio_format & ESD_MASK_BITS) == ESD_BITS16 )
+@@ -105,7 +112,7 @@ void arts_esd_audio_close()
+     arts_close_stream(stream);
+     arts_exit = 0;
+     arts_free();
+-    dlclose(handle);
++    // dlclose(handle);
+     return;
+ }
+
+@@ -131,11 +138,13 @@ void arts_esd_audio_flush()
+
+ static void impl_exit()
+ {
++#if 0
+     if ((arts_exit > 0) && (handle)) {
+ if (err_arts >= 0)
+    arts_free();
+ dlclose(handle);
+     }
++#endif
+ }
+
+ void artschk()
+@@ -148,6 +157,10 @@ void artschk()
+ impl_esd_audio_flush = arts_esd_audio_flush;
+ impl_esd_audio_write = arts_esd_audio_write;
+ impl_esd_audio_read = arts_esd_audio_read;
++ /* close connection.  esd carelessly close()s 0-128, which will likely
++   include our connection and leave us messed up.  open it again when
++   ready to send data. */
++ arts_free();
+     }
+-    atexit(impl_exit);
++    // atexit(impl_exit);
+ }
Index: patches/patch-audio_c
===================================================================
RCS file: /home/cvs/OpenBSD/ports/audio/esound/patches/patch-audio_c,v
retrieving revision 1.2
diff -u -r1.2 patch-audio_c
--- patches/patch-audio_c 26 Jul 2002 19:57:23 -0000 1.2
+++ patches/patch-audio_c 10 Mar 2008 20:53:14 -0000
@@ -1,11 +1,39 @@
---- audio.c.orig Tue Jun  4 10:40:44 2002
-+++ audio.c Fri Jul 19 18:32:52 2002
-@@ -25,6 +25,8 @@ static int esd_audio_fd = -1;
- #  include "audio_alsa.c"
- #elif defined(DRIVER_ALSA_09)
- #include "audio_alsa09.c"
-+#elif defined(DRIVER_SUN)
-+#  include "audio_sun.c"
- #elif defined(DRIVER_OSS)
- #  include "audio_oss.c"
- #elif defined(DRIVER_AIX)
+$OpenBSD: patch-audio_c,v 1.3 2007/06/26 17:10:29 martynas Exp $
+--- audio.c.orig Thu Apr 19 17:43:59 2007
++++ audio.c Sat Jun  2 23:15:49 2007
+@@ -20,34 +20,7 @@ static int esd_audio_fd = -1;
+ /*******************************************************************/
+ /* returns audio_fd for use by main prog - platform dependent */
+
+-/* ALSA before OSS as ALSA is OSS compatible */
+-#if defined(DRIVER_ALSA_09)
+-#  include "audio_alsa09.c"
+-#elif defined(DRIVER_ALSA) || defined(DRIVER_NEWALSA)
+-#  include "audio_alsa.c"
+-#elif defined(DRIVER_OSS)
+-#  include "audio_oss.c"
+-#elif defined(DRIVER_AIX)
+-#  include "audio_aix.c"
+-#elif defined(DRIVER_IRIX)
+-#  include "audio_irix.c"
+-#elif defined(DRIVER_HPUX)
+-#  include "audio_hpux.c"
+-#elif defined(DRIVER_OSF)
+-#  include "audio_osf.c"
+-#elif defined(DRIVER_SOLARIS)
+-#  include "audio_solaris.c"
+-#elif defined(DRIVER_MKLINUX)
+-#  include "audio_mklinux.c"
+-#elif defined(DRIVER_DART)
+-#  include "audio_dart.c"
+-#elif defined(DRIVER_COREAUDIO)
+-#  include "audio_coreaudio.c"
+-#elif defined(DRIVER_ARTS)
+-#  include "audio_arts.c"
+-#else
+-#  include "audio_none.c"
+-#endif
++#include "audio_sun.c"
+
+ /*******************************************************************/
+ /* display available devices */
Index: patches/patch-clients_c
===================================================================
RCS file: patches/patch-clients_c
diff -N patches/patch-clients_c
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ patches/patch-clients_c 10 Mar 2008 20:53:14 -0000
@@ -0,0 +1,24 @@
+$OpenBSD$
+--- clients.c.orig Sun Mar  9 16:25:22 2008
++++ clients.c Sun Mar  9 16:28:43 2008
+@@ -141,9 +141,9 @@ int get_new_clients( int listen )
+     struct sockaddr_in incoming;
+ #if defined (ENABLE_IPV6)
+     struct sockaddr_in6 incoming6;
+-    size_t size_in6 = sizeof(struct sockaddr_in6);
++    socklen_t size_in6 = sizeof(struct sockaddr_in6);
+ #endif
+-    size_t size_in = sizeof(struct sockaddr_in);
++    socklen_t size_in = sizeof(struct sockaddr_in);
+     esd_client_t *new_client = NULL;
+    
+     unsigned long addr;
+@@ -186,7 +186,7 @@ int get_new_clients( int listen )
+    if (esd_use_tcpip)
+    {
+ struct request_info req;
+- struct servent *serv;
++ /* struct servent *serv; */
+
+ request_init( &req, RQ_DAEMON, "esound", RQ_FILE, fd, NULL );
+ fromhost( &req );
Index: patches/patch-configure_ac
===================================================================
RCS file: patches/patch-configure_ac
diff -N patches/patch-configure_ac
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ patches/patch-configure_ac 10 Mar 2008 20:53:14 -0000
@@ -0,0 +1,46 @@
+$OpenBSD: patch-configure_ac,v 1.1 2007/06/26 17:10:29 martynas Exp $
+--- configure.ac.orig Thu May  3 13:47:30 2007
++++ configure.ac Sun Mar  9 20:03:26 2008
+@@ -301,21 +301,16 @@ if test "x$enable_local_sound" = "xyes"; then
+      if test "x$HAVE_ARTS" = "xyes"; then
+        found_sound=yes
+        CFLAGS="$CFLAGS $ARTSC_CFLAGS"
+-       LIBS="$LIBS $ARTS_LIBS"
++       LIBS="$LIBS $ARTS_LIBS -lstdc++"
+        AC_DEFINE(DRIVER_ARTS, 1, [Defined if Arts backend is enabled])
+      fi
+    fi
+
+-   if test "$found_sound" = "no"; then
+-      AC_MSG_ERROR([Could not find a support sound driver])
+-   fi
+-
+    dnl Check for additional audio libs needed
+
+    echo "---------------------------------------------------------------------"
+    echo "--- Checking to see which audio libraries are required for linking.";
+    echo "--- Most of these checks should also fail. Do not be alarmed.";
+-   AC_CHECK_FUNC(_oss_ioctl,,[AC_CHECK_LIB(ossaudio,_oss_ioctl)])
+    AC_CHECK_FUNC(ALnewconfig,,[AC_CHECK_LIB(audio,ALnewconfig)])
+    if test "x$enable_alsa" = "xyes"; then
+       AC_CHECK_FUNC(snd_cards,,[AC_CHECK_LIB(sound,snd_cards)])
+@@ -393,7 +388,8 @@ if test "x$with_libwrap" = "xyes"; then
+
+    wrap_ok=no
+    AC_TRY_LINK(
+-[#include <tcpd.h>
++[#include <stdio.h>
++#include <tcpd.h>
+ #include <syslog.h>
+ int allow_severity = LOG_INFO;
+ int deny_severity = LOG_WARNING;],
+@@ -403,7 +399,8 @@ int deny_severity = LOG_WARNING;],
+        wrap_ok=yes],
+       [LIBS="$LIBS -lnsl"
+        AC_TRY_LINK(
+-[#include <tcpd.h>
++[#include <stdio.h>
++#include <tcpd.h>
+ #include <syslog.h>
+ int allow_severity = LOG_INFO;
+ int deny_severity = LOG_WARNING;],
Index: patches/patch-configure_in
===================================================================
RCS file: patches/patch-configure_in
diff -N patches/patch-configure_in
--- patches/patch-configure_in 26 Jun 2004 04:38:33 -0000 1.4
+++ /dev/null 1 Jan 1970 00:00:00 -0000
@@ -1,50 +0,0 @@
---- configure.in.orig Tue Mar 16 07:20:39 2004
-+++ configure.in Thu Jun 24 20:07:12 2004
-@@ -205,6 +205,16 @@ if test "x$enable_local_sound" = "xyes";
-       esac
-    fi
-
-+   if test "${ac_cv_header_sys_audioio_h}" = "yes"; then
-+      case ${host_os} in
-+      openbsd* | netbsd*)
-+         found_sound=yes
-+         DRIVER_SUN=1
-+         AC_DEFINE(DRIVER_SUN)
-+         ;;
-+      esac
-+   fi
-+
-    case ${host_os} in
-    os2*)
-       found_sound=yes
-@@ -263,7 +273,9 @@ if test "x$enable_local_sound" = "xyes";
-    echo "---------------------------------------------------------------------"
-    echo "--- Checking to see which audio libraries are required for linking.";
-    echo "--- Most of these checks should also fail. Do not be alarmed.";
--   AC_CHECK_FUNC(_oss_ioctl,,[AC_CHECK_LIB(ossaudio,_oss_ioctl)])
-+   if test ! "$DRIVER_SUN"; then
-+     AC_CHECK_FUNC(_oss_ioctl,,[AC_CHECK_LIB(ossaudio,_oss_ioctl)])
-+   fi
-    AC_CHECK_FUNC(ALnewconfig,,[AC_CHECK_LIB(audio,ALnewconfig)])
-    if test "x$enable_alsa" = "xyes"; then
-       AC_CHECK_FUNC(snd_cards,,[AC_CHECK_LIB(sound,snd_cards)])
-@@ -382,7 +394,8 @@ if test "x$with_libwrap" = "xyes"; then
-
-    wrap_ok=no
-    AC_TRY_LINK(
--[#include <tcpd.h>
-+[#include <stdio.h>
-+#include <tcpd.h>
- #include <syslog.h>
- int allow_severity = LOG_INFO;
- int deny_severity = LOG_WARNING;],
-@@ -392,7 +405,8 @@ int deny_severity = LOG_WARNING;],
-        wrap_ok=yes],
-       [LIBS="$LIBS -lnsl"
-        AC_TRY_LINK(
--[#include <tcpd.h>
-+[#include <stdio.h>
-+#include <tcpd.h>
- #include <syslog.h>
- int allow_severity = LOG_INFO;
- int deny_severity = LOG_WARNING;],
Index: patches/patch-esd.c
===================================================================
RCS file: patches/patch-esd.c
diff -N patches/patch-esd.c
--- patches/patch-esd.c 26 Jun 2004 04:38:33 -0000 1.7
+++ /dev/null 1 Jan 1970 00:00:00 -0000
@@ -1,19 +0,0 @@
---- esd.c.orig Wed Jan 14 07:00:46 2004
-+++ esd.c Thu Jun 24 20:07:12 2004
-@@ -236,12 +236,12 @@ struct stat dir_stats;
-
- #if defined(S_ISVTX)
- #define ESD_UNIX_SOCKET_DIR_MODE (S_IRUSR|S_IWUSR|S_IXUSR|\
--  S_IRGRP|S_IWGRP|S_IXGRP|\
--  S_IROTH|S_IWOTH|S_IXOTH|S_ISVTX)
-+  S_IRGRP|S_IXGRP|\
-+  S_IROTH|S_IXOTH|S_ISVTX)
- #else
- #define ESD_UNIX_SOCKET_DIR_MODE (S_IRUSR|S_IWUSR|S_IXUSR|\
--  S_IRGRP|S_IWGRP|S_IXGRP|\
--  S_IROTH|S_IWOTH|S_IXOTH)
-+  S_IRGRP|S_IXGRP|\
-+  S_IROTH|S_IXOTH)
- #endif
-
-   if (mkdir(ESD_UNIX_SOCKET_DIR, ESD_UNIX_SOCKET_DIR_MODE) == 0) {
Index: patches/patch-esd_c
===================================================================
RCS file: patches/patch-esd_c
diff -N patches/patch-esd_c
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ patches/patch-esd_c 10 Mar 2008 20:53:14 -0000
@@ -0,0 +1,20 @@
+$OpenBSD: patch-esd_c,v 1.1 2007/06/26 17:10:29 martynas Exp $
+--- esd.c.orig Thu May  3 13:28:35 2007
++++ esd.c Sun Mar  9 21:54:55 2008
+@@ -274,12 +274,12 @@ struct stat dir_stats;
+
+ #if defined(S_ISVTX)
+ #define ESD_UNIX_SOCKET_DIR_MODE (S_IRUSR|S_IWUSR|S_IXUSR|\
+-  S_IRGRP|S_IWGRP|S_IXGRP|\
+-  S_IROTH|S_IWOTH|S_IXOTH|S_ISVTX)
++  S_IRGRP|S_IXGRP|\
++  S_IROTH|S_IXOTH|S_ISVTX)
+ #else
+ #define ESD_UNIX_SOCKET_DIR_MODE (S_IRUSR|S_IWUSR|S_IXUSR|\
+-  S_IRGRP|S_IWGRP|S_IXGRP|\
+-  S_IROTH|S_IWOTH|S_IXOTH)
++  S_IRGRP|S_IXGRP|\
++  S_IROTH|S_IXOTH)
+ #endif
+
+   if (mkdir(ESD_UNIX_SOCKET_DIR, ESD_UNIX_SOCKET_DIR_MODE) == 0) {
Index: patches/patch-esdlib_c
===================================================================
RCS file: patches/patch-esdlib_c
diff -N patches/patch-esdlib_c
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ patches/patch-esdlib_c 10 Mar 2008 20:53:14 -0000
@@ -0,0 +1,12 @@
+$OpenBSD$
+--- esdlib.c.orig Thu Apr 19 07:43:59 2007
++++ esdlib.c Sun Mar  9 23:39:06 2008
+@@ -769,7 +769,7 @@ int esd_open_sound( const char *host )
+
+ sprintf(cmd, "%s/esd %s -spawnfd %d", SERVERDIR, esd_spawn_options?esd_spawn_options:"", esd_pipe[1]);
+
+- execl("/bin/sh", "/bin/sh", "-c", cmd, NULL);
++ execl("/bin/sh", "/bin/sh", "-c", cmd, (char *)NULL);
+ perror("execl");
+ _exit(1);
+    } else
Index: patches/patch-test-script
===================================================================
RCS file: /home/cvs/OpenBSD/ports/audio/esound/patches/patch-test-script,v
retrieving revision 1.2
diff -u -r1.2 patch-test-script
--- patches/patch-test-script 5 Mar 2002 15:35:13 -0000 1.2
+++ patches/patch-test-script 10 Mar 2008 20:53:14 -0000
@@ -1,16 +1,18 @@
---- test-script.orig Wed Jul 15 04:26:14 1998
-+++ test-script Tue Mar  5 09:21:40 2002
+$OpenBSD: patch-test-script,v 1.3 2007/06/26 17:10:29 martynas Exp $
+--- test-script.orig Thu Apr 19 07:43:59 2007
++++ test-script Sun Mar  9 16:23:07 2008
 @@ -1,4 +1,4 @@
 -#!/bin/tcsh
 +#!/usr/local/bin/tcsh
  echo welcome to the test.
 
  echo ""
-@@ -40,7 +40,6 @@ echo $< >& /dev/null
+@@ -40,7 +40,7 @@ echo $< >& /dev/null
  esdmon > sample.raw &
  esdcat -b -m -r 11025 test.wav
  sleep 3
 -killall esdmon
++pkill esdmon
 
  echo press enter to continue...
  echo $< >& /dev/null
Index: patches/patch-util_c
===================================================================
RCS file: /home/cvs/OpenBSD/ports/audio/esound/patches/patch-util_c,v
retrieving revision 1.2
diff -u -r1.2 patch-util_c
--- patches/patch-util_c 26 Jun 2004 04:38:33 -0000 1.2
+++ patches/patch-util_c 10 Mar 2008 20:53:14 -0000
@@ -1,6 +1,6 @@
-$OpenBSD: patch-util_c,v 1.2 2004/06/26 04:38:33 brad Exp $
---- util.c.orig Mon Mar  1 12:06:58 2004
-+++ util.c Thu Jun 24 20:15:35 2004
+$OpenBSD: patch-util_c,v 1.3 2007/06/26 17:10:29 martynas Exp $
+--- util.c.orig Thu Apr 19 17:43:59 2007
++++ util.c Sat Jun  2 23:38:31 2007
 @@ -1,5 +1,8 @@
  #include "config.h"
  #include "esd.h"
@@ -10,11 +10,11 @@
  #include <sys/types.h>
  #include <sys/socket.h>
  #include <stdlib.h>
-@@ -23,38 +26,31 @@ have_ipv6() {
+@@ -23,38 +26,31 @@ have_ipv6(void) {
  const char*
  esd_get_socket_dirname (void)
  {
-- char *audiodev;
+- const char *audiodev;
 - static char *dirname = NULL;
 + static char *sockdir = NULL, sockdirbuf[PATH_MAX];
 + struct passwd *pw;
@@ -32,7 +32,7 @@
 - strcpy(dirname, "/tmp/.esd");
 - strcat(dirname, audiodev);
 + if (sockdir != NULL)
-+ return (sockdir);
++ return sockdir;
 + pw = getpwuid(getuid());
 + if (pw == NULL || pw->pw_dir == NULL) {
 + fprintf(stderr, "esd: could not find home directory\n");
@@ -43,7 +43,7 @@
 + snprintf(sockdirbuf, sizeof(sockdirbuf), "%s/.esd", pw->pw_dir);
 + endpwent();
 + sockdir = sockdirbuf;
-+ return (sockdir);
++ return sockdir;
  }
 
  const char*
@@ -62,9 +62,9 @@
 -
 - return name;
 + if (sockname != NULL)
-+ return (sockname);
++ return sockname;
 + snprintf(socknamebuf, sizeof(socknamebuf), "%s/socket",
 + esd_get_socket_dirname());
 + sockname = socknamebuf;
-+ return (sockname);
++ return sockname;
  }
Index: pkg/DESCR
===================================================================
RCS file: /home/cvs/OpenBSD/ports/audio/esound/pkg/DESCR,v
retrieving revision 1.4
diff -u -r1.4 DESCR
--- pkg/DESCR 15 Dec 2003 21:42:10 -0000 1.4
+++ pkg/DESCR 10 Mar 2008 20:53:14 -0000
@@ -1 +1,6 @@
-sound library for Enlightenment
+Esound is an audio mixing server that allows multiple applications
+to output sound to the same audio device.
+
+Esound is seriously lacking in features required for a modern desktop
+environment, particularly for multi-channel audio and audio/video
+synchronization.
Index: pkg/PLIST
===================================================================
RCS file: /home/cvs/OpenBSD/ports/audio/esound/pkg/PLIST,v
retrieving revision 1.15
diff -u -r1.15 PLIST
--- pkg/PLIST 5 Aug 2004 03:02:01 -0000 1.15
+++ pkg/PLIST 10 Mar 2008 20:53:14 -0000
@@ -1,4 +1,4 @@
-@comment $OpenBSD: PLIST,v 1.15 2004/08/05 03:02:01 espie Exp $
+@comment $OpenBSD: PLIST,v 1.16 2007/06/26 17:10:29 martynas Exp $
 bin/esd
 bin/esd-config
 bin/esdcat
@@ -18,7 +18,6 @@
 @man man/man1/esd.1
 @man man/man1/esdcat.1
 @man man/man1/esdctl.1
-@man man/man1/esddsp.1
 @man man/man1/esdfilt.1
 @man man/man1/esdloop.1
 @man man/man1/esdmon.1

Reply | Threaded
Open this post in threaded view
|

Re: esound 2.38 revisited

j4nKy
On Mon, Mar 10, 2008 at 09:02:16PM +0000, Jacob Meuser wrote:

> here's a new diff, with some improvements in the audio(4) interface,
> and an -arts FLAVOR.  yes, arts depends on esd, so you have to build
> a non-flavored esd, then arts, then -arts FLAVORed esd, and then
> install the FLAVORed esd with pkg_add -r -F installed esd-arts.  after
> all that, it has worked quite well in my testing.

that makes it possible to run esd as a client of artsd.

and, here's a patch to fix artsd as a client of esd.

in both cases, I suggest configuring artsd to use 2 buffers of 4096
bytes each.

--
[hidden email]
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.63
diff -u -r1.63 Makefile
--- Makefile 24 Oct 2007 21:52:16 -0000 1.63
+++ Makefile 10 Mar 2008 21:02:40 -0000
@@ -5,7 +5,7 @@
 VERSION= 3.5.8
 DISTNAME= arts-1.5.8
 MODKDE_VERSION?= 3.5.8
-PKGNAME= ${DISTNAME}
+PKGNAME= ${DISTNAME}p0
 
 SHARED_LIBS += mcop                 2.0      # .1.0
 SHARED_LIBS += artsflow_idl         2.0      # .1.0
Index: patches/patch-flow_audioioesd_cc
===================================================================
RCS file: patches/patch-flow_audioioesd_cc
diff -N patches/patch-flow_audioioesd_cc
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ patches/patch-flow_audioioesd_cc 10 Mar 2008 21:02:40 -0000
@@ -0,0 +1,16 @@
+$OpenBSD$
+--- flow/audioioesd.cc.orig Mon Oct  8 02:47:09 2007
++++ flow/audioioesd.cc Sun Mar  9 22:52:42 2008
+@@ -204,10 +204,10 @@ int AudioIOESD::getParam(AudioParam p)
+ return write_fd;
+
+ case canRead:
+- return ESD_BUF_SIZE;
++ return ESD_BUF_SIZE / 4;
+
+ case canWrite:
+- return ESD_BUF_SIZE;
++ return ESD_BUF_SIZE / 4;
+
+ // ESD handles are actually socket descriptors, and I know not
+ // of any portable way to peek at the socket's send or receive

Reply | Threaded
Open this post in threaded view
|

Re: esound 2.38 revisited

Vadim Zhukov
In reply to this post by j4nKy
11 March 2008 г. 00:02:16 Jacob Meuser wrote:

> On Fri, Jan 18, 2008 at 04:23:36PM -0500, Deanna Phillips wrote:
> > As you may recall, a long-overdue update to esound was backed
> > out at the last minute before the 4.2 release.  The thread is
> > here:
> >
> > http://marc.info/?l=openbsd-ports&m=118541595130336&w=2
> >
> > I've just tried the 2.38 update on auich(4) and can't reproduce
> > the problems we once had.
> >
> > 2.38 also fixes some bugs with socket creation and cleanup that
> > are causing micropolis to skip some sounds.  This bug can be
> > reproduced by throwing many files at esdplay at once with
> > something like 'for file in *.wav ; do esdplay $file& ; done',
> > or running the Firebomb scenario in Micropolis and watching
> > stderr.
> >
> > esd should be able to mix those sounds (that's what it's for),
> > but with the version in tree it gets very confused and skips
> > some, fails to open the audio device or resample, etc.
> >
> > So.  Here's Martynas's old diff pulled from cvs.
> >
> > Anyone want to try again?
>
> here's a new diff, with some improvements in the audio(4) interface,
> and an -arts FLAVOR.  yes, arts depends on esd, so you have to build
> a non-flavored esd, then arts, then -arts FLAVORed esd, and then
> install the FLAVORed esd with pkg_add -r -F installed esd-arts.  after
> all that, it has worked quite well in my testing.

Wow! But... What port version did you made diff from?

<snip>
|Index: Makefile
|===================================================================
|RCS file: /home/cvs/OpenBSD/ports/audio/esound/Makefile,v
|retrieving revision 1.39
|diff -u -r1.39 Makefile
|--- Makefile   28 Oct 2006 10:30:41 -0000      1.39
|+++ Makefile   10 Mar 2008 20:53:14 -0000
--------------------------
Patching file Makefile using Plan A...
Hunk #1 failed at 1.
Hunk #2 succeeded at 19.
1 out of 2 hunks failed--saving rejects to Makefile.rej
</snip>
<snip>
|Index: patches/patch-configure_in
|===================================================================
|RCS file: patches/patch-configure_in
|diff -N patches/patch-configure_in
|--- patches/patch-configure_in 26 Jun 2004 04:38:33 -0000      1.4
|+++ /dev/null  1 Jan 1970 00:00:00 -0000
--------------------------
Patching file patches/patch-configure_in using Plan A...
Empty context always matches.
Hunk #1 failed at 0.
1 out of 1 hunks failed--saving rejects to patches/patch-configure_in.rej
</snip>

And even when those conflicts get resolved, "make patch" do not pass
due to conflicts... As far as I recall, patch-config_h_in should be
deleted?

Nevermind, I:
1. built esd-0.2.38-arts (previous esd version was installed before)
2. built arts-3.5.8p0
3. installed arts-3.5.8p0 (while running KDE, he-he; "Sound system" was
disabled, of course, during update)
4. installed esd-0.2.38-arts
5. tested it (results below)

After hunting bugs (all of them were in my head), I finally get it
working. Yay! xine apps lagging at start of playing almost gone (it's
more my system problem, and I do not bother either), and artsd now
consumes less CPU resources! aRts plays good at defaults, and ESD plays
good now too, even without "-r 48000" in esd.conf. No crashes yet.

--
  Best wishes,
    Vadim Zhukov

Reply | Threaded
Open this post in threaded view
|

Re: esound 2.38 revisited

j4nKy
On Tue, Mar 11, 2008 at 02:22:52AM +0300, Vadim Jukov wrote:

> Wow! But... What port version did you made diff from?

oops.  try this instead.

--
[hidden email]
SDF Public Access UNIX System - http://sdf.lonestar.org

Index: Makefile
===================================================================
RCS file: /home/cvs/OpenBSD/ports/audio/esound/Makefile,v
retrieving revision 1.43
diff -u -r1.43 Makefile
--- Makefile 5 Oct 2007 14:14:14 -0000 1.43
+++ Makefile 10 Mar 2008 23:57:45 -0000
@@ -3,9 +3,9 @@
 
 COMMENT= sound library for Enlightenment
 
-DISTNAME= esound-0.2.34
-PKGNAME= ${DISTNAME}p1v0
-SHARED_LIBS += esd                  2.39     # .2.34
+DISTNAME= esound-0.2.38
+PKGNAME= ${DISTNAME}
+SHARED_LIBS += esd                  2.40     # .2.38
 CATEGORIES= audio
 MASTER_SITES= ${MASTER_SITE_GNOME:=sources/esound/0.2/}
 
@@ -20,16 +20,37 @@
 PERMIT_DISTFILES_FTP= Yes
 WANTLIB= c m wrap
 
+FLAVORS= arts
+FLAVOR?=
+
 USE_LIBTOOL= Yes
 SEPARATE_BUILD= concurrent
-AUTOCONF_VERSION=2.13
+AUTOCONF_VERSION=2.61
 CONFIGURE_STYLE= autoconf
-CONFIGURE_ARGS+= ${CONFIGURE_SHARED}
-CONFIGURE_ARGS+= --with-libwrap
+CONFIGURE_ARGS+= ${CONFIGURE_SHARED} \
+ --disable-alsa \
+ --disable-oss \
+ --with-libwrap
 # broken, relies upon v4-mapped addresses
 CONFIGURE_ARGS+= --disable-ipv6
 
+.if ${FLAVOR:L:Marts}
+CONFIGURE_ARGS+=--enable-arts
+MODULES+= devel/gettext
+LIB_DEPENDS+= artsc::x11/kde/arts3
+WANTLIB+= glib-2.0 gthread-2.0 gmodule-2.0 pcre pthread stdc++
+.else
+CONFIGURE_ARGS+=--disable-arts
+.endif
+
+FAKE_FLAGS= DESTDIR=${WRKINST} \
+ esdconfdir=${PREFIX}/share/examples/esound
+
 post-extract:
  @cp -f ${FILESDIR}/audio_sun.c ${WRKSRC}
+
+pre-configure:
+ @perl -pi -e 's|_LOCALBASE_|${LOCALBASE}|' \
+ ${WRKSRC}/test-script
 
 .include <bsd.port.mk>
Index: distinfo
===================================================================
RCS file: /home/cvs/OpenBSD/ports/audio/esound/distinfo,v
retrieving revision 1.8
diff -u -r1.8 distinfo
--- distinfo 11 Aug 2007 17:29:36 -0000 1.8
+++ distinfo 10 Mar 2008 23:57:45 -0000
@@ -1,5 +1,5 @@
-MD5 (esound-0.2.34.tar.gz) = lSbU/7u9lGJ2izjAgscmxw==
-RMD160 (esound-0.2.34.tar.gz) = +/rAann7gX+e9h14CJRfe6h8ARA=
-SHA1 (esound-0.2.34.tar.gz) = T6H7MhIZl/6edQe/WvKWpkvAoiA=
-SHA256 (esound-0.2.34.tar.gz) = ass7wF3kshz9cpH93R9XwooxyHLuYGowp4ktAkLdznU=
-SIZE (esound-0.2.34.tar.gz) = 392336
+MD5 (esound-0.2.38.tar.gz) = d8TpgFoBf7oGVSSH3zxmYg==
+RMD160 (esound-0.2.38.tar.gz) = OwL3H38UZcIECjzwETbzHWJnfmE=
+SHA1 (esound-0.2.38.tar.gz) = QFQ9y1sVcsdwKwuwt1aEQEY1G6U=
+SHA256 (esound-0.2.38.tar.gz) = SKOU83d2M2JmBnlKUpTwHilOERTWzD54lMapDyImsGc=
+SIZE (esound-0.2.38.tar.gz) = 519964
Index: files/audio_sun.c
===================================================================
RCS file: /home/cvs/OpenBSD/ports/audio/esound/files/audio_sun.c,v
retrieving revision 1.3
diff -u -r1.3 audio_sun.c
--- files/audio_sun.c 25 Jan 2004 22:07:28 -0000 1.3
+++ files/audio_sun.c 10 Mar 2008 23:57:45 -0000
@@ -27,7 +27,10 @@
 
 #include "config.h"
 
+#include <sys/types.h>
+#include <sys/ioctl.h>
 #include <sys/audioio.h>
+#include <string.h>
 
 static void sun_panic(int fd, char *s)
 {
@@ -48,9 +51,8 @@
 {
     const char *device;
     int afd = -1;
-    int fmt = 0, channels = 0;
+    int fmt = 0, channels = 0, bits = 0;
     int mode = O_WRONLY;
-    audio_encoding_t enc;
     audio_info_t info;
 
     AUDIO_INITINFO(&info);
@@ -58,13 +60,11 @@
     /* set the appropriate mode */
     if((esd_audio_format & ESD_MASK_FUNC) == ESD_RECORD) {
         mode = O_RDWR;
- info.mode = AUMODE_PLAY | AUMODE_RECORD;
+ info.mode = AUMODE_PLAY | AUMODE_PLAY_ALL | AUMODE_RECORD;
     } else {
- info.mode = AUMODE_PLAY;
+ info.mode = AUMODE_PLAY | AUMODE_PLAY_ALL;
     }
 
-    mode |= O_NONBLOCK;
-
     /* open the sound device */
     device = esd_audio_device ? esd_audio_device : "/dev/audio";
     if ((afd = open(device, mode, 0)) == -1) {
@@ -72,10 +72,6 @@
         return( -2 );
     }
 
-    mode = fcntl(afd, F_GETFL);
-    mode &= ~O_NONBLOCK;
-    fcntl(afd, F_SETFL, mode);
-
     /* set the requested mode */
     if(ioctl(afd, AUDIO_SETINFO, &info) < 0) {
  sun_panic(afd, "AUDIO_SETINFO");
@@ -91,22 +87,24 @@
     }
 
     /* pick a supported encoding */
-    
-#if defined(WORDS_BIGENDIAN)
-    fmt = ( (esd_audio_format & ESD_MASK_BITS) == ESD_BITS16 )
-        ? /* 16 bit */  AUDIO_ENCODING_SLINEAR_BE
- : /* 8 bit */ AUDIO_ENCODING_PCM8;
-#else
-    fmt = ( (esd_audio_format & ESD_MASK_BITS) == ESD_BITS16 )
-        ? /* 16 bit */ AUDIO_ENCODING_SLINEAR_LE
- : /* 8 bit */ AUDIO_ENCODING_PCM8;
-#endif
-
-    enc.index = 0;
-    while(!ioctl(afd, AUDIO_GETENC, &enc) && enc.encoding != fmt) {
- enc.index++;
+    if ((esd_audio_format & ESD_MASK_BITS) == ESD_BITS16) {
+        bits = 16;
+        fmt = (BYTE_ORDER == 4321) ?
+          AUDIO_ENCODING_SLINEAR_BE : AUDIO_ENCODING_SLINEAR_LE;
+    } else {
+        bits = 8;
+        fmt = (BYTE_ORDER == 4321) ?
+          AUDIO_ENCODING_ULINEAR_BE : AUDIO_ENCODING_ULINEAR_LE;
+    }
+    info.play.encoding = fmt;
+    info.play.precision = bits;
+    if(ioctl(afd, AUDIO_SETINFO, &info) == -1) {
+ fprintf(stderr, "Unsupported encoding: %i-bit (0x%x)\n",
+    bits, fmt);
+ sun_panic(afd, "SETINFO");
+ return(-1);
     }
-    
+
     /* number of channels */
     channels = (((esd_audio_format & ESD_MASK_CHAN) == ESD_STEREO)
         ? /* stereo */ 2
@@ -116,13 +114,19 @@
     if((esd_audio_format & ESD_MASK_FUNC) == ESD_RECORD) {
  info.record.channels = channels;
     }
-
-    info.play.encoding = fmt;
-    info.play.precision = enc.precision;
-
     if(ioctl(afd, AUDIO_SETINFO, &info) == -1) {
- fprintf(stderr, "Unsupported encoding: %i-bit \"%s\" (0x%x)\n",
-    enc.precision, enc.name, fmt);
+ fprintf(stderr, "Unsupported channel count: %d\n",
+    channels);
+ sun_panic(afd, "SETINFO");
+ return(-1);
+    }
+
+    /* blocksize, sync to internal esd buffer size */
+    info.blocksize = ESD_BUF_SIZE;
+    info.hiwat = 4;
+    if(ioctl(afd, AUDIO_SETINFO, &info) < 0) {
+ fprintf(stderr, "Unsupported blocksize: %d\n",
+    info.blocksize);
  sun_panic(afd, "SETINFO");
  return(-1);
     }
Index: patches/patch-Makefile.in
===================================================================
RCS file: patches/patch-Makefile.in
diff -N patches/patch-Makefile.in
--- patches/patch-Makefile.in 11 Aug 2007 17:29:36 -0000 1.8
+++ /dev/null 1 Jan 1970 00:00:00 -0000
@@ -1,11 +0,0 @@
---- Makefile.in.orig Tue Mar 16 07:26:18 2004
-+++ Makefile.in Thu Jun 24 20:07:12 2004
-@@ -180,7 +180,7 @@ esd_LDADD = $(WRAP_LIB) $(LDADD)
- m4datadir = $(datadir)/aclocal
- m4data_DATA = esd.m4
-
--esdconfdir = $(sysconfdir)
-+esdconfdir = $(datadir)/examples/esound
- esdconf_DATA = esd.conf
-
- pkgconfigdir = $(libdir)/pkgconfig
Index: patches/patch-acconfig_h
===================================================================
RCS file: patches/patch-acconfig_h
diff -N patches/patch-acconfig_h
--- patches/patch-acconfig_h 11 Aug 2007 17:29:36 -0000 1.5
+++ /dev/null 1 Jan 1970 00:00:00 -0000
@@ -1,10 +0,0 @@
---- acconfig.h.orig Thu Jan 15 05:49:09 2004
-+++ acconfig.h Thu Jun 24 20:09:24 2004
-@@ -11,6 +11,7 @@
- #undef DRIVER_ALSA_09_NEW_PCM_API
- #undef DRIVER_DART
- #undef DRIVER_COREAUDIO
-+#undef DRIVER_SUN
- #undef DRIVER_NONE
- #undef HAVE_INET_ATON
- #undef HAVE_INET_PTON
Index: patches/patch-audio_arts_c
===================================================================
RCS file: patches/patch-audio_arts_c
diff -N patches/patch-audio_arts_c
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ patches/patch-audio_arts_c 10 Mar 2008 23:57:45 -0000
@@ -0,0 +1,89 @@
+$OpenBSD$
+--- audio_arts.c.orig Thu Apr 19 07:43:59 2007
++++ audio_arts.c Sun Mar  9 22:03:23 2008
+@@ -19,6 +19,7 @@
+  *
+  */
+
++#if 0
+ #include <dlfcn.h>
+
+ enum arts_parameter_t_enum { ARTS_P_BUFFER_TIME = 2 };
+@@ -37,14 +38,17 @@ static int (*arts_stream_set)(arts_stream_t sst, arts_
+
+ static arts_stream_t (*arts_play_stream)(int rrate, int bbits, int cch, const char *nn);
+ static arts_stream_t (*arts_record_stream)(int rrate, int bbits, int cch, const char *nn);
++#endif
+
++#include <artsc/artsc.h>
++
+ static arts_stream_t stream;
+ static int err_arts = -1;
+ static int arts_exit = 1;
+
+ static int arts()
+ {
+-
++#if 0
+     handle = dlopen ("libartsc.so", RTLD_LAZY);
+
+     if (!handle) {
+@@ -61,12 +65,13 @@ static int arts()
+     arts_record_stream = dlsym(handle, "arts_record_stream");
+     arts_close_stream = dlsym(handle, "arts_close_stream");
+     arts_stream_set = dlsym(handle, "arts_stream_set");
++#endif
+
+     err_arts = arts_init();
+
+     if (err_arts < 0) {
+ arts_exit = 0;
+-        dlclose(handle);
++        // dlclose(handle);
+         return err_arts;
+     }
+    
+@@ -83,6 +88,8 @@ int arts_esd_audio_open()
+     int channels;
+     int bits;
+
++    err_arts = arts_init();
++
+     channels = ( ( ( esd_audio_format & ESD_MASK_CHAN) == ESD_STEREO )
+         ? /* stereo */ 2 : /* mono */ 1 );
+     bits = ( (esd_audio_format & ESD_MASK_BITS) == ESD_BITS16 )
+@@ -105,7 +112,7 @@ void arts_esd_audio_close()
+     arts_close_stream(stream);
+     arts_exit = 0;
+     arts_free();
+-    dlclose(handle);
++    // dlclose(handle);
+     return;
+ }
+
+@@ -131,11 +138,13 @@ void arts_esd_audio_flush()
+
+ static void impl_exit()
+ {
++#if 0
+     if ((arts_exit > 0) && (handle)) {
+ if (err_arts >= 0)
+    arts_free();
+ dlclose(handle);
+     }
++#endif
+ }
+
+ void artschk()
+@@ -148,6 +157,10 @@ void artschk()
+ impl_esd_audio_flush = arts_esd_audio_flush;
+ impl_esd_audio_write = arts_esd_audio_write;
+ impl_esd_audio_read = arts_esd_audio_read;
++ /* close connection.  esd carelessly close()s 0-128, which will likely
++   include our connection and leave us messed up.  open it again when
++   ready to send data. */
++ arts_free();
+     }
+-    atexit(impl_exit);
++    // atexit(impl_exit);
+ }
Index: patches/patch-audio_c
===================================================================
RCS file: /home/cvs/OpenBSD/ports/audio/esound/patches/patch-audio_c,v
retrieving revision 1.4
diff -u -r1.4 patch-audio_c
--- patches/patch-audio_c 11 Aug 2007 17:29:36 -0000 1.4
+++ patches/patch-audio_c 10 Mar 2008 23:57:45 -0000
@@ -1,11 +1,39 @@
---- audio.c.orig Tue Jun  4 10:40:44 2002
-+++ audio.c Fri Jul 19 18:32:52 2002
-@@ -25,6 +25,8 @@ static int esd_audio_fd = -1;
- #  include "audio_alsa.c"
- #elif defined(DRIVER_ALSA_09)
- #include "audio_alsa09.c"
-+#elif defined(DRIVER_SUN)
-+#  include "audio_sun.c"
- #elif defined(DRIVER_OSS)
- #  include "audio_oss.c"
- #elif defined(DRIVER_AIX)
+$OpenBSD: patch-audio_c,v 1.3 2007/06/26 17:10:29 martynas Exp $
+--- audio.c.orig Thu Apr 19 17:43:59 2007
++++ audio.c Sat Jun  2 23:15:49 2007
+@@ -20,34 +20,7 @@ static int esd_audio_fd = -1;
+ /*******************************************************************/
+ /* returns audio_fd for use by main prog - platform dependent */
+
+-/* ALSA before OSS as ALSA is OSS compatible */
+-#if defined(DRIVER_ALSA_09)
+-#  include "audio_alsa09.c"
+-#elif defined(DRIVER_ALSA) || defined(DRIVER_NEWALSA)
+-#  include "audio_alsa.c"
+-#elif defined(DRIVER_OSS)
+-#  include "audio_oss.c"
+-#elif defined(DRIVER_AIX)
+-#  include "audio_aix.c"
+-#elif defined(DRIVER_IRIX)
+-#  include "audio_irix.c"
+-#elif defined(DRIVER_HPUX)
+-#  include "audio_hpux.c"
+-#elif defined(DRIVER_OSF)
+-#  include "audio_osf.c"
+-#elif defined(DRIVER_SOLARIS)
+-#  include "audio_solaris.c"
+-#elif defined(DRIVER_MKLINUX)
+-#  include "audio_mklinux.c"
+-#elif defined(DRIVER_DART)
+-#  include "audio_dart.c"
+-#elif defined(DRIVER_COREAUDIO)
+-#  include "audio_coreaudio.c"
+-#elif defined(DRIVER_ARTS)
+-#  include "audio_arts.c"
+-#else
+-#  include "audio_none.c"
+-#endif
++#include "audio_sun.c"
+
+ /*******************************************************************/
+ /* display available devices */
Index: patches/patch-clients_c
===================================================================
RCS file: patches/patch-clients_c
diff -N patches/patch-clients_c
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ patches/patch-clients_c 10 Mar 2008 23:57:45 -0000
@@ -0,0 +1,24 @@
+$OpenBSD$
+--- clients.c.orig Sun Mar  9 16:25:22 2008
++++ clients.c Sun Mar  9 16:28:43 2008
+@@ -141,9 +141,9 @@ int get_new_clients( int listen )
+     struct sockaddr_in incoming;
+ #if defined (ENABLE_IPV6)
+     struct sockaddr_in6 incoming6;
+-    size_t size_in6 = sizeof(struct sockaddr_in6);
++    socklen_t size_in6 = sizeof(struct sockaddr_in6);
+ #endif
+-    size_t size_in = sizeof(struct sockaddr_in);
++    socklen_t size_in = sizeof(struct sockaddr_in);
+     esd_client_t *new_client = NULL;
+    
+     unsigned long addr;
+@@ -186,7 +186,7 @@ int get_new_clients( int listen )
+    if (esd_use_tcpip)
+    {
+ struct request_info req;
+- struct servent *serv;
++ /* struct servent *serv; */
+
+ request_init( &req, RQ_DAEMON, "esound", RQ_FILE, fd, NULL );
+ fromhost( &req );
Index: patches/patch-config_h_in
===================================================================
RCS file: patches/patch-config_h_in
diff -N patches/patch-config_h_in
--- patches/patch-config_h_in 11 Aug 2007 17:29:36 -0000 1.6
+++ /dev/null 1 Jan 1970 00:00:00 -0000
@@ -1,10 +0,0 @@
---- config.h.in.orig Tue Mar 16 07:25:33 2004
-+++ config.h.in Thu Jun 24 20:10:12 2004
-@@ -45,6 +45,7 @@
- #undef DRIVER_ALSA_09_NEW_PCM_API
- #undef DRIVER_DART
- #undef DRIVER_COREAUDIO
-+#undef DRIVER_SUN
- #undef DRIVER_NONE
- #undef HAVE_INET_ATON
- #undef HAVE_INET_PTON
Index: patches/patch-configure_ac
===================================================================
RCS file: patches/patch-configure_ac
diff -N patches/patch-configure_ac
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ patches/patch-configure_ac 10 Mar 2008 23:57:45 -0000
@@ -0,0 +1,46 @@
+$OpenBSD: patch-configure_ac,v 1.1 2007/06/26 17:10:29 martynas Exp $
+--- configure.ac.orig Thu May  3 13:47:30 2007
++++ configure.ac Sun Mar  9 20:03:26 2008
+@@ -301,21 +301,16 @@ if test "x$enable_local_sound" = "xyes"; then
+      if test "x$HAVE_ARTS" = "xyes"; then
+        found_sound=yes
+        CFLAGS="$CFLAGS $ARTSC_CFLAGS"
+-       LIBS="$LIBS $ARTS_LIBS"
++       LIBS="$LIBS $ARTS_LIBS -lstdc++"
+        AC_DEFINE(DRIVER_ARTS, 1, [Defined if Arts backend is enabled])
+      fi
+    fi
+
+-   if test "$found_sound" = "no"; then
+-      AC_MSG_ERROR([Could not find a support sound driver])
+-   fi
+-
+    dnl Check for additional audio libs needed
+
+    echo "---------------------------------------------------------------------"
+    echo "--- Checking to see which audio libraries are required for linking.";
+    echo "--- Most of these checks should also fail. Do not be alarmed.";
+-   AC_CHECK_FUNC(_oss_ioctl,,[AC_CHECK_LIB(ossaudio,_oss_ioctl)])
+    AC_CHECK_FUNC(ALnewconfig,,[AC_CHECK_LIB(audio,ALnewconfig)])
+    if test "x$enable_alsa" = "xyes"; then
+       AC_CHECK_FUNC(snd_cards,,[AC_CHECK_LIB(sound,snd_cards)])
+@@ -393,7 +388,8 @@ if test "x$with_libwrap" = "xyes"; then
+
+    wrap_ok=no
+    AC_TRY_LINK(
+-[#include <tcpd.h>
++[#include <stdio.h>
++#include <tcpd.h>
+ #include <syslog.h>
+ int allow_severity = LOG_INFO;
+ int deny_severity = LOG_WARNING;],
+@@ -403,7 +399,8 @@ int deny_severity = LOG_WARNING;],
+        wrap_ok=yes],
+       [LIBS="$LIBS -lnsl"
+        AC_TRY_LINK(
+-[#include <tcpd.h>
++[#include <stdio.h>
++#include <tcpd.h>
+ #include <syslog.h>
+ int allow_severity = LOG_INFO;
+ int deny_severity = LOG_WARNING;],
Index: patches/patch-configure_in
===================================================================
RCS file: patches/patch-configure_in
diff -N patches/patch-configure_in
--- patches/patch-configure_in 11 Aug 2007 17:29:36 -0000 1.6
+++ /dev/null 1 Jan 1970 00:00:00 -0000
@@ -1,50 +0,0 @@
---- configure.in.orig Tue Mar 16 16:20:39 2004
-+++ configure.in Thu Aug  9 17:02:45 2007
-@@ -205,6 +205,16 @@ if test "x$enable_local_sound" = "xyes"; then
-       esac
-    fi
-
-+   if test "${ac_cv_header_sys_audioio_h}" = "yes"; then
-+      case ${host_os} in
-+      openbsd* | netbsd*)
-+         found_sound=yes
-+         DRIVER_SUN=1
-+         AC_DEFINE(DRIVER_SUN)
-+         ;;
-+      esac
-+   fi
-+
-    case ${host_os} in
-    os2*)
-       found_sound=yes
-@@ -263,7 +273,9 @@ if test "x$enable_local_sound" = "xyes"; then
-    echo "---------------------------------------------------------------------"
-    echo "--- Checking to see which audio libraries are required for linking.";
-    echo "--- Most of these checks should also fail. Do not be alarmed.";
--   AC_CHECK_FUNC(_oss_ioctl,,[AC_CHECK_LIB(ossaudio,_oss_ioctl)])
-+   if test ! "$DRIVER_SUN"; then
-+     AC_CHECK_FUNC(_oss_ioctl,,[AC_CHECK_LIB(ossaudio,_oss_ioctl)])
-+   fi
-    AC_CHECK_FUNC(ALnewconfig,,[AC_CHECK_LIB(audio,ALnewconfig)])
-    if test "x$enable_alsa" = "xyes"; then
-       AC_CHECK_FUNC(snd_cards,,[AC_CHECK_LIB(sound,snd_cards)])
-@@ -382,7 +394,8 @@ if test "x$with_libwrap" = "xyes"; then
-
-    wrap_ok=no
-    AC_TRY_LINK(
--[#include <tcpd.h>
-+[#include <stdio.h>
-+#include <tcpd.h>
- #include <syslog.h>
- int allow_severity = LOG_INFO;
- int deny_severity = LOG_WARNING;],
-@@ -392,7 +405,8 @@ int deny_severity = LOG_WARNING;],
-        wrap_ok=yes],
-       [LIBS="$LIBS -lnsl"
-        AC_TRY_LINK(
--[#include <tcpd.h>
-+[#include <stdio.h>
-+#include <tcpd.h>
- #include <syslog.h>
- int allow_severity = LOG_INFO;
- int deny_severity = LOG_WARNING;],
Index: patches/patch-esd.c
===================================================================
RCS file: patches/patch-esd.c
diff -N patches/patch-esd.c
--- patches/patch-esd.c 11 Aug 2007 17:29:36 -0000 1.9
+++ /dev/null 1 Jan 1970 00:00:00 -0000
@@ -1,19 +0,0 @@
---- esd.c.orig Wed Jan 14 07:00:46 2004
-+++ esd.c Thu Jun 24 20:07:12 2004
-@@ -236,12 +236,12 @@ struct stat dir_stats;
-
- #if defined(S_ISVTX)
- #define ESD_UNIX_SOCKET_DIR_MODE (S_IRUSR|S_IWUSR|S_IXUSR|\
--  S_IRGRP|S_IWGRP|S_IXGRP|\
--  S_IROTH|S_IWOTH|S_IXOTH|S_ISVTX)
-+  S_IRGRP|S_IXGRP|\
-+  S_IROTH|S_IXOTH|S_ISVTX)
- #else
- #define ESD_UNIX_SOCKET_DIR_MODE (S_IRUSR|S_IWUSR|S_IXUSR|\
--  S_IRGRP|S_IWGRP|S_IXGRP|\
--  S_IROTH|S_IWOTH|S_IXOTH)
-+  S_IRGRP|S_IXGRP|\
-+  S_IROTH|S_IXOTH)
- #endif
-
-   if (mkdir(ESD_UNIX_SOCKET_DIR, ESD_UNIX_SOCKET_DIR_MODE) == 0) {
Index: patches/patch-esd_c
===================================================================
RCS file: patches/patch-esd_c
diff -N patches/patch-esd_c
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ patches/patch-esd_c 10 Mar 2008 23:57:45 -0000
@@ -0,0 +1,20 @@
+$OpenBSD: patch-esd_c,v 1.1 2007/06/26 17:10:29 martynas Exp $
+--- esd.c.orig Thu May  3 13:28:35 2007
++++ esd.c Sun Mar  9 21:54:55 2008
+@@ -274,12 +274,12 @@ struct stat dir_stats;
+
+ #if defined(S_ISVTX)
+ #define ESD_UNIX_SOCKET_DIR_MODE (S_IRUSR|S_IWUSR|S_IXUSR|\
+-  S_IRGRP|S_IWGRP|S_IXGRP|\
+-  S_IROTH|S_IWOTH|S_IXOTH|S_ISVTX)
++  S_IRGRP|S_IXGRP|\
++  S_IROTH|S_IXOTH|S_ISVTX)
+ #else
+ #define ESD_UNIX_SOCKET_DIR_MODE (S_IRUSR|S_IWUSR|S_IXUSR|\
+-  S_IRGRP|S_IWGRP|S_IXGRP|\
+-  S_IROTH|S_IWOTH|S_IXOTH)
++  S_IRGRP|S_IXGRP|\
++  S_IROTH|S_IXOTH)
+ #endif
+
+   if (mkdir(ESD_UNIX_SOCKET_DIR, ESD_UNIX_SOCKET_DIR_MODE) == 0) {
Index: patches/patch-esdlib_c
===================================================================
RCS file: patches/patch-esdlib_c
diff -N patches/patch-esdlib_c
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ patches/patch-esdlib_c 10 Mar 2008 23:57:45 -0000
@@ -0,0 +1,12 @@
+$OpenBSD$
+--- esdlib.c.orig Thu Apr 19 07:43:59 2007
++++ esdlib.c Sun Mar  9 23:39:06 2008
+@@ -769,7 +769,7 @@ int esd_open_sound( const char *host )
+
+ sprintf(cmd, "%s/esd %s -spawnfd %d", SERVERDIR, esd_spawn_options?esd_spawn_options:"", esd_pipe[1]);
+
+- execl("/bin/sh", "/bin/sh", "-c", cmd, NULL);
++ execl("/bin/sh", "/bin/sh", "-c", cmd, (char *)NULL);
+ perror("execl");
+ _exit(1);
+    } else
Index: patches/patch-test-script
===================================================================
RCS file: /home/cvs/OpenBSD/ports/audio/esound/patches/patch-test-script,v
retrieving revision 1.4
diff -u -r1.4 patch-test-script
--- patches/patch-test-script 11 Aug 2007 17:29:36 -0000 1.4
+++ patches/patch-test-script 10 Mar 2008 23:57:45 -0000
@@ -1,16 +1,18 @@
---- test-script.orig Wed Jul 15 04:26:14 1998
-+++ test-script Tue Mar  5 09:21:40 2002
+$OpenBSD: patch-test-script,v 1.3 2007/06/26 17:10:29 martynas Exp $
+--- test-script.orig Thu Apr 19 07:43:59 2007
++++ test-script Sun Mar  9 16:23:07 2008
 @@ -1,4 +1,4 @@
 -#!/bin/tcsh
 +#!/usr/local/bin/tcsh
  echo welcome to the test.
 
  echo ""
-@@ -40,7 +40,6 @@ echo $< >& /dev/null
+@@ -40,7 +40,7 @@ echo $< >& /dev/null
  esdmon > sample.raw &
  esdcat -b -m -r 11025 test.wav
  sleep 3
 -killall esdmon
++pkill esdmon
 
  echo press enter to continue...
  echo $< >& /dev/null
Index: patches/patch-util_c
===================================================================
RCS file: /home/cvs/OpenBSD/ports/audio/esound/patches/patch-util_c,v
retrieving revision 1.4
diff -u -r1.4 patch-util_c
--- patches/patch-util_c 11 Aug 2007 17:29:36 -0000 1.4
+++ patches/patch-util_c 10 Mar 2008 23:57:45 -0000
@@ -1,6 +1,6 @@
-$OpenBSD: patch-util_c,v 1.4 2007/08/11 17:29:36 martynas Exp $
---- util.c.orig Mon Mar  1 12:06:58 2004
-+++ util.c Thu Jun 24 20:15:35 2004
+$OpenBSD: patch-util_c,v 1.3 2007/06/26 17:10:29 martynas Exp $
+--- util.c.orig Thu Apr 19 17:43:59 2007
++++ util.c Sat Jun  2 23:38:31 2007
 @@ -1,5 +1,8 @@
  #include "config.h"
  #include "esd.h"
@@ -10,11 +10,11 @@
  #include <sys/types.h>
  #include <sys/socket.h>
  #include <stdlib.h>
-@@ -23,38 +26,31 @@ have_ipv6() {
+@@ -23,38 +26,31 @@ have_ipv6(void) {
  const char*
  esd_get_socket_dirname (void)
  {
-- char *audiodev;
+- const char *audiodev;
 - static char *dirname = NULL;
 + static char *sockdir = NULL, sockdirbuf[PATH_MAX];
 + struct passwd *pw;
@@ -32,7 +32,7 @@
 - strcpy(dirname, "/tmp/.esd");
 - strcat(dirname, audiodev);
 + if (sockdir != NULL)
-+ return (sockdir);
++ return sockdir;
 + pw = getpwuid(getuid());
 + if (pw == NULL || pw->pw_dir == NULL) {
 + fprintf(stderr, "esd: could not find home directory\n");
@@ -43,7 +43,7 @@
 + snprintf(sockdirbuf, sizeof(sockdirbuf), "%s/.esd", pw->pw_dir);
 + endpwent();
 + sockdir = sockdirbuf;
-+ return (sockdir);
++ return sockdir;
  }
 
  const char*
@@ -62,9 +62,9 @@
 -
 - return name;
 + if (sockname != NULL)
-+ return (sockname);
++ return sockname;
 + snprintf(socknamebuf, sizeof(socknamebuf), "%s/socket",
 + esd_get_socket_dirname());
 + sockname = socknamebuf;
-+ return (sockname);
++ return sockname;
  }
Index: pkg/DESCR
===================================================================
RCS file: /home/cvs/OpenBSD/ports/audio/esound/pkg/DESCR,v
retrieving revision 1.6
diff -u -r1.6 DESCR
--- pkg/DESCR 11 Aug 2007 17:29:36 -0000 1.6
+++ pkg/DESCR 10 Mar 2008 23:57:45 -0000
@@ -1 +1,9 @@
-sound library for Enlightenment
+Esound is an audio mixing server that allows multiple applications
+to output sound to the same audio device.
+
+Esound is seriously lacking in features required for a modern desktop
+environment, particularly for multi-channel audio and audio/video
+synchronization.
+
+FLAVORS:
+    arts: esd will run as a client of artsd if artsd is running
Index: pkg/PLIST
===================================================================
RCS file: /home/cvs/OpenBSD/ports/audio/esound/pkg/PLIST,v
retrieving revision 1.17
diff -u -r1.17 PLIST
--- pkg/PLIST 11 Aug 2007 17:29:36 -0000 1.17
+++ pkg/PLIST 10 Mar 2008 23:57:45 -0000
@@ -1,4 +1,4 @@
-@comment $OpenBSD: PLIST,v 1.17 2007/08/11 17:29:36 martynas Exp $
+@comment $OpenBSD: PLIST,v 1.16 2007/06/26 17:10:29 martynas Exp $
 bin/esd
 bin/esd-config
 bin/esdcat
@@ -18,7 +18,6 @@
 @man man/man1/esd.1
 @man man/man1/esdcat.1
 @man man/man1/esdctl.1
-@man man/man1/esddsp.1
 @man man/man1/esdfilt.1
 @man man/man1/esdloop.1
 @man man/man1/esdmon.1

Reply | Threaded
Open this post in threaded view
|

Re: esound 2.38 revisited

Vadim Zhukov
11 March 2008 г. 03:05:13 Jacob Meuser wrote:
> On Tue, Mar 11, 2008 at 02:22:52AM +0300, Vadim Jukov wrote:
> > Wow! But... What port version did you made diff from?
>
> oops.  try this instead.

Applied fully OK now.

Some sort of strange results appear. I added "***" comments to a pure
terminal grab. All significant pauses (>3s) mentioned (and a few seconds
on play needed to distingush "fast" and "normal" output).

No "-r 48000" in esd.conf, aRts at defaults (not even restarted). aRts
frees OSS device on 10 seconds of inactivity. /etc/esd.conf:

<snip>
[esd]
auto_spawn=1
#spawn_options=-r 48000 -d arts -terminate -nobeeps -as 2 -unix
spawn_options=-d arts -terminate -nobeeps -as 2 -unix
spawn_wait_ms=100
</snip>

Now tests themself:

<snip>
 -\ The\ Rivers\ Of\ Belief.wav                                                                          <
- using device arts
- using device arts
^C*** PLAYED FAST ***
03:29 Pers@gnoma:/usr/ports/audio/esound$ pgrep -lf arts
26800 /usr/local/bin/esd -d arts -terminate -nobeeps -as 2 -unix -spawnfd 7
17073 artsd -F 20 -S 4096 -a oss -s 10 -m artsmessage -c drkonqi -l 3 -f
03:29 Pers@gnoma:/usr/ports/audio/esound$
03:29 Pers@gnoma:/usr/ports/audio/esound$ esdplay /home/Pers/Music/11\ -\ The\ Rivers\ Of\ Belief.wav
^C*** PLAYED OK ***
03:29 Pers@gnoma:/usr/ports/audio/esound$ esdplay /home/Pers/Music/11\ -\ The\ Rivers\ Of\ Belief.wav
/dev/audio: Device busy
- using device arts
- using device arts*** FAILED TO PLAY ***
03:29 Pers@gnoma:/usr/ports/audio/esound$ esdplay /home/Pers/Music/11\ -\ The\ Rivers\ Of\ Belief.wav
^C*** PLAYED OK ***
03:29 Pers@gnoma:/usr/ports/audio/esound$ esdplay /home/Pers/Music/11\ -\ The\ Rivers\ Of\ Belief.wav
/dev/audio: Device busy
03:29 Pers@gnoma:/usr/ports/audio/esound$ - using device arts
- using device arts
*** FAILED TO PLAY ***
03:29 Pers@gnoma:/usr/ports/audio/esound$
03:29 Pers@gnoma:/usr/ports/audio/esound$
03:29 Pers@gnoma:/usr/ports/audio/esound$
03:29 Pers@gnoma:/usr/ports/audio/esound$ esdplay /home/Pers/Music/11\ -\ The\ Rivers\ Of\ Belief.wav
^C*** PLAYED OK, PAUSE ***
03:34 Pers@gnoma:/usr/ports/audio/esound$ esdplay /home/Pers/Music/11\ -\ The\ Rivers\ Of\ Belief.wav
- using device arts
- using device arts
^C*** PLAYED FAST, PAUSE ***
03:36 Pers@gnoma:/usr/ports/audio/esound$ esdplay /home/Pers/Music/11\ -\ The\ Rivers\ Of\ Belief.wav
^C*** PLAYED OK, PAUSE ~30s ***
03:36 Pers@gnoma:/usr/ports/audio/esound$ esdplay /home/Pers/Music/11\ -\ The\ Rivers\ Of\ Belief.wav
- using device arts
- using device arts
^C*** PLAYED FAST, PAUSE ~30s ***
03:37 Pers@gnoma:/usr/ports/audio/esound$ esdplay /home/Pers/Music/11\ -\ The\ Rivers\ Of\ Belief.wav
^C*** PLAYED OK ***
03:39 Pers@gnoma:/usr/ports/audio/esound$ esdplay /home/Pers/Music/11\ -\ The\ Rivers\ Of\ Belief.wav
- using device arts
- using device arts
^C*** PLAYED FAST ***
</snip>

I.e., ESD behaves unpredictable. I tried after that adding "-r 48000"
in /etc/esd.conf with no luck. Ask for more statistics if you need it,
I'll test anything as much as I can.

--
  Best wishes,
    Vadim Zhukov

Reply | Threaded
Open this post in threaded view
|

Re: esound 2.38 revisited

j4nKy
On Tue, Mar 11, 2008 at 03:47:51AM +0300, Vadim Jukov wrote:

> 11 March 2008 ?. 03:05:13 Jacob Meuser wrote:
> > On Tue, Mar 11, 2008 at 02:22:52AM +0300, Vadim Jukov wrote:
> > > Wow! But... What port version did you made diff from?
> >
> > oops.  try this instead.
>
> Applied fully OK now.
>
> Some sort of strange results appear. I added "***" comments to a pure
> terminal grab. All significant pauses (>3s) mentioned (and a few seconds
> on play needed to distingush "fast" and "normal" output).
>
> No "-r 48000" in esd.conf, aRts at defaults (not even restarted). aRts
> frees OSS device on 10 seconds of inactivity. /etc/esd.conf:
>
> <snip>
> [esd]
> auto_spawn=1
> #spawn_options=-r 48000 -d arts -terminate -nobeeps -as 2 -unix
> spawn_options=-d arts -terminate -nobeeps -as 2 -unix
> spawn_wait_ms=100
> </snip>

yeah, this won't work.

a) you need to tell artsd to use at least 2 (best to use 2, 4, or 8)
buffers of at least 4096 bytes each.  artsd uses 1024 byte buffers by
default.  it's probably best to use 4096 bytes buffers in general,
and increase number of buffers if you experience dropouts.

b) autospawn is busted in the newer esound.  there's a comment along
the lines of "I think this in an Inherently Bad Idea but I'll leave
it alone for now" where the autospawn code starts.

c) even if autospawn worked, it's probably best not to use it in
combination with other sound servers.  don't use -terminate or -as
either.  I have a script that starts/stops both esd and artsd for
when I need to use /dev/audio with something else.

d) you don't need/want '-d arts' for esd.  esd will use artsd if and
only if artsd is running, regardless of -d.

--
[hidden email]
SDF Public Access UNIX System - http://sdf.lonestar.org

Reply | Threaded
Open this post in threaded view
|

Re: esound 2.38 revisited

Vadim Zhukov
11 March 2008 г. 04:13:02 Jacob Meuser wrote:

> On Tue, Mar 11, 2008 at 03:47:51AM +0300, Vadim Jukov wrote:
> > Applied fully OK now.
> >
> > Some sort of strange results appear. I added "***" comments to a
> > pure terminal grab. All significant pauses (>3s) mentioned (and a
> > few seconds on play needed to distingush "fast" and "normal"
> > output).
> >
> > No "-r 48000" in esd.conf, aRts at defaults (not even restarted).
> > aRts frees OSS device on 10 seconds of inactivity. /etc/esd.conf:
> >
> > <snip>
> > [esd]
> > auto_spawn=1
> > #spawn_options=-r 48000 -d arts -terminate -nobeeps -as 2 -unix
> > spawn_options=-d arts -terminate -nobeeps -as 2 -unix
> > spawn_wait_ms=100
> > </snip>
>
> yeah, this won't work.
>
> a) you need to tell artsd to use at least 2 (best to use 2, 4, or 8)
> buffers of at least 4096 bytes each.  artsd uses 1024 byte buffers by
> default.  it's probably best to use 4096 bytes buffers in general,
> and increase number of buffers if you experience dropouts.

0. I changed ESD config first, as you tell below, leaving
only "spawn_options=-nobeeps -unix" options line. Now esdplay goes wrong
only first time after ESD start. All consequenced calls plays
at "normal" speed.

1. 4096 bytes x 10 buffers is default in aRts.

2. Only after your words I realized that I used not defaults, but
4096x21 (maximum you can set through aRts cofiguration window).

3. I tried  4 of 4096 bytes buffers, no changes. "Maximum" setting in
aRts configuration window sets "-F 128 -S 8192", it didn't work either.
And aRts defaults (4096x10) didn't change anything.

4. If I "chain" esdplay(1) calls, second and consequent plays "normal"
and together - but only after first esdplay(1) ("fast") ends.

Of course, this is not a big problem. :)

> b) autospawn is busted in the newer esound.  there's a comment along
> the lines of "I think this in an Inherently Bad Idea but I'll leave
> it alone for now" where the autospawn code starts.

BTW, if ESD ever had good documentation, I (and others) did not bother
you with so stupid questions... Poor, poor imperfect world :)

> c) even if autospawn worked, it's probably best not to use it in
> combination with other sound servers.  don't use -terminate or -as
> either.

(see "0." above)

> I have a script that starts/stops both esd and artsd for
> when I need to use /dev/audio with something else.

Well, as far as I understand, aRts frees "real" device on inactivity, so
it shouldn't bother for ESD now (thanks again! :) ).

> d) you don't need/want '-d arts' for esd.  esd will use artsd if and
> only if artsd is running, regardless of -d.

OK, thank you for info.

... Maybe information you give is useful to be put in FAQ? I can try to
do diffs for this.

--
  Best wishes,
    Vadim Zhukov

Reply | Threaded
Open this post in threaded view
|

Re: esound 2.38 revisited

Mikolaj Kucharski-3
In reply to this post by j4nKy
On Tue, Mar 11, 2008 at 12:05:13AM +0000, Jacob Meuser wrote:
> On Tue, Mar 11, 2008 at 02:22:52AM +0300, Vadim Jukov wrote:
>
> > Wow! But... What port version did you made diff from?
>
> oops.  try this instead.
...
> -PKGNAME= ${DISTNAME}p1v0
...
> +PKGNAME= ${DISTNAME}

Can we remove the ``v'' suffix when it was once added?

--
best regards
q#

Reply | Threaded
Open this post in threaded view
|

Re: esound 2.38 revisited

Simon Bertrang
On Tue, Mar 11, 2008 at 11:57:52AM +0000, Mikolaj Kucharski wrote:

> On Tue, Mar 11, 2008 at 12:05:13AM +0000, Jacob Meuser wrote:
> > On Tue, Mar 11, 2008 at 02:22:52AM +0300, Vadim Jukov wrote:
> >
> > > Wow! But... What port version did you made diff from?
> >
> > oops.  try this instead.
> ...
> > -PKGNAME= ${DISTNAME}p1v0
> ...
> > +PKGNAME= ${DISTNAME}
>
> Can we remove the ``v'' suffix when it was once added?
>

No, otherwise the version would actually go backwards.

If a package needs to go back to an older version than available, ``v''
takes precedene over version and patchlevel.  It can never go back.

For instance, the p5-DBD-SQLite package went from 1.12 -> 1.13 -> 1.12v0
and the following update to 1.14 had to be 1.14v0.

Kind regards,
Simon

Reply | Threaded
Open this post in threaded view
|

Re: esound 2.38 revisited

j4nKy
On Tue, Mar 11, 2008 at 02:47:04PM +0100, Simon Bertrang wrote:

> On Tue, Mar 11, 2008 at 11:57:52AM +0000, Mikolaj Kucharski wrote:
> > On Tue, Mar 11, 2008 at 12:05:13AM +0000, Jacob Meuser wrote:
> > > On Tue, Mar 11, 2008 at 02:22:52AM +0300, Vadim Jukov wrote:
> > >
> > > > Wow! But... What port version did you made diff from?
> > >
> > > oops.  try this instead.
> > ...
> > > -PKGNAME= ${DISTNAME}p1v0
> > ...
> > > +PKGNAME= ${DISTNAME}
> >
> > Can we remove the ``v'' suffix when it was once added?
> >
>
> No, otherwise the version would actually go backwards.
>
> If a package needs to go back to an older version than available, ``v''
> takes precedene over version and patchlevel.  It can never go back.
>
> For instance, the p5-DBD-SQLite package went from 1.12 -> 1.13 -> 1.12v0
> and the following update to 1.14 had to be 1.14v0.

so, for the rest of the life of these ports, we will always have to tack
on v0?

seems (much) less than ideal.

--
[hidden email]
SDF Public Access UNIX System - http://sdf.lonestar.org

Reply | Threaded
Open this post in threaded view
|

Re: esound 2.38 revisited

Brad Smith-14
On Tuesday 11 March 2008 16:57:20 Jacob Meuser wrote:

> On Tue, Mar 11, 2008 at 02:47:04PM +0100, Simon Bertrang wrote:
> > On Tue, Mar 11, 2008 at 11:57:52AM +0000, Mikolaj Kucharski wrote:
> > > On Tue, Mar 11, 2008 at 12:05:13AM +0000, Jacob Meuser wrote:
> > > > On Tue, Mar 11, 2008 at 02:22:52AM +0300, Vadim Jukov wrote:
> > > >
> > > > > Wow! But... What port version did you made diff from?
> > > >
> > > > oops.  try this instead.
> > > ...
> > > > -PKGNAME= ${DISTNAME}p1v0
> > > ...
> > > > +PKGNAME= ${DISTNAME}
> > >
> > > Can we remove the ``v'' suffix when it was once added?
> > >
> >
> > No, otherwise the version would actually go backwards.
> >
> > If a package needs to go back to an older version than available, ``v''
> > takes precedene over version and patchlevel.  It can never go back.
> >
> > For instance, the p5-DBD-SQLite package went from 1.12 -> 1.13 -> 1.12v0
> > and the following update to 1.14 had to be 1.14v0.
>
> so, for the rest of the life of these ports, we will always have to tack
> on v0?
>
> seems (much) less than ideal.

That makes no sense at all. It should be 1.12 -> 1.13 -> 1.12v0 -> 1.14.

--
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.

Reply | Threaded
Open this post in threaded view
|

Re: esound 2.38 revisited

Marc Espie-2
On Tue, Mar 11, 2008 at 05:11:04PM -0400, Brad wrote:
> On Tuesday 11 March 2008 16:57:20 Jacob Meuser wrote:

> > so, for the rest of the life of these ports, we will always have to tack
> > on v0?
> >
> > seems (much) less than ideal.
>
> That makes no sense at all. It should be 1.12 -> 1.13 -> 1.12v0 -> 1.14.

There is no way around it.

You cannot have sensible rules that will work that way.

Instead of suggesting version numbers, try figuring out a scheme that works,
and lets you order softare sensibly. There is no other way.
v* is for when you have a break in the numbering. You cannot go back, ever.

It's simple, and it's not such a big deal.

Reply | Threaded
Open this post in threaded view
|

Re: esound 2.38 revisited

Stuart Henderson
In reply to this post by Brad Smith-14
On 2008/03/11 17:11, Brad wrote:
> > so, for the rest of the life of these ports, we will always have to tack
> > on v0?
> >
> > seems (much) less than ideal.
>
> That makes no sense at all. It should be 1.12 -> 1.13 -> 1.12v0 -> 1.14.

How can that work? v# is used to override any higher version number. So it
could equally be 1.12 -> 1.14 -> 1.12v0, or even 1.12 -> 2.0 -> 1.12v0.

Reply | Threaded
Open this post in threaded view
|

Re: esound 2.38 revisited

Markus Lude-3
In reply to this post by Brad Smith-14
On Tue, Mar 11, 2008 at 05:11:04PM -0400, Brad wrote:

> On Tuesday 11 March 2008 16:57:20 Jacob Meuser wrote:
> > On Tue, Mar 11, 2008 at 02:47:04PM +0100, Simon Bertrang wrote:
> > > On Tue, Mar 11, 2008 at 11:57:52AM +0000, Mikolaj Kucharski wrote:
> > > > On Tue, Mar 11, 2008 at 12:05:13AM +0000, Jacob Meuser wrote:
> > > > > On Tue, Mar 11, 2008 at 02:22:52AM +0300, Vadim Jukov wrote:
> > > > >
> > > > > > Wow! But... What port version did you made diff from?
> > > > >
> > > > > oops.  try this instead.
> > > > ...
> > > > > -PKGNAME= ${DISTNAME}p1v0
> > > > ...
> > > > > +PKGNAME= ${DISTNAME}
> > > >
> > > > Can we remove the ``v'' suffix when it was once added?
> > > >
> > >
> > > No, otherwise the version would actually go backwards.
> > >
> > > If a package needs to go back to an older version than available, ``v''
> > > takes precedene over version and patchlevel.  It can never go back.
> > >
> > > For instance, the p5-DBD-SQLite package went from 1.12 -> 1.13 -> 1.12v0
> > > and the following update to 1.14 had to be 1.14v0.
> >
> > so, for the rest of the life of these ports, we will always have to tack
> > on v0?
> >
> > seems (much) less than ideal.
>
> That makes no sense at all. It should be 1.12 -> 1.13 -> 1.12v0 -> 1.14.
 
How do you make a difference then if it was 1.12 -> 1.13 -> 1.14 ->
1.12v0 -> 1.15?

Regards,
Markus

Reply | Threaded
Open this post in threaded view
|

Re: esound 2.38 revisited

j4nKy
In reply to this post by Marc Espie-2
On Tue, Mar 11, 2008 at 10:23:55PM +0100, Marc Espie wrote:

> On Tue, Mar 11, 2008 at 05:11:04PM -0400, Brad wrote:
> > On Tuesday 11 March 2008 16:57:20 Jacob Meuser wrote:
>
> > > so, for the rest of the life of these ports, we will always have to tack
> > > on v0?
> > >
> > > seems (much) less than ideal.
> >
> > That makes no sense at all. It should be 1.12 -> 1.13 -> 1.12v0 -> 1.14.
>
> There is no way around it.
>
> You cannot have sensible rules that will work that way.
>
> Instead of suggesting version numbers, try figuring out a scheme that works,
> and lets you order softare sensibly. There is no other way.
>
> v* is for when you have a break in the numbering. You cannot go back, ever.
>
> It's simple, and it's not such a big deal.

so is p, but I _hate_ it when I change a port locally and up the p level,
and then pkg_add -u downgrades that package.

there's gotta be room for improvement.

--
[hidden email]
SDF Public Access UNIX System - http://sdf.lonestar.org

Reply | Threaded
Open this post in threaded view
|

Re: esound 2.38 revisited

Brad Smith-14
On Tuesday 11 March 2008 17:53:50 Jacob Meuser wrote:

> On Tue, Mar 11, 2008 at 10:23:55PM +0100, Marc Espie wrote:
> > On Tue, Mar 11, 2008 at 05:11:04PM -0400, Brad wrote:
> > > On Tuesday 11 March 2008 16:57:20 Jacob Meuser wrote:
> >
> > > > so, for the rest of the life of these ports, we will always have to tack
> > > > on v0?
> > > >
> > > > seems (much) less than ideal.
> > >
> > > That makes no sense at all. It should be 1.12 -> 1.13 -> 1.12v0 -> 1.14.
> >
> > There is no way around it.
> >
> > You cannot have sensible rules that will work that way.
> >
> > Instead of suggesting version numbers, try figuring out a scheme that works,
> > and lets you order softare sensibly. There is no other way.
> >
> > v* is for when you have a break in the numbering. You cannot go back, ever.
> >
> > It's simple, and it's not such a big deal.
>
> so is p, but I _hate_ it when I change a port locally and up the p level,
> and then pkg_add -u downgrades that package.
>
> there's gotta be room for improvement.

ugh. that drives me crazy as well.

--
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.

Reply | Threaded
Open this post in threaded view
|

Re: esound 2.38 revisited

Marc Espie-2
In reply to this post by j4nKy
On Tue, Mar 11, 2008 at 09:53:50PM +0000, Jacob Meuser wrote:
> so is p, but I _hate_ it when I change a port locally and up the p level,
> and then pkg_add -u downgrades that package.
>
> there's gotta be room for improvement.

Of course. Be patient.

12