[gstreamer-bugs] [Bug 571610] [pulsesink] Allow setting a log volume, instead of a linear one

GStreamer (bugzilla.gnome.org) bugzilla at gnome.org
Wed Sep 9 15:49:26 PDT 2009


https://bugzilla.gnome.org/show_bug.cgi?id=571610



--- Comment #13 from Lennart Poettering <lennart at poettering.net> 2009-09-09 22:49:22 UTC ---
Hmm, Bastien, is this simply a presentation issue?

i.e. does Rhythmbox map the linear factor linearly to the pixels of the volume
slider? That is not a good idea.

Mapping volume levels to pixels on screens is a science of its own. There are
actually multiple standards about this, and they all suck.

After discussing this on LAD I decided to use cubic mapping in PulseAudio (as
mentioned). And so should you in Rb/Totem, probably.

i.e. if gst gives you the volume as linear factor x, then do this for showing
it on a GtkScale:

  gtk_range_set_value(GTK_RANGE(scale), cbrt(x));

And when passing the volume you read from a GtkScale to gst do this:

  x = gtk_range_get_value(GTK_RANGE(scale));
  x = x*x*x;

Also see:

http://www.robotplanet.dk/audio/audio_gui_design/
http://lists.linuxaudio.org/pipermail/linux-audio-dev/2009-May/thread.html#23151

-- 
Configure bugmail: https://bugzilla.gnome.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.
You are the assignee for the bug.




More information about the Gstreamer-bugs mailing list