FreeBSD Bugzilla – Attachment 188468 Details for
Bug 224034
www/palemoon: sndio: improve and clamp float->s16 conversion
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
palemoon.diff
palemoon.diff (text/plain), 1.90 KB, created by
Tobias Kortkamp
on 2017-12-02 10:25:38 UTC
(
hide
)
Description:
palemoon.diff
Filename:
MIME Type:
Creator:
Tobias Kortkamp
Created:
2017-12-02 10:25:38 UTC
Size:
1.90 KB
patch
obsolete
>Index: Makefile >=================================================================== >--- Makefile (revision 455341) >+++ Makefile (working copy) >@@ -4,6 +4,7 @@ > PORTNAME= palemoon > DISTVERSION= 27.6.2 > DISTVERSIONSUFFIX=_Release >+PORTREVISION= 1 > CATEGORIES= www ipv6 > > MAINTAINER= lichray@gmail.com >Index: files/patch-cubeb5ffce9e91b >=================================================================== >--- files/patch-cubeb5ffce9e91b (nonexistent) >+++ files/patch-cubeb5ffce9e91b (working copy) >@@ -0,0 +1,41 @@ >+From 5ffce9e91b2fde70ba532ea215e3e9e7eed3d41a Mon Sep 17 00:00:00 2001 >+From: Alexandre Ratchov <alex@caoua.org> >+Date: Thu, 2 Apr 2015 13:09:22 +1300 >+Subject: [PATCH] sndio: improve and clamp float->s16 conversion. >+ >+--- >+ src/cubeb_sndio.c | 14 +++++++++++--- >+ 1 file changed, 11 insertions(+), 3 deletions(-) >+ >+diff --git a/src/cubeb_sndio.c b/src/cubeb_sndio.c >+index 01f96346..e6d531a4 100644 >+--- media/libcubeb/src/cubeb_sndio.c.orig >++++ media/libcubeb/src/cubeb_sndio.c >+@@ -4,6 +4,7 @@ >+ * This program is made available under an ISC-style license. See the >+ * accompanying file LICENSE for details. >+ */ >++#include <math.h> >+ #include <poll.h> >+ #include <pthread.h> >+ #include <sndio.h> >+@@ -49,9 +50,16 @@ float_to_s16(void *ptr, long nsamp) >+ { >+ int16_t *dst = ptr; >+ float *src = ptr; >+- >+- while (nsamp-- > 0) >+- *(dst++) = *(src++) * 32767; >++ int s; >++ >++ while (nsamp-- > 0) { >++ s = lrintf(*(src++) * 32768); >++ if (s < -32768) >++ s = -32768; >++ else if (s > 32767) >++ s = 32767; >++ *(dst++) = s; >++ } >+ } >+ >+ static void > >Property changes on: files/patch-cubeb5ffce9e91b >___________________________________________________________________ >Added: fbsd:nokeywords >## -0,0 +1 ## >+yes >\ No newline at end of property >Added: svn:eol-style >## -0,0 +1 ## >+native >\ No newline at end of property >Added: svn:mime-type >## -0,0 +1 ## >+text/plain >\ No newline at end of property
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Flags:
lichray:
maintainer-approval+
Actions:
View
|
Diff
Attachments on
bug 224034
: 188468