diff options
author | Joseph Jezak <josejx@gentoo.org> | 2005-05-08 01:54:55 +0000 |
---|---|---|
committer | Joseph Jezak <josejx@gentoo.org> | 2005-05-08 01:54:55 +0000 |
commit | 08e6917e80aa3b1188c2d7abe1125810e176f956 (patch) | |
tree | 7c840f03c86ec0345d2931bf5c17fa787a054b28 /media-sound/hydrogen | |
parent | Filter the -fno-exceptions flag out, bug 84263, and mark 2.0.11 stable on x86... (diff) | |
download | gentoo-2-08e6917e80aa3b1188c2d7abe1125810e176f956.tar.gz gentoo-2-08e6917e80aa3b1188c2d7abe1125810e176f956.tar.bz2 gentoo-2-08e6917e80aa3b1188c2d7abe1125810e176f956.zip |
Added patch to fix white noise when using OSS on ppc.
(Portage version: 2.0.51.21-r1)
Diffstat (limited to 'media-sound/hydrogen')
-rw-r--r-- | media-sound/hydrogen/ChangeLog | 6 | ||||
-rw-r--r-- | media-sound/hydrogen/files/0.9.1-OSS.patch | 36 | ||||
-rw-r--r-- | media-sound/hydrogen/hydrogen-0.9.1.ebuild | 10 |
3 files changed, 50 insertions, 2 deletions
diff --git a/media-sound/hydrogen/ChangeLog b/media-sound/hydrogen/ChangeLog index 7acdf9d8fe3f..adc6cf0dd68f 100644 --- a/media-sound/hydrogen/ChangeLog +++ b/media-sound/hydrogen/ChangeLog @@ -1,6 +1,10 @@ # ChangeLog for media-sound/hydrogen # Copyright 2000-2005 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/media-sound/hydrogen/ChangeLog,v 1.30 2005/04/11 13:55:30 luckyduck Exp $ +# $Header: /var/cvsroot/gentoo-x86/media-sound/hydrogen/ChangeLog,v 1.31 2005/05/08 01:54:55 josejx Exp $ + + 08 May 2005; Joseph Jezak <josejx@gentoo.org> +files/0.9.1-OSS.patch, + hydrogen-0.9.1.ebuild: + Added patch to fix white noise when using OSS on ppc. *hydrogen-0.9.1 (11 Apr 2005) diff --git a/media-sound/hydrogen/files/0.9.1-OSS.patch b/media-sound/hydrogen/files/0.9.1-OSS.patch new file mode 100644 index 000000000000..d47884187422 --- /dev/null +++ b/media-sound/hydrogen/files/0.9.1-OSS.patch @@ -0,0 +1,36 @@ +--- lib/drivers/OssDriver.cpp.bak 2005-05-07 20:13:45.000000000 -0400 ++++ lib/drivers/OssDriver.cpp 2005-05-07 20:16:06.000000000 -0400 +@@ -241,7 +241,9 @@ + // prepare the 2-channel array of short + for (uint i = 0; i < (unsigned)oss_driver_bufferSize; i++) { + audioBuffer[i * 2] = (short)(out_L[i] * 32768.0); ++ be_swap_short(&audioBuffer[i * 2]); + audioBuffer[i * 2 + 1] = (short)(out_R[i] * 32768.0); ++ be_swap_short(&audioBuffer[i * 2 + 1]); + } + + unsigned long written = ::write(fd, audioBuffer, size * 2); +@@ -253,7 +255,13 @@ + } + + ++void be_swap_short(short *s){ ++ unsigned char swap; + ++ swap = (char)(*s & 0xFF); ++ *s = *s >> 8; ++ *s = (swap << 8) | *s; ++} + + + int OssDriver::log2(int n) { +--- lib/drivers/OssDriver.h.bak 2005-05-07 20:28:24.000000000 -0400 ++++ lib/drivers/OssDriver.h 2005-05-07 20:29:09.000000000 -0400 +@@ -31,6 +31,7 @@ + // check if OSS support is enabled + #ifdef OSS_SUPPORT + ++void be_swap_short(short *s); + + #ifdef __NetBSD__ + #include <soundcard.h> diff --git a/media-sound/hydrogen/hydrogen-0.9.1.ebuild b/media-sound/hydrogen/hydrogen-0.9.1.ebuild index e9ed8a76f2e8..1eb60b716e37 100644 --- a/media-sound/hydrogen/hydrogen-0.9.1.ebuild +++ b/media-sound/hydrogen/hydrogen-0.9.1.ebuild @@ -1,6 +1,6 @@ # Copyright 1999-2005 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/media-sound/hydrogen/hydrogen-0.9.1.ebuild,v 1.1 2005/04/11 13:55:30 luckyduck Exp $ +# $Header: /var/cvsroot/gentoo-x86/media-sound/hydrogen/hydrogen-0.9.1.ebuild,v 1.2 2005/05/08 01:54:55 josejx Exp $ IUSE="alsa jack ladspa" @@ -24,6 +24,14 @@ DEPEND=">=media-libs/libsndfile-1.0.0 ladspa? ( media-libs/liblrdf ) >=x11-libs/qt-3" +src_unpack() { + unpack ${A} + cd ${S} + if use ppc; then + epatch ${FILESDIR}/${PV}-OSS.patch + fi +} + src_compile() { need-autoconf 2.5 econf $(use_enable jack jack-support) \ |