pkgsrc-Bugs archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: pkg/54206 (Firefox oss audio, cubeb_stream_init()'s latency unitis frames, not milliseconds.)
The following reply was made to PR pkg/54206; it has been noted by GNATS.
From: Izumi Tsutsui <tsutsui%ceres.dti.ne.jp@localhost>
To: gnats-bugs%netbsd.org@localhost
Cc: tsutsui%ceres.dti.ne.jp@localhost
Subject: Re: pkg/54206 (Firefox oss audio, cubeb_stream_init()'s latency unitis
frames, not milliseconds.)
Date: Sat, 25 May 2019 01:51:16 +0900
Patch is here:
https://gist.github.com/tsutsui/87687549453707d1465db23056681d24
Index: Makefile
===================================================================
RCS file: /cvsroot/pkgsrc/www/firefox/Makefile,v
retrieving revision 1.375
diff -u -p -d -r1.375 Makefile
--- Makefile 22 May 2019 13:32:51 -0000 1.375
+++ Makefile 24 May 2019 14:03:10 -0000
@@ -3,6 +3,7 @@
FIREFOX_VER= ${MOZ_BRANCH}${MOZ_BRANCH_MINOR}
MOZ_BRANCH= 67.0
MOZ_BRANCH_MINOR=
+PKGREVISION= 1
DISTNAME= firefox-${FIREFOX_VER}.source
PKGNAME= ${DISTNAME:S/.source//:S/b/beta/:S/esr//}
Index: distinfo
===================================================================
RCS file: /cvsroot/pkgsrc/www/firefox/distinfo,v
retrieving revision 1.351
diff -u -p -d -r1.351 distinfo
--- distinfo 22 May 2019 13:32:51 -0000 1.351
+++ distinfo 24 May 2019 14:03:10 -0000
@@ -25,7 +25,7 @@ SHA1 (patch-js_xpconnect_src_XPCMaps.cpp
SHA1 (patch-media_libcubeb_gtest_moz.build) = ea6dcc7ceeb76ce1fb9d508cf43080a2eef3a9e4
SHA1 (patch-media_libcubeb_src_cubeb.c) = 4fe5512c89fa9e0dd64573d2784e5e0f7fd4d866
SHA1 (patch-media_libcubeb_src_cubeb__alsa.c) = f359a66a22f11142d05746e15894d998d3e3bf5a
-SHA1 (patch-media_libcubeb_src_cubeb__oss.c) = 9b29bbd1c923e574aa5a9ecc17170ad5ef4778c0
+SHA1 (patch-media_libcubeb_src_cubeb__oss.c) = 103f751d5a7bc14a81a6ed43e1afc722bc092f7e
SHA1 (patch-media_libcubeb_src_moz.build) = 10f8355e3b3c6d35cca99f3717246e8658860737
SHA1 (patch-media_libcubeb_update.sh) = cddb5849fa2972e961e4891bc8a79a650df06d8d
SHA1 (patch-media_libpng_pngpriv.h) = c8084332560017cd7c9b519b61d125fa28af0dbc
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.12
diff -u -p -d -r1.12 patch-media_libcubeb_src_cubeb__oss.c
--- patches/patch-media_libcubeb_src_cubeb__oss.c 4 Nov 2018 00:38:45 -0000 1.12
+++ patches/patch-media_libcubeb_src_cubeb__oss.c 24 May 2019 14:03:10 -0000
@@ -1,8 +1,9 @@
$NetBSD: patch-media_libcubeb_src_cubeb__oss.c,v 1.12 2018/11/04 00:38:45 ryoon Exp $
* Restore OSS audio support code
+* fix wrong latency values in stream_init (PR pkg/54206)
---- media/libcubeb/src/cubeb_oss.c.orig 2018-10-25 10:52:12.966650761 +0000
+--- media/libcubeb/src/cubeb_oss.c.orig 2019-05-24 13:05:19.117086384 +0000
+++ media/libcubeb/src/cubeb_oss.c
@@ -0,0 +1,453 @@
+/*
@@ -240,14 +241,14 @@ $NetBSD: patch-media_libcubeb_src_cubeb_
+ return NULL;
+}
+
-+static void oss_try_set_latency(cubeb_stream* stream, unsigned int latency)
++static void oss_try_set_latency(cubeb_stream* stream, unsigned int latency_frames)
+{
+ unsigned int latency_bytes, n_frag;
+ int frag;
+ /* fragment size of 1024 is a good choice with good chances to be accepted */
+ unsigned int frag_log=10; /* 2^frag_log = fragment size */
+ latency_bytes =
-+ latency*stream->params.rate*stream->params.channels*sizeof(uint16_t)/1000;
++ latency_frames*stream->params.channels*sizeof(uint16_t);
+ n_frag = latency_bytes>>frag_log;
+ frag = (n_frag<<16) | frag_log;
+ /* Even if this fails we wish to continue, not checking for errors */
@@ -260,7 +261,7 @@ $NetBSD: patch-media_libcubeb_src_cubeb_
+ cubeb_stream_params * input_stream_params,
+ cubeb_devid output_device,
+ cubeb_stream_params * output_stream_params,
-+ unsigned int latency,
++ unsigned int latency_frames,
+ cubeb_data_callback data_callback,
+ cubeb_state_callback state_callback, void * user_ptr)
+{
@@ -296,7 +297,7 @@ $NetBSD: patch-media_libcubeb_src_cubeb_
+ stream->volume = 1.0;
+ stream->panning = 0.0;
+
-+ oss_try_set_latency(stream, latency);
++ oss_try_set_latency(stream, latency_frames);
+
+ stream->floating = 0;
+ SET(SNDCTL_DSP_CHANNELS, stream->params.channels);
Home |
Main Index |
Thread Index |
Old Index