diff options
author | Chris Gianelloni <wolf31o2@gentoo.org> | 2006-09-29 17:02:38 +0000 |
---|---|---|
committer | Chris Gianelloni <wolf31o2@gentoo.org> | 2006-09-29 17:02:38 +0000 |
commit | dd739067383674a55e14bc872fa4ac89427790de (patch) | |
tree | 1e0a7b4e4e9d9c16880f373a8006f0ea4de2a2c7 /media-libs/openal | |
parent | stable on ppc (Bug #142577) (diff) | |
download | gentoo-2-dd739067383674a55e14bc872fa4ac89427790de.tar.gz gentoo-2-dd739067383674a55e14bc872fa4ac89427790de.tar.bz2 gentoo-2-dd739067383674a55e14bc872fa4ac89427790de.zip |
Revision bump to add some patches from the openal-devel mailing list. Hopefully, these will resolve the few openal segfault bugs that are open, as well as improve the latency of openal on Gentoo.
(Portage version: 2.1.2_pre1-r4)
Diffstat (limited to 'media-libs/openal')
-rw-r--r-- | media-libs/openal/ChangeLog | 12 | ||||
-rw-r--r-- | media-libs/openal/files/0.0.8/000_all_alsa_backend_fix.patch | 13 | ||||
-rw-r--r-- | media-libs/openal/files/0.0.8/001_all_rtprio.patch | 110 | ||||
-rw-r--r-- | media-libs/openal/files/0.0.8/002_all_alc_context.patch | 17 | ||||
-rw-r--r-- | media-libs/openal/files/0.0.8/002_all_alsa_default.patch | 11 | ||||
-rw-r--r-- | media-libs/openal/files/digest-openal-0.0.8-r1 | 3 | ||||
-rw-r--r-- | media-libs/openal/openal-0.0.8-r1.ebuild | 59 |
7 files changed, 224 insertions, 1 deletions
diff --git a/media-libs/openal/ChangeLog b/media-libs/openal/ChangeLog index 7032fd607600..39b6429e1381 100644 --- a/media-libs/openal/ChangeLog +++ b/media-libs/openal/ChangeLog @@ -1,6 +1,16 @@ # ChangeLog for media-libs/openal # Copyright 2002-2006 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/media-libs/openal/ChangeLog,v 1.66 2006/09/04 06:55:46 kumba Exp $ +# $Header: /var/cvsroot/gentoo-x86/media-libs/openal/ChangeLog,v 1.67 2006/09/29 17:02:38 wolf31o2 Exp $ + +*openal-0.0.8-r1 (29 Sep 2006) + + 29 Sep 2006; Chris Gianelloni <wolf31o2@gentoo.org> + +files/0.0.8/000_all_alsa_backend_fix.patch, + +files/0.0.8/001_all_rtprio.patch, +files/0.0.8/002_all_alc_context.patch, + +files/0.0.8/002_all_alsa_default.patch, +openal-0.0.8-r1.ebuild: + Revision bump to add some patches from the openal-devel mailing list. + Hopefully, these will resolve the few openal segfault bugs that are open, as + well as improve the latency of openal on Gentoo. 04 Sep 2006; Joshua Kinard <kumba@gentoo.org> openal-0.0.8.ebuild: Added ~mips to KEYWORDS. diff --git a/media-libs/openal/files/0.0.8/000_all_alsa_backend_fix.patch b/media-libs/openal/files/0.0.8/000_all_alsa_backend_fix.patch new file mode 100644 index 000000000000..0fffcdac2b6e --- /dev/null +++ b/media-libs/openal/files/0.0.8/000_all_alsa_backend_fix.patch @@ -0,0 +1,13 @@ +Index: OpenAL-Sample/src/backends/alc_backend_alsa.c +=================================================================== +--- OpenAL-Sample/src/backends/alc_backend_alsa.c (revision 1262) ++++ OpenAL-Sample/src/backends/alc_backend_alsa.c (working copy) +@@ -228,7 +228,7 @@ + alsaFormat = convertFormatALToALSA (*format); + numChannels = (unsigned int) _alGetChannelsFromFormat (*format); + ad->frameSizeInBytes = +- (unsigned int) snd_pcm_format_size (alsaFormat, numChannels); ++ (unsigned int) psnd_pcm_format_size (alsaFormat, numChannels); + bufferSizeInFrames = *bufferSizeInBytes / ad->frameSizeInBytes; + rate = (unsigned int) *speed; + diff --git a/media-libs/openal/files/0.0.8/001_all_rtprio.patch b/media-libs/openal/files/0.0.8/001_all_rtprio.patch new file mode 100644 index 000000000000..56578492eee3 --- /dev/null +++ b/media-libs/openal/files/0.0.8/001_all_rtprio.patch @@ -0,0 +1,110 @@ +Index: configure.ac +=================================================================== +--- configure.ac (revision 1262) ++++ configure.ac (working copy) +@@ -111,6 +111,9 @@ + [AC_DEFINE([NO_THREADING], [1], [undocumented])], + [AC_INCLUDES_DEFAULT([])])]) + ++AC_CHECK_HEADER([sched.h], ++ [AC_DEFINE([HAVE_SCHED_H], [1], [Define to 1 if sched.h exists,])]) ++ + AC_FUNC_SELECT_ARGTYPES + + ################################################################################ +Index: src/al_mixer.c +=================================================================== +--- src/al_mixer.c (revision 1262) ++++ src/al_mixer.c (working copy) +@@ -12,6 +12,10 @@ + #include <AL/al.h> + #include <string.h> + ++#ifdef HAVE_SCHED_H ++#include <sched.h> ++#endif ++ + #include "al_debug.h" + #include "al_error.h" + #include "al_types.h" +@@ -1065,34 +1069,46 @@ + int async_mixer_iterate(UNUSED(void *dummy)) { + ALuint bytes_to_write = 0; + ++#ifdef HAVE_SCHED_H ++ struct sched_param param; ++ ++ /* Try to set a minimal-priority real-time thread. This will fail if we're ++ * running unprivileged and the user isn't using a Linux 2.6.13 or newer ++ * kernel with a non-zero RLIMIT_RTPRIO setting. In that case, there's ++ * nothing we can do to improve responsiveness. ++ */ ++ param.sched_priority = sched_get_priority_min(SCHED_FIFO); ++ sched_setscheduler(0, SCHED_FIFO, ¶m); ++#endif ++ + /* clear buffer */ + memset(mixbuf.data, 0, mixbuf.length); + + do { +- if(_alTryLockMixerPause() == AL_TRUE) +- { +- _alLockMixBuf(); ++ _alLockMixerPause(); + +- _alMixSources(); ++ _alLockMixBuf(); + +- _alProcessFlags(); ++ _alMixSources(); + +- _alUnlockMixBuf(); ++ _alProcessFlags(); + +- /* we've accumulated sources, now mix */ +- _alMixManagerMix( &MixManager, &MixFunc, mixbuf.data ); ++ _alUnlockMixBuf(); + +- if(acConvertAudio(&s16le) < 0) +- { +- _alDebug(ALD_MAXIMUS, __FILE__, __LINE__, +- "Couldn't execute conversion from canon."); +- /* +- * most likely we're just early. +- * Don't sweat it. +- */ +- continue; +- } ++ /* we've accumulated sources, now mix */ ++ _alMixManagerMix( &MixManager, &MixFunc, mixbuf.data ); + ++ if(acConvertAudio(&s16le) < 0) ++ { ++ _alDebug(ALD_MAXIMUS, __FILE__, __LINE__, ++ "Couldn't execute conversion from canon."); ++ /* ++ * most likely we're just early. ++ * Don't sweat it. ++ */ ++ } ++ else ++ { + bytes_to_write = s16le.len_cvt; + + if(bytes_to_write) +@@ -1109,11 +1125,12 @@ + + /* clear buffer */ + memset(mixbuf.data, 0, mixbuf.length); ++ } + +- _alUnlockMixerPause(); +- } ++ _alUnlockMixerPause(); ++ + /* give other threads a chance to acquire the mixer lock */ +- _alMicroSleep(1); ++ _alMicroSleep(5000); + } while(time_for_mixer_to_die == AL_FALSE); + + time_for_mixer_to_die = AL_FALSE; diff --git a/media-libs/openal/files/0.0.8/002_all_alc_context.patch b/media-libs/openal/files/0.0.8/002_all_alc_context.patch new file mode 100644 index 000000000000..55beb7140b32 --- /dev/null +++ b/media-libs/openal/files/0.0.8/002_all_alc_context.patch @@ -0,0 +1,17 @@ +--- openal-0.0.8/src/alc/alc_context.c.ori 2006-09-29 12:36:33.000000000 -0400 ++++ openal-0.0.8/src/alc/alc_context.c 2006-09-29 12:38:05.000000000 -0400 +@@ -236,8 +236,12 @@ + /* someone unpaused us */ + ispaused = AL_FALSE; + +- _alcDeviceResume( cc->write_device ); +- _alcDeviceResume( cc->read_device ); ++ if (cc->write_device) { ++ _alcDeviceResume( cc->write_device ); ++ } ++ if (cc->read_device) { ++ _alcDeviceResume( cc->read_device ); ++ } + + _alcUnlockAllContexts(); + _alUnlockMixerPause(); diff --git a/media-libs/openal/files/0.0.8/002_all_alsa_default.patch b/media-libs/openal/files/0.0.8/002_all_alsa_default.patch new file mode 100644 index 000000000000..8bbe10e4a54d --- /dev/null +++ b/media-libs/openal/files/0.0.8/002_all_alsa_default.patch @@ -0,0 +1,11 @@ +--- openal-0.0.8/src/backends/alc_backend_alsa.c.ori 2006-09-29 12:48:06.000000000 -0400 ++++ openal-0.0.8/src/backends/alc_backend_alsa.c 2006-09-29 12:48:17.000000000 -0400 +@@ -153,7 +153,7 @@ + } + + /* alsa stuff */ +-#define DEFAULT_DEVICE "plughw:0,0" ++#define DEFAULT_DEVICE "default:0,0" + + /* convert from AL to ALSA format */ + static int AL2ALSAFMT(ALenum format); diff --git a/media-libs/openal/files/digest-openal-0.0.8-r1 b/media-libs/openal/files/digest-openal-0.0.8-r1 new file mode 100644 index 000000000000..2f213f390e0a --- /dev/null +++ b/media-libs/openal/files/digest-openal-0.0.8-r1 @@ -0,0 +1,3 @@ +MD5 641cf53761f35ee979f3e888614797a0 openal-0.0.8.tar.gz 870671 +RMD160 29368dbceea7cfd8b5c520b9e0f0cfdc7324e265 openal-0.0.8.tar.gz 870671 +SHA256 723e2c57c3cdffa7ff11f9b6b5478d6cb4af017e5a1ee7a56032969c39c1c2fe openal-0.0.8.tar.gz 870671 diff --git a/media-libs/openal/openal-0.0.8-r1.ebuild b/media-libs/openal/openal-0.0.8-r1.ebuild new file mode 100644 index 000000000000..d8c508f2a3e1 --- /dev/null +++ b/media-libs/openal/openal-0.0.8-r1.ebuild @@ -0,0 +1,59 @@ +# Copyright 1999-2006 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/media-libs/openal/openal-0.0.8-r1.ebuild,v 1.1 2006/09/29 17:02:38 wolf31o2 Exp $ + +inherit eutils + +DESCRIPTION="OpenAL, the Open Audio Library, is an open, vendor-neutral, cross-platform API for interactive, primarily spatialized audio" +HOMEPAGE="http://www.openal.org" +SRC_URI="http://www.openal.org/openal_webstf/downloads/${P}.tar.gz" + +LICENSE="LGPL-2" +SLOT="0" +KEYWORDS="~alpha ~amd64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~sparc ~x86" +IUSE="alsa arts debug esd mp3 sdl vorbis" + +RDEPEND="alsa? ( >=media-libs/alsa-lib-1.0.2 ) + arts? ( kde-base/arts ) + esd? ( media-sound/esound ) + sdl? ( media-libs/libsdl ) + vorbis? ( media-libs/libvorbis ) + mp3? ( media-libs/libmad )" + +DEPEND="${RDEPEND} + sys-devel/autoconf + sys-devel/automake + sys-devel/libtool" + +src_unpack() { + unpack ${A} + cd "${S}" + epatch ${FILESDIR}/${PV} || die +} + +src_compile() { + export WANT_AUTOCONF=2.5 + autoconf \ + || die "autoconf failed" + + econf \ + --libdir=/usr/$(get_libdir) \ + $(use_enable esd) \ + $(use_enable sdl) \ + $(use_enable alsa) \ + $(use_enable arts) \ + $(use_enable mp3) \ + $(use_enable vorbis) \ + $(use_enable debug debug-maximus) \ + || die "econf failed" + + emake -j1 all \ + || die "emake failed" +} + +src_install() { + make DESTDIR="${D}" install \ + || die "make install failed" + + dodoc AUTHORS ChangeLog NEWS NOTES README TODO +} |