[pulseaudio-tickets] [Bug 77108] New: pactl parse_volume() cannot read negatives

bugzilla-daemon at freedesktop.org bugzilla-daemon at freedesktop.org
Sun Apr 6 08:35:40 PDT 2014


https://bugs.freedesktop.org/show_bug.cgi?id=77108

          Priority: medium
            Bug ID: 77108
                CC: lennart at poettering.net
          Assignee: pulseaudio-bugs at lists.freedesktop.org
           Summary: pactl parse_volume() cannot read negatives
        QA Contact: pulseaudio-bugs at lists.freedesktop.org
          Severity: blocker
    Classification: Unclassified
                OS: Linux (All)
          Reporter: nguenthe+freedesktopbugzilla at uwaterloo.ca
          Hardware: All
            Status: NEW
           Version: unspecified
         Component: tools
           Product: PulseAudio

I cannot find a way with pulse to reduce the volume from the command line. I
found that the manpage claims
> If the volume specification start with a + or - 
> the volume adjustment will be relative to the current sink volume.

But it does not work:
[me at galleon ~]$ pactl set-sink-volume 0 -10%
pactl: invalid option -- '1'

However this is fine:
[me at galleon ~]$ pactl set-sink-volume 0 +10%

parse_volume() should work, afterall
http://cgit.freedesktop.org/pulseaudio/pulseaudio/tree/src/utils/pactl.c#n1476
says
> *vol_flags = (pa_startswith(vs, "+") || pa_startswith(vs, "-")) ? VOL_RELATIVE : VOL_ABSOLUTE;

I believe the problem is this line
http://cgit.freedesktop.org/pulseaudio/pulseaudio/tree/src/utils/pactl.c#n1599:
getopt is parsing (and choking) on the - before parse_volume() ever gets it.

I have the most recent PA; this is my PA version info:
[kousu at galleon ~]$ pacman -Qi pulseaudio
Name           : pulseaudio
Version        : 5.0-1
Description    : A featureful, general-purpose sound server
Architecture   : x86_64
URL            : http://www.freedesktop.org/wiki/Software/PulseAudio
Licenses       : LGPL  AGPL3
Groups         : None
Provides       : None
Depends On     : libpulse=5.0-1  rtkit  libltdl  speex  tdb  fftw  orc 
libsamplerate  webrtc-audio-processing  sbc
Optional Deps  : pulseaudio-alsa: ALSA configuration (recommended) [installed]
                 avahi: zeroconf publishing and discovery [installed]
                 bluez: Bluetooth [installed]
                 bluez-libs: Bluetooth [installed]
                 gconf: paprefs configuration [installed]
                 jack2-dbus: JACK support
                 lirc-utils: IR control [installed]
                 openssl: RAOP (AirPlay) output [installed]
                 python-pyqt4: Equalizer GUI (qpaeq) [installed]
                 xenstore: Xen paravirtual output
Required By    : gnome-settings-daemon  projectm-pulseaudio  pulseaudio-alsa
Optional For   : fluidsynth  google-talkplugin  lmms  phonon-qt4 
speech-dispatcher
Conflicts With : None
Replaces       : None
Installed Size : 5247.00 KiB
Packager       : Jan Alexander Steffens (heftig) <jan.steffens at gmail.com>
Build Date     : Mon 03 Mar 2014 03:31:31 PM EST
Install Date   : Sun 30 Mar 2014 05:15:54 PM EDT
Install Reason : Installed as a dependency for another package
Install Script : No
Validated By   : Signature

-- 
You are receiving this mail because:
You are the QA Contact for the bug.
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/pulseaudio-bugs/attachments/20140406/feab8829/attachment.html>


More information about the pulseaudio-bugs mailing list