diff -crN ./esound/Makefile.am /users5/vivierl/sandboxes/gnome_202/src/./esound/Makefile.am *** ./esound/Makefile.am 2002-08-26 18:41:03.000000000 +0200 --- /users5/vivierl/sandboxes/gnome_202/src/./esound/Makefile.am 2003-02-13 14:14:03.000000000 +0100 *************** *** 49,55 **** audio_none.c \ audio_oss.c \ audio_mklinux.c \ ! audio_solaris.c libesddsp_la_LDFLAGS = -version-info $(ESD_VERSION_INFO) libesddsp_la_LIBADD = $(DL_LIB) -lm --- 49,56 ---- audio_none.c \ audio_oss.c \ audio_mklinux.c \ ! audio_solaris.c \ ! esdlibnas.c libesddsp_la_LDFLAGS = -version-info $(ESD_VERSION_INFO) libesddsp_la_LIBADD = $(DL_LIB) -lm diff -crN ./esound/acconfig.h /users5/vivierl/sandboxes/gnome_202/src/./esound/acconfig.h *** ./esound/acconfig.h 2002-08-26 18:41:22.000000000 +0200 --- /users5/vivierl/sandboxes/gnome_202/src/./esound/acconfig.h 2003-02-13 14:14:03.000000000 +0100 *************** *** 8,13 **** --- 8,14 ---- #undef DRIVER_ALSA #undef DRIVER_NEWALSA #undef DRIVER_ALSA_09 + #undef DRIVER_NAS #undef DRIVER_DART #undef DRIVER_NONE #undef HAVE_INET_ATON diff -crN ./esound/configure.in /users5/vivierl/sandboxes/gnome_202/src/./esound/configure.in *** ./esound/configure.in 2002-08-26 19:12:12.000000000 +0200 --- /users5/vivierl/sandboxes/gnome_202/src/./esound/configure.in 2003-02-13 14:14:03.000000000 +0100 *************** *** 48,53 **** --- 48,54 ---- AC_CHECK_FUNC(gethostbyname,,[AC_CHECK_LIB(nsl,gethostbyname)]) AC_CHECK_FUNC(nanosleep,,[ AC_CHECK_LIB(rt,nanosleep,,[AC_CHECK_LIB(posix4,nanosleep)])]) + AC_CHECK_FUNCS(nsleep) AC_CHECK_FUNCS(usleep) AC_CHECK_FUNC(inet_aton,,[AC_CHECK_LIB(resolv,inet_aton)]) AC_CHECK_FUNCS(strtok_r) *************** *** 88,93 **** --- 89,115 ---- AC_CHECK_HEADERS(sys/filio.h sys/ioctl.h) + dnl Need NAS to send sound to X/Terminal + + AC_ARG_ENABLE(nas,[ --enable-nas use Network Audio System if available (AIX ONLY) [default=no]], , enable_nas=no) + + case ${host_os} in + aix*) + if test "x$enable_nas" = "xyes"; then + AC_PATH_XTRA + SOUND_LIBS="$X_PRE_LIBS $X_LIBS -lXau $X_EXTRA_LIBS" + AC_CHECK_LIB(audio, AuOpenServer, , AC_MSG_ERROR([Could not find libaudio for NAS support]), $SOUND_LIBS) + AC_CHECK_HEADER(audio/audiolib.h, , AC_MSG_ERROR([Could not find header file for NAS support])) + AC_DEFINE(DRIVER_NAS) + fi + ;; + *) + if test "x$enable_nas" = "xyes"; then + AC_MSG_ERROR([Network Audio System is not supported on your system]) + fi + ;; + esac + dnl see if we want to enable insanely verbose debugging AC_ARG_ENABLE(debugging,[ --enable-debugging enable verbose diagnostic info [default=no]], , enable_debugging=no ) diff -crN ./esound/esd.c /users5/vivierl/sandboxes/gnome_202/src/./esound/esd.c *** ./esound/esd.c 2002-08-26 18:41:24.000000000 +0200 --- /users5/vivierl/sandboxes/gnome_202/src/./esound/esd.c 2003-02-13 14:14:03.000000000 +0100 *************** *** 8,14 **** #include #include ! #ifndef HAVE_NANOSLEEP #include #include #include --- 8,14 ---- #include #include ! #if defined(HAVE_NSLEEP) || defined(HAVE_NANOSLEEP) #include #include #include *************** *** 900,905 **** --- 900,914 ---- } if ( esd_on_standby ) { + #ifdef HAVE_NSLEEP + struct timestruc_t restrain; + restrain.tv_sec = 0; + /* funky math to make sure a long can hold it all, calulate in ms */ + restrain.tv_nsec = (long) esd_buf_size_samples * 1000L + / (long) esd_audio_rate / 4L; /* divide by two for stereo */ + restrain.tv_nsec *= 1000000L; /* convert to nanoseconds */ + nsleep( &restrain, NULL ); + #else #ifdef HAVE_NANOSLEEP struct timespec restrain; restrain.tv_sec = 0; *************** *** 917,922 **** --- 926,932 ---- restrain.tv_usec *= 1000L; /* convert to microseconds */ select( 0, 0, 0, 0, &restrain ); #endif + #endif } } /* while ( 1 ) */ diff -crN ./esound/esd.h /users5/vivierl/sandboxes/gnome_202/src/./esound/esd.h *** ./esound/esd.h 2002-08-26 18:41:24.000000000 +0200 --- /users5/vivierl/sandboxes/gnome_202/src/./esound/esd.h 2003-02-13 14:14:03.000000000 +0100 *************** *** 189,194 **** --- 189,195 ---- /* double again ... etc. */ int esd_get_latency(int esd); + ssize_t esd_write(int fd, const void* buf, size_t nbytes); /*******************************************************************/ /* esdmgr.c - functions to implement a "sound manager" for esd */ *************** *** 330,339 **** const char *esd_get_socket_dirname(); const char *esd_get_socket_name(); - #ifdef __cplusplus } #endif - #endif /* #ifndef ESD_H */ --- 331,338 ---- diff -crN ./esound/esdlib.c /users5/vivierl/sandboxes/gnome_202/src/./esound/esdlib.c *** ./esound/esdlib.c 2002-07-15 11:28:26.000000000 +0200 --- /users5/vivierl/sandboxes/gnome_202/src/./esound/esdlib.c 2003-02-13 14:14:03.000000000 +0100 *************** *** 1,4 **** - #include "config.h" #include "esd.h" #include "genrand.h" --- 1,3 ---- *************** *** 23,28 **** --- 22,31 ---- #include + #ifdef DRIVER_NAS + #include "esdlibnas.c" + #endif /* DRIVER_NAS */ + /*******************************************************************/ /* prototypes */ int esd_set_socket_buffers( int sock, int src_format, *************** *** 1421,1423 **** --- 1424,1431 ---- return close( esd ); } + + ssize_t esd_write (int __fd, const void *__buf, size_t __n) + { + return write(__fd, __buf, __n); + } diff -crN ./esound/esdlibnas.c /users5/vivierl/sandboxes/gnome_202/src/./esound/esdlibnas.c *** ./esound/esdlibnas.c 1970-01-01 01:00:00.000000000 +0100 --- /users5/vivierl/sandboxes/gnome_202/src/./esound/esdlibnas.c 2003-02-13 14:14:03.000000000 +0100 *************** *** 0 **** --- 1,1396 ---- + #include + #include + #include + + #include