Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 24 Apr 2015 15:24:38 +0200
From:      "Jakob Fink" <jfink@gmx.at>
To:        gnome@FreeBSD.org
Subject:   Patch for pulseaudio-6.0 / Volume Change through pactl
Message-ID:  <trinity-0707c69e-5955-4003-a20e-59a2299b2ead-1429881877906@3capp-gmx-bs61>

next in thread | raw e-mail | index | archive | help
--knika-c0d85263-84f0-41b7-868c-7ade4be13c75
MIME-Version: 1.0
Content-Type: text/plain; charset="UTF-8"

   Dear Maintainers,


   I recently started to use pulseaudio. I am using the pactl tool to
   change volume in some scripts.

   There is a bug only concerning freebsd in the pulseaudio source: in
   pulsecore/core_util.c only locale.h in included. xlocale.h is missing.

   This leads to an undefined return value in  strtod_l, which is used to
   convert the volume string taken from the commandline into a double,
   using the currently set locale.
   This double is then used unchecked to set the volume, which leads
   pulseaudio to amplify the output by a few thousand percent and nearly
   blow my speakers (and my eardrums) in the process.

   I retraced the bug to this function and made the attached patch. On my
   system, it fixes the issue. It would be great if you could include it
   in the ports tree to prevent countless deaf freebsd users in the
   future. ;)


   Regards,
   Jakob

--knika-c0d85263-84f0-41b7-868c-7ade4be13c75
Content-Type: text/plain
Content-Disposition: attachment; filename=patch-src_pulsecore_core-util.c

--- src/pulsecore/core-util.c.orig	2015-02-12 15:10:35.000000000 +0100
+++ src/pulsecore/core-util.c		2015-04-24 14:39:22.000000000 +0200
@@ -53,6 +53,7 @@
 
 #ifdef HAVE_STRTOF_L
 #include <locale.h>
+#include <xlocale.h>
 #endif
 
 #ifdef HAVE_SCHED_H

--knika-c0d85263-84f0-41b7-868c-7ade4be13c75--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?trinity-0707c69e-5955-4003-a20e-59a2299b2ead-1429881877906>