From 8eeb97454dd9a7df3d014ddc2e9e4608487b13a8 Mon Sep 17 00:00:00 2001 From: Oliver Lehmann Date: Thu, 17 Apr 2008 19:43:26 +0000 Subject: [PATCH] fix OSS song forwarding add OSS4 option bump PORTREVISION Submitted by: Jan Sebosik --- multimedia/audacious-plugins/Makefile | 11 +++++- .../files/patch-src-OSS-audio.c | 38 +++++++++++++++++++ .../files/patch-src-OSS4-audio.c | 38 +++++++++++++++++++ multimedia/audacious-plugins/pkg-plist | 1 + 4 files changed, 87 insertions(+), 1 deletion(-) create mode 100644 multimedia/audacious-plugins/files/patch-src-OSS-audio.c create mode 100644 multimedia/audacious-plugins/files/patch-src-OSS4-audio.c diff --git a/multimedia/audacious-plugins/Makefile b/multimedia/audacious-plugins/Makefile index a595432bc312..9c7c5dd65215 100644 --- a/multimedia/audacious-plugins/Makefile +++ b/multimedia/audacious-plugins/Makefile @@ -7,7 +7,7 @@ PORTNAME= audacious-plugins PORTVERSION= 1.5.0 -PORTREVISION= 2 +PORTREVISION= 3 CATEGORIES= multimedia audio MASTER_SITES= http://distfiles.atheme.org/ EXTRACT_SUFX= .tgz @@ -58,6 +58,7 @@ OPTIONS= DBUS "Enable dbus support" on \ ARTS "Enable arts output plugin" off \ SID "Enable sid input plugin" off \ OSS "Enable OSS output plugin" on \ + OSS4 "Enable OSS4 output plugin" off \ TIMIDITY "Enable timidity plugin" off \ CDAUDIO "Enable cdaudio-ng input plugin" on \ NEON "Enable neon support (experimental)" on \ @@ -263,6 +264,14 @@ PLIST_SUB+= OSSPLUGIN="@comment " CONFIGURE_ARGS+=--disable-oss .endif +.if !defined(WITHOUT_OSS4) +PLIST_SUB+= OSS4PLUGIN="" +CONFIGURE_ARGS+=--enable-oss4 +.else +PLIST_SUB+= OSS4PLUGIN="@comment " +CONFIGURE_ARGS+=--disable-oss4 +.endif + .if defined(WITH_SID) LIB_DEPENDS+= sidplay.1:${PORTSDIR}/audio/libsidplay PLIST_SUB+= SIDPLUGIN="" diff --git a/multimedia/audacious-plugins/files/patch-src-OSS-audio.c b/multimedia/audacious-plugins/files/patch-src-OSS-audio.c new file mode 100644 index 000000000000..622d29f2be93 --- /dev/null +++ b/multimedia/audacious-plugins/files/patch-src-OSS-audio.c @@ -0,0 +1,38 @@ +--- src/OSS/audio.c.original 2008-04-16 22:16:27.000000000 +0200 ++++ src/OSS/audio.c 2008-04-16 22:16:50.000000000 +0200 +@@ -497,7 +497,7 @@ + do_pause = FALSE; + paused = TRUE; + +- ioctl(fd, SNDCTL_DSP_SYNC, 0); ++ ioctl(fd, SNDCTL_DSP_RESET, 0); + } + else if (unpause && paused) { + unpause = FALSE; +@@ -514,7 +514,7 @@ + * the driver to get fucked up by a reset + */ + +- ioctl(fd, SNDCTL_DSP_SYNC, 0); ++ ioctl(fd, SNDCTL_DSP_RESET, 0); + close(fd); + fd = open(device_name, O_WRONLY); + oss_set_audio_params(); +@@ -527,7 +527,7 @@ + + } + +- ioctl(fd, SNDCTL_DSP_SYNC, 0); ++ ioctl(fd, SNDCTL_DSP_RESET, 0); + close(fd); + g_free(buffer); + return NULL; +@@ -540,7 +540,7 @@ + struct timeval tv; + fd_set set; + +- ioctl(fd, SNDCTL_DSP_SYNC, 0); ++ ioctl(fd, SNDCTL_DSP_RESET, 0); + frag = (NFRAGS << 16) | fragsize; + ioctl(fd, SNDCTL_DSP_SETFRAGMENT, &frag); + /* diff --git a/multimedia/audacious-plugins/files/patch-src-OSS4-audio.c b/multimedia/audacious-plugins/files/patch-src-OSS4-audio.c new file mode 100644 index 000000000000..0edf4dfda32d --- /dev/null +++ b/multimedia/audacious-plugins/files/patch-src-OSS4-audio.c @@ -0,0 +1,38 @@ +--- src/OSS4/audio.c.original 2008-04-16 22:12:24.000000000 +0200 ++++ src/OSS4/audio.c 2008-04-16 22:13:22.000000000 +0200 +@@ -555,7 +555,7 @@ + * soundcard, but not yet played. I don't + * think this is worth fixing. + */ +- ioctl(fd, SNDCTL_DSP_SYNC, 0); ++ ioctl(fd, SNDCTL_DSP_RESET, 0); + } + else if (unpause && paused) { + unpause = FALSE; +@@ -572,7 +572,7 @@ + * the driver to get fucked up by a reset + */ + +- ioctl(fd, SNDCTL_DSP_SYNC, 0); ++ ioctl(fd, SNDCTL_DSP_RESET, 0); + close(fd); + fd = open(device_name, O_WRONLY); + oss_set_audio_params(); +@@ -585,7 +585,7 @@ + + } + +- ioctl(fd, SNDCTL_DSP_SYNC, 0); ++ ioctl(fd, SNDCTL_DSP_RESET, 0); + oss_set_volume(start_vol_l, start_vol_r); + close(fd); + g_free(buffer); +@@ -599,7 +599,7 @@ + struct timeval tv; + fd_set set; + +- ioctl(fd, SNDCTL_DSP_SYNC, 0); ++ ioctl(fd, SNDCTL_DSP_RESET, 0); + frag = (NFRAGS << 16) | fragsize; + ioctl(fd, SNDCTL_DSP_SETFRAGMENT, &frag); + /* diff --git a/multimedia/audacious-plugins/pkg-plist b/multimedia/audacious-plugins/pkg-plist index 2d820c9497ce..a0ceef8f97d1 100644 --- a/multimedia/audacious-plugins/pkg-plist +++ b/multimedia/audacious-plugins/pkg-plist @@ -38,6 +38,7 @@ lib/audacious/Input/vtx.so %%WAVPACKPLUGIN%%lib/audacious/Input/wavpack.so %%WMAPLUGIN%%lib/audacious/Input/wma.so %%OSSPLUGIN%%lib/audacious/Output/OSS.so +%%OSS4PLUGIN%%lib/audacious/Output/OSS4.so %%ESDPLUGIN%%lib/audacious/Output/ESD.so %%ARTSPLUGIN%%lib/audacious/Output/arts.so lib/audacious/Output/filewriter.so