NetBSD-Users archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
hack fix for firefox & OSS audio noise
Hi,
I've had an issue for a long time with firefox & OSS audio
(PKG_DEFAULT_OPTIONS="-pulseaudio oss") where it would play some noise
in bass-heavy music.
other programs using oss did not have this issue - even playing the same
sounds.
the following fix works for me, although I'm not sure why any
combination of fmax/fmin/int mask/casting doesn't seem to do it.
(I've only tested it on firefox 45, 49 does not feel like running for me
now)
note: f_buffer can be and often is negative.
any suggestions for a less hacky patch?
? firefox.core
? plugin-container.core
? work
? workold
Index: distinfo
===================================================================
RCS file: /cvsroot/pkgsrc/www/firefox/distinfo,v
retrieving revision 1.258
diff -u -p -u -r1.258 distinfo
--- distinfo 3 Nov 2016 22:46:43 -0000 1.258
+++ distinfo 7 Nov 2016 14:32:33 -0000
@@ -54,7 +54,7 @@ SHA1 (patch-js_xpconnect_src_XPCConvert.
SHA1 (patch-js_xpconnect_src_xpcprivate.h) = 8a15ff542c9d3fce448d9ec63706f7dfb411d926
SHA1 (patch-media_libcubeb_src_cubeb.c) = 91eb24595c423b7e086670bb67e73cfd0bfb5559
SHA1 (patch-media_libcubeb_src_cubeb__alsa.c) = 17ec400709d3e448751ba1283e1b2c5f04bb4dc1
-SHA1 (patch-media_libcubeb_src_cubeb__oss.c) = f3617f38ad98f2eb7ebbd8f5904b361dde4bcc15
+SHA1 (patch-media_libcubeb_src_cubeb__oss.c) = 5c1bf3aec8e7993704bab27dfec51874d39550ed
SHA1 (patch-media_libcubeb_src_moz.build) = ffa7cf809f20c9e07e64fc885a06146f41634b03
SHA1 (patch-media_libsoundtouch_src_cpu__detect__x86.cpp) = db61737afa7773e8cbd82976de3a02c917174696
SHA1 (patch-media_libstagefright_frameworks_av_include_media_stagefright_foundation_AString.h) = b280f691dbe67b6de592dcd04baf33c6cf480cc8
Index: patches/patch-media_libcubeb_src_cubeb__oss.c
===================================================================
RCS file: /cvsroot/pkgsrc/www/firefox/patches/patch-media_libcubeb_src_cubeb__oss.c,v
retrieving revision 1.5
diff -u -p -u -r1.5 patch-media_libcubeb_src_cubeb__oss.c
--- patches/patch-media_libcubeb_src_cubeb__oss.c 16 Jun 2016 12:08:21 -0000 1.5
+++ patches/patch-media_libcubeb_src_cubeb__oss.c 7 Nov 2016 14:32:33 -0000
@@ -175,7 +175,7 @@ $NetBSD: patch-media_libcubeb_src_cubeb_
+ got = run_data_callback(stream, f_buffer,
+ OSS_BUFFER_SIZE/stream->params.channels);
+ for (i=0; i<((unsigned long)got)*stream->params.channels; i++) {
-+ buffer[i] = f_buffer[i]*32767.0;
++ buffer[i] = f_buffer[i]*32767.0*0.7; /* XXX overflow? */
+ }
+ } else {
+ got = run_data_callback(stream, buffer,
Home |
Main Index |
Thread Index |
Old Index