KDE 4 and KDE 5 use phonon for playing notification and so are unable to use media.role=event PulseAudio property. This create weird bug like this: https://bugs.kde.org/show_bug.cgi?id=324975 Reproducible: Always Steps to Reproduce: 1. Mute notification volume in kmix 2. play a KDE notification Actual Results: Knotity play sound Expected Results: No sound Two solution: - Use PA when available in notifybyaudio.cpp - Patch PulseAudio (if not already available) to be able to set PA properties Temp fix, use this script as external notification executable: $ cat /usr/local/bin/notify.sh #!/bin/bash paplay --property="media.role=event" "$@"
Isn't Phonon our abstraction layer? What needs to be changed in Phonon, so that applications do not need to use PA directly?
A way to pass PA properties.
internal mapping https://projects.kde.org/projects/kdesupport/phonon/phonon/repository/revisions/master/entry/phonon/pulsesupport.cpp#L227 internal map application https://projects.kde.org/projects/kdesupport/phonon/phonon/repository/revisions/master/entry/phonon/pulsesupport.cpp#L1039 internal property creation https://projects.kde.org/projects/kdesupport/phonon/phonon/repository/revisions/master/entry/phonon/pulsesupport.cpp#L1195 internal override setting https://projects.kde.org/projects/kdesupport/phonon/phonon/repository/revisions/master/entry/phonon/pulsesupport.cpp#L1231 if stuff isn't behaving then it's because pulseaudio ignores overrides (which is the only way to set properties when using VLC (https://trac.videolan.org/vlc/ticket/9989)...
Oh and in case you want to fix this in an multimedia library independent way here is the api proposal that needs implementing to provide a cache based playback (which in turn internally could use pulseaudio directoy as pulseaudio provides a sample cache api already). http://markmail.org/thread/3yysp76oz7zjyr3t#query:+page:1+mid:3yysp76oz7zjyr3t+state:results
s/directoy/directly fwiw ^^
knotify requests Phonon::NotificationCategory for its audio output from Phonon. If I understand comment #3 correctly, Phonon already has support for passing the category down to pulseaudio. If this does not work correctly, the bug is either in Phonon, or in pulseaudio. Marking as NEEDSINFO, until someone clarifies the status of this bug.
Pulseaudio bug I say. I briefly talked with Colin Guthrie about this a while ago. What happens (and this only ever affects the vlc backend because of the videolan bug I mentioned in comment #3) is that phonon defines override variables in the envrionment before letting vlc create the pulseaudio sink. However pulseaudio then incorrectly merges the diverging data incorrectly, giving the data that vlc provides preference over the override which ultimately sets the role to video and not whatever was set by phonon. This then bypasses the notification volume set in kmix as that doesn't apply to video role sinks and that's why it uses volume 1.0.
Thanks for the update. In other words, what knotify does is correct, and does not need to be changed.