Bug 323608 - "Volume Feedback" doesn't work
Summary: "Volume Feedback" doesn't work
Status: RESOLVED FIXED
Alias: None
Product: kmix
Classification: Applications
Component: general (show other bugs)
Version: 4.4
Platform: Gentoo Packages Linux
: NOR normal
Target Milestone: ---
Assignee: Colin Guthrie
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-08-16 16:30 UTC by Lukas Schneiderbauer
Modified: 2021-03-05 20:36 UTC (History)
3 users (show)

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Lukas Schneiderbauer 2013-08-16 16:30:47 UTC
Using kde sc 4.11.0 kmix' "volume feedback" doesn't work here. There is even no difference at all between activated and deactivated volume feedback. Neither did it work for kde sc 4.10.

Reproducible: Always

Steps to Reproduce:
1. start a kde session
2. activate "volume feedback" in kmix settings
3. change the volume via keyboard-buttons or mouse scrollwheel

Actual Results:  
there is no audio feedback

Expected Results:  
there is audio feedback
Comment 1 Christian Esken 2013-12-18 13:25:41 UTC
For further insight into this, please post the following information:

- Which sound backend is used. Please copy the output from
    KMix menu => Help => Hardware information

- The ouput of "amixer" (or "amixer -c 1" or any other number that corresponds to the affected soundcard).

- Report if other mixers work (e.g. alsamixer for ALSA and pavucontrol for PulseAudio).
Comment 2 Lukas Schneiderbauer 2013-12-18 14:20:39 UTC
(In reply to comment #1)
> - Which sound backend is used. Please copy the output from
>     KMix menu => Help => Hardware information
Sound drivers supported: PulseAudio + ALSA + OSS + MPRIS2
Sound drivers used: PulseAudio

> - The ouput of "amixer" (or "amixer -c 1" or any other number that
> corresponds to the affected soundcard).
Simple mixer control 'Master',0
  Capabilities: pvolume pswitch pswitch-joined
  Playback channels: Front Left - Front Right
  Limits: Playback 0 - 65536
  Mono:
  Front Left: Playback 30419 [46%] [on]
  Front Right: Playback 30419 [46%] [on]
Simple mixer control 'Capture',0
  Capabilities: cvolume cswitch cswitch-joined
  Capture channels: Front Left - Front Right
  Limits: Capture 0 - 65536
  Front Left: Capture 10487 [16%] [on]
  Front Right: Capture 10487 [16%] [on]

> - Report if other mixers work (e.g. alsamixer for ALSA and pavucontrol for
> PulseAudio).
pavucontrol and alsamixer are working normally. (though I don't see what this has to do with kmix' volume feedback)
Comment 3 Christian Esken 2014-01-05 18:57:22 UTC
I am not usually using PulseAudio (where volume feedback is supported), but I tried t now. I can sometimes reproduce it. I have days where volume feedback works 100%, and others where it does not, and sometimes it is working only 10% of the time.
Not sure what to do about that, though. There can be many reasons. Probably the used technology (libcanberra) is buggy. Or your soundcard driver is buggy. Or it is sent to the wrong soundcard or the wrong sink (e.g. digital or headphone instead of analog). Or libcanberra is confused, because KMix sends so many "play events" - it might get better if only ONE event is sent, namely after RELEASING  the mouse button.
Unless somebody is around who knows libcanberra better than me, I see no real hope for a fix. I will temporarily assign this ticket over to Colin. Colin, do you have any idea how to continue here (diagnosis)? And feel free to reassign the ticket to me.
Comment 4 Atenágoras Souza Silva 2015-06-14 21:46:58 UTC
It alse happens to me.
I am using Debian Jessie (8), and current KDE and amarok versions for this distro.
It happens when I try to use amarok out of a KDE session. For example, if I use fluxbox than KDE, I have no feedback or volume change when I try to change the volume anyway.
However, if I start a music again by double-clicking it, I get the volume change (or volume feedback) working again.
Comment 5 Jonathan Marten 2021-03-01 18:33:22 UTC
Git commit 5749abf20cbcde1c84d7d1e56431ebc5c33daf3c by Jonathan Marten.
Committed on 01/03/2021 at 18:06.
Pushed by marten into branch 'master'.

Make the volume feedback implementation common to all backends

Using a new singleton class VolumeFeedback, which receives volume
change events via a ControlManager announcement and plays the sound
for a volume change on the current global master device.  This also
handles rate limiting and stopping at maximum volume as per the
referenced bugs.  Remove the corresponding code from the PulseAudio
and ALSA backends.

In theory this means that volume feedback will also work with OSS,
assuming that Canberra supports OSS output.
Related: bug 302361, bug 302474

M  +6    -1    CMakeLists.txt
M  +12   -15   apps/kmixwindow.cpp
M  +1    -5    apps/kmixwindow.h
A  +243  -0    apps/volumefeedback.cpp     [License: LGPL (v2+)]
A  +64   -0    apps/volumefeedback.h     [License: LGPL (v2+)]
M  +0    -111  backends/mixer_alsa9.cpp
M  +3    -12   backends/mixer_alsa9.h
M  +7    -73   backends/mixer_pulse.cpp
M  +0    -2    backends/mixer_pulse.h

https://invent.kde.org/multimedia/kmix/commit/5749abf20cbcde1c84d7d1e56431ebc5c33daf3c
Comment 6 Jonathan Marten 2021-03-05 20:36:36 UTC
The previous commit makes some changes to volume feedback which means that it should work with both PulseAudio and ALSA (and in theory also OSS, but not tested).  Please reopen if there are still problems as reported.