Patches based on Maurice Nonneke's work, to handle arts' audio subsystem

better.
This commit is contained in:
espie 2000-11-27 20:41:58 +00:00
parent 330a571a97
commit 665e4d3e23
7 changed files with 123 additions and 12 deletions

View File

@ -1,5 +1,5 @@
--- admin/ltconfig.orig Thu Aug 10 23:58:04 2000
+++ admin/ltconfig Fri Sep 29 15:26:38 2000
--- admin/ltconfig.orig Fri Sep 22 13:10:22 2000
+++ admin/ltconfig Sun Nov 26 16:53:02 2000
@@ -620,6 +620,12 @@ old_archive_cmds='$AR $AR_FLAGS $oldlib$
old_postinstall_cmds='chmod 644 $oldlib'
old_postuninstall_cmds=
@ -13,7 +13,7 @@
# Source the script associated with the $tagname tag configuration.
if test -n "$tagname"; then
. $ltmain
@@ -1133,6 +1139,15 @@ openbsd*)
@@ -1135,6 +1141,15 @@ openbsd*)
need_lib_prefix=no
need_version=no
fi

View File

@ -0,0 +1,12 @@
$OpenBSD: patch-arts_flow_Makefile_in,v 1.1 2000/11/27 20:41:58 espie Exp $
--- arts/flow/Makefile.in.orig Sun Nov 26 17:03:48 2000
+++ arts/flow/Makefile.in Sun Nov 26 17:04:05 2000
@@ -230,7 +230,7 @@ lib_LTLIBRARIES = libartsflow_idl.la lib
libartsflow_idl_la_SOURCES = artsflow.cc
libartsflow_idl_la_LDFLAGS = -no-undefined
-libartsflow_la_LIBADD = libartsflow_idl.la $(LIBAUDIOFILE) -lm
+libartsflow_la_LIBADD = libartsflow_idl.la $(LIBAUDIOFILE) @LIBOSSAUDIO@ -lm
libartsflow_la_LDFLAGS = -no-undefined
libartsflow_la_SOURCES = synth_play_impl.cc synthschedule.cc audiosubsys.cc pipebuffer.cc convert.cc synth_wave_sin_impl.cc synth_frequency_impl.cc synth_multi_add_impl.cc synth_add_impl.cc synth_mul_impl.cc synth_play_wav_impl.cc stdsynthmodule.cc cache.cc asyncschedule.cc bytestreamtoaudio_impl.cc stereovolumecontrol_impl.cc stereoeffectstack_impl.cc fft.c stereofftscope_impl.cc virtualports.cc bus.cc audiomanager_impl.cc synth_record_impl.cc resample.cc

View File

@ -0,0 +1,58 @@
$OpenBSD: patch-arts_flow_audiosubsys_cc,v 1.1 2000/11/27 20:41:59 espie Exp $
--- arts/flow/audiosubsys.cc.orig Sun Nov 26 16:53:50 2000
+++ arts/flow/audiosubsys.cc Sun Nov 26 16:57:02 2000
@@ -36,6 +36,10 @@
#ifdef HAVE_SYS_SOUNDCARD_H
#include <sys/soundcard.h>
#endif
+#ifdef HAVE_SOUNDCARD_H
+#include <soundcard.h>
+#define DEVICE_NAME "/dev/audio"
+#endif
#include <assert.h>
#include <errno.h>
@@ -48,7 +52,9 @@
#include "debug.h"
#include "audiosubsys.h"
+#ifndef DEVICE_NAME
#define DEVICE_NAME "/dev/dsp"
+#endif
using namespace std;
using namespace Arts;
@@ -204,7 +210,7 @@ bool AudioSubSystem::check()
int AudioSubSystem::open()
{
-#ifdef HAVE_SYS_SOUNDCARD_H
+#if defined(HAVE_SYS_SOUNDCARD_H) || defined(HAVE_SOUNDCARD_H)
int mode;
if(_fullDuplex)
@@ -376,6 +382,7 @@ int AudioSubSystem::open()
assert(fragment_buffer == 0);
fragment_buffer = new char[_fragmentSize];
+#ifndef HAVE_SOUNDCARD_H
/*
* Workaround for broken kernel drivers: usually filling up the audio
* buffer is _only_ required if _fullDuplex is true. However, there
@@ -390,6 +397,7 @@ int AudioSubSystem::open()
assert(len == _fragmentSize);
}
free(zbuffer);
+#endif
/*
* Triggering - the original aRts code did this for full duplex:
@@ -450,7 +458,7 @@ bool AudioSubSystem::running()
void AudioSubSystem::handleIO(int type)
{
-#ifdef HAVE_SYS_SOUNDCARD_H
+#if defined(HAVE_SYS_SOUNDCARD_H) || defined(HAVE_SOUNDCARD_H)
if(type & ioRead)
{
int len = ::read(audio_fd,fragment_buffer,_fragmentSize);

View File

@ -0,0 +1,13 @@
$OpenBSD: patch-config_h_in,v 1.1 2000/11/27 20:41:59 espie Exp $
--- config.h.in.orig Sun Nov 26 16:57:24 2000
+++ config.h.in Sun Nov 26 16:57:55 2000
@@ -242,6 +242,9 @@
/* Define if you have the <socketbits.h> header file. */
#undef HAVE_SOCKETBITS_H
+/* Define if you have the <soundcard.h> header file. */
+#undef HAVE_SOUNDCARD_H
+
/* Define if you have the <string.h> header file. */
#undef HAVE_STRING_H

View File

@ -0,0 +1,28 @@
$OpenBSD: patch-configure_in,v 1.1 2000/11/27 20:41:59 espie Exp $
--- configure.in.orig Sun Nov 26 16:58:29 2000
+++ configure.in Sun Nov 26 17:03:29 2000
@@ -40,7 +40,7 @@ dnl Checks for header files.
KDE_CHECK_STL
AC_HEADER_DIRENT
AC_HEADER_STDC
-AC_CHECK_HEADERS(sys/mman.h sys/time.h sys/cdefs.h fnmatch.h sysent.h strings.h sys/stat.h sys/select.h sys/socket.h linux/socket.h socketbits.h sigaction.h paths.h malloc.h monetary.h limits.h sys/mnttab.h mntent.h fstab.h sys/soundcard.h)
+AC_CHECK_HEADERS(sys/mman.h sys/time.h sys/cdefs.h fnmatch.h sysent.h strings.h sys/stat.h sys/select.h sys/socket.h linux/socket.h socketbits.h soundcard.h sigaction.h paths.h malloc.h monetary.h limits.h sys/mnttab.h mntent.h fstab.h sys/soundcard.h)
dnl Checks for libraries.
AC_BASE_PATH_KDE([don't test]) dnl kdelibs is a special case
@@ -48,6 +48,7 @@ AC_CREATE_KFSSTND(default)
AC_SUBST_KFSSTND
AC_CHECK_LIB(compat, main, [LIBCOMPAT="-lcompat"]) dnl for FreeBSD
AC_CHECK_LIB(util, main, [LIBUTIL="-lutil"]) dnl for FreeBSD
+AC_CHECK_LIB(ossaudio, _oss_ioctl, [LIBOSSAUDIO="-lossaudio"]) dnl for OpenBSD
dnl Image libraries
KDE_CREATE_LIBS_ALIASES
@@ -146,6 +147,7 @@ AC_SUBST(x_libraries)
AC_SUBST(LIBSOCKET)
AC_SUBST(LIBCOMPAT)
AC_SUBST(LIBUTIL)
+AC_SUBST(LIBOSSAUDIO)
AC_SUBST(LIBICE)
LIB_KDECORE='$(top_builddir)/kdecore/libkdecore.la'

View File

@ -1,6 +1,6 @@
--- kdesu/kdesu_stub.c.orig Tue Jul 25 17:21:49 2000
+++ kdesu/kdesu_stub.c Sat Sep 30 13:24:11 2000
@@ -278,9 +278,17 @@ int main()
--- kdesu/kdesu_stub.c.orig Tue Sep 12 11:14:17 2000
+++ kdesu/kdesu_stub.c Sun Nov 26 16:53:02 2000
@@ -276,9 +276,17 @@ int main()
xsetenv("DISPLAY", params[P_DISPLAY].value);
if (params[P_DISPLAY_AUTH].value[0])
{
@ -18,7 +18,7 @@
{
perror("kdesu_stub: fopen()");
exit(1);
@@ -288,7 +296,23 @@ int main()
@@ -286,7 +294,23 @@ int main()
fprintf(fout, "add %s %s\n", params[P_DISPLAY].value,
params[P_DISPLAY_AUTH].value);
fclose(fout);
@ -42,7 +42,7 @@
xsetenv("XAUTHORITY", xauthority);
sprintf(command, "xauth source %s >/dev/null 2>&1", fname);
if (system(command))
@@ -307,9 +331,17 @@ int main()
@@ -305,9 +329,17 @@ int main()
auth = xstrsep(params[P_ICE_AUTH].value);
if (host[0])
{
@ -60,7 +60,7 @@
{
perror("kdesu_stub: fopen()");
exit(1);
@@ -320,7 +352,23 @@ int main()
@@ -318,7 +350,23 @@ int main()
for (i=0; host[i]; i++)
fprintf(fout, "add DCOP \"\" %s %s\n", host[i], auth[i]);
fclose(fout);

View File

@ -1,6 +1,6 @@
--- kparts/part.cpp.orig Fri Sep 29 14:20:12 2000
+++ kparts/part.cpp Fri Sep 29 14:28:28 2000
@@ -447,7 +447,15 @@ bool ReadWritePart::saveAs( const KURL &
--- kparts/part.cpp.orig Wed Sep 27 19:46:32 2000
+++ kparts/part.cpp Sun Nov 26 16:53:02 2000
@@ -448,7 +448,15 @@ bool ReadWritePart::saveAs( const KURL &
// We haven't saved yet, or we did but locally - provide a temp file
if ( m_file.isEmpty() || !m_bTemp )
{