[pulseaudio-tickets] [Bug 71025] Volume controll bug if balans adjust

bugzilla-daemon at freedesktop.org bugzilla-daemon at freedesktop.org
Wed Nov 6 17:00:57 PST 2013


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

--- Comment #10 from Raymond <superquad.vortex2 at gmail.com> ---
http://cgit.freedesktop.org/pulseaudio/pulseaudio/tree/src/utils/pactl.c

if volume of each channel can really be adjusted by percentage, it should not
use pa_volume_avg

static void volume_relative_adjust(pa_cvolume *cv) {
    pa_assert((volume_flags & VOL_RELATIVE) == VOL_RELATIVE);

    /* Relative volume change is additive in case of UINT or PERCENT
     * and multiplicative for LINEAR or DECIBEL */
    if ((volume_flags & 0x0F) == VOL_UINT || (volume_flags & 0x0F) ==
VOL_PERCENT) {
        pa_volume_t v = pa_cvolume_avg(cv);
        v = v + volume < PA_VOLUME_NORM ? PA_VOLUME_MUTED : v + volume -
PA_VOLUME_NORM;
        pa_cvolume_set(cv, 1, v);
    }

-- 
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/20131107/fc17e1b9/attachment.html>


More information about the pulseaudio-bugs mailing list