Discussion:
D5070: Allow to play the default system sound (beep) instead of a specific sound file (WIP)
René J.V. Bertin
2017-03-16 16:51:52 UTC
Permalink
rjvbb created this revision.
rjvbb added a project: Frameworks.

REVISION SUMMARY
This is a "port" of https://git.reviewboard.kde.org/r/128043/
which is itself a follow-up to discussion on the plasma-devel ML.

The main goal behind the patch is to ensure audio notifications will sound when they are not configured properly, for instance because the necessary files are missing when not running under a Plasma session.

The current state of the RR can be summarised as "awaiting brilliant ideas".

When not running under a Plasma session it would be preferable if generic alert sounds are (can be) delivered using the default system sound. The easiest way to do that is to call QApplication::beep() ; at least on OS X this will play the user's selected alert sound.

I have implemented this for now by assuming the existence of a virtual (relative) beep sound file that always plays the default sound.

In addition, this patch provides better warning feedback if a soundfile isn't found (making it easier to figure out which alert is misconfigured), and will play the sysbeep in that case (so that the alert doesn't go lost if it's sound-only).
Finally, no Phonon::AudioOutput object is created until that is actually required.

REPOSITORY
R289 KNotifications

REVISION DETAIL
https://phabricator.kde.org/D5070

AFFECTED FILES
src/notifybyaudio.cpp

To: rjvbb, #frameworks
Cc: kde-mac, #frameworks
René J.V. Bertin
2018-11-13 10:27:15 UTC
Permalink
rjvbb retitled this revision from "Allow to play the default system sound (beep) instead of a specific sound file (WIP)" to "Allow to play the default system sound (beep) instead of a specific sound file".
Herald added a subscriber: kde-frameworks-devel.

REPOSITORY
R289 KNotifications

REVISION DETAIL
https://phabricator.kde.org/D5070

To: rjvbb, #frameworks
Cc: kde-frameworks-devel, kde-mac, #frameworks, michaelh, ngraham, bruns
Loading...