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 | 6b2a901cc867093eb96862378047aecf6725e4c0 (patch) | |
tree | 651f17f24b90450bce718ebdc5bfed93c15b09e3 /media-sound/hydrogen/files | |
parent | Filter the -fno-exceptions flag out, bug 84263, and mark 2.0.11 stable on x86... (diff) | |
download | historical-6b2a901cc867093eb96862378047aecf6725e4c0.tar.gz historical-6b2a901cc867093eb96862378047aecf6725e4c0.tar.bz2 historical-6b2a901cc867093eb96862378047aecf6725e4c0.zip |
Added patch to fix white noise when using OSS on ppc.
Package-Manager: portage-2.0.51.21-r1
Diffstat (limited to 'media-sound/hydrogen/files')
-rw-r--r-- | media-sound/hydrogen/files/0.9.1-OSS.patch | 36 |
1 files changed, 36 insertions, 0 deletions
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> |