Allow to play the default system sound (beep) instead of a specific sound file
Needs ReviewPublic

Authored by rjvbb on Mar 16 2017, 4:51 PM.

Details

Reviewers
None
Group Reviewers
Frameworks
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.

Diff Detail

Lint
Lint Skipped
Unit
Unit Tests Skipped
rjvbb created this revision.Mar 16 2017, 4:51 PM
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.Nov 13 2018, 10:27 AM
Restricted Application added a subscriber: kde-frameworks-devel. ยท View Herald TranscriptNov 13 2018, 10:27 AM