GNOME Bugzilla – Bug 510654
[API] add interface for volume level meters
Last modified: 2018-11-03 11:13:51 UTC
I propose merging the applications gst-mixer (GNOME's mixer application) and vu-meter (GNOME's volume level meter application) by integrating vu-meter into gst-mixer (i.e. volume level shown in the background of the scales using gst_range_set_fill_level). The problem: gst-mixer uses GStreamer, but vu-meter uses esd. I need an GStreamer interface for getting the current volume level on a given track. In terms of ALSA, I need an interface that uses functions like snd_ctl_elem_read and snd_ctl_elem_value_get_integer to read the current level on a specific alsa device.
Created attachment 103214 [details] example for how vu-meter could be integrated into gst-mixer (animated GIF)
That would probably be an GstMixerTrackVuMeter interface on GstMixerTrack that, if it's supported by the underlying system, provides something like: gst_mixer_track_vu_meter_get_current_level (track, &level_left, &level_right); Does this sound good to you? If so, could you provide a patch that adds such an interface and uses it in alsamixer (and even better in other mixers too :) ). Another possibility would be to just add it directly to the GstMixerTrack and let it return FALSE if it's not supported. That might be a better solution as an additional interface just for a single function sounds too much ;)
Lutz, is there any chance that you could comment on Sebastians proposal? Sebastian, is this an issue that needs to be fixed regardless of feedback from the author? If so, we'd better set is to NEW, of not, we can close it as INCOMPLETE I guess.
Hm. Sadly closing as INCOMPLETE. Feel free to reopen.
Please don't close valid API requests with patches just because there hasn't been a response for some time. If in doubt, ping again or re-open to UNCONFIRMED, thanks.
I proposed this because I wanted to be able to configure the volume to automatically level off volume peaks (or lows). Why? The quiet parts of classical music would then be audible even when working in a noisy environment. And the loud parts wouldn't disturb my neighbours :-)
(In reply to comment #6) > I proposed this because I wanted to be able to configure the volume to > automatically level off volume peaks (or lows). Why? The quiet parts of > classical music would then be audible even when working in a noisy environment. > And the loud parts wouldn't disturb my neighbours :-) Lutz, for that you would like to use a compressor: http://en.wikipedia.org/wiki/Dynamic_range_compression e.g. the audiodynamic element.
... or a better audiodynamic element that has configurable attack/release instead of the instantanous behaviour we have now.
Do we still want this API? The original reason why it was proposed should be handled different and the GstMixer interface is not used much nowadays anyway because on Linux and other Unix-like OS usually pulseaudio is used and on other platforms we don't even have mixer elements.
People still might want to get a vu-meter from e.g. an audiosrc. Its kind of symetric to the volume control - use hw-level meters if possible, otherwise plug the level element. but I agree, it would need a lot more code to make it useful. Maybe the whole mixer iface needs a review and we just have a simple iface on audio-src/sink elements that has interface properties for gain and monitor + api to check wheter they are supported.
Shall we move bug out of needinfo state in case it's still valid and if we want to keep it open ?
-- GitLab Migration Automatic Message -- This bug has been migrated to freedesktop.org's GitLab instance and has been closed from further activity. You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/issues/11.