Bug 489213 - KAlarm play audio feature stopped working after upgrading to Plasma 6.1
Summary: KAlarm play audio feature stopped working after upgrading to Plasma 6.1
Status: RESOLVED FIXED
Alias: None
Product: kalarm
Classification: Applications
Component: sound (show other bugs)
Version: 3.8.1.2
Platform: Neon Linux
: NOR normal
Target Milestone: ---
Assignee: David Jarvie
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2024-06-26 04:55 UTC by LTS20050703
Modified: 2024-07-09 19:44 UTC (History)
1 user (show)

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


Attachments
An .wav audio file (433.15 KB, audio/wav)
2024-06-26 17:15 UTC, LTS20050703
Details

Note You need to log in before you can comment on or make changes to this bug.
Description LTS20050703 2024-06-26 04:55:13 UTC
SUMMARY
KAlarm play audio feature stopped working after upgrading to Plasma 6.1

Unlike https://bugs.kde.org/show_bug.cgi?id=481989, The "choose sound file" dialog window allows me to select audio files so I'm sure this is not a duplicate.

Unlike https://bugs.kde.org/show_bug.cgi?id=484503, I have switched to a .wav file
- The .wav file was converted from .opus using FFmpeg.
- If the original .opus file is selected, KAlarm will error saying "Unsupported audio format, or corrupt data" when trying to test the alarm
- If the converted .wav file is selected, KAlarm does not show any error, but I can't hear anything.
Therefore I'm pretty sure this is not a duplicate

STEPS TO REPRODUCE
1. Create a new audio alarm
2. Select the audio file (in my case the audio file is a .wav file, stored in ~/Music)
3. Press "try"

OBSERVED RESULT
Nothing plays.

EXPECTED RESULT
The audio file plays

SOFTWARE/OS VERSIONS
Linux/KDE Plasma: 
(available in About System)
KDE Plasma Version: 6.1.0
KDE Frameworks Version: 6.3.0
Qt Version: 6.7.0

ADDITIONAL INFORMATION
Operating System: KDE Neon 6.0
Kernel Version: 6.5.0-41-generic (64-bit)
Graphics Platform: Wayland
Processors: 8 × 11th Gen Intel® Core™ i5-1135G7 @ 2.40GHz
Memory: 15.4 GiB of RAM
Graphics Processor: Mesa Intel® Xe Graphics
Comment 1 David Jarvie 2024-06-26 16:59:37 UTC
If possible, can you please attach the .wav file so that I can test with it. If it's too big, a truncated version which also shows the same fault would be fine.
Comment 2 LTS20050703 2024-06-26 17:15:28 UTC
Created attachment 171023 [details]
An .wav audio file

Ok, here it is (I have checked that with this audio file, KAlarm doesn't play any sounds)

Interestingly, in the new Display Alarm > Sound > Sound File dialog, after I have selected the wav file and press the "test the sound" play button, the button changes to the stop sound button and after ~2 seoncds (which is also the length of the wav file) the button changes to the play sound button again. I think that maybe it has something to do with the audio not being piped to the speaker? Like I'm sure it can play the audio file, it's just not piping the audio to the speaker or something
Comment 3 TraceyC 2024-07-02 18:16:30 UTC
Thanks for the update and providing the wav file. 
I verified I can hear the wav file if I play it with VLC, just to eliminate that as the problem.

I am not able to reproduce the problem in KDE Neon, KAlarm 3.8.1.2
I created a new alarm and used "/usr/share/sounds/oxygen/stereo/alarm-clock-elapsed.ogg"
I created another audio alarm using the provided wav file
When I click Try I hear the sound in both cases, and if I let the alarm go off I hear it as well.

I'll leave this for David Jarvie to take a further look into.
FYI this may be related to https://bugs.kde.org/show_bug.cgi?id=484851
Comment 4 David Jarvie 2024-07-04 14:30:26 UTC
I tested the wav file in both a display alarm and an audio alarm, and it works on my KDE Neon system in both cases. It also works when I press the "test the sound" play button.

Random thoughts:

The wav file which you provided is quite short. Is the result the same for longer files?

Is the audio volume set loud enough to hear it? If you use the volume setting in KAlarm, this can only play as loud as the system volume setting.
Comment 5 LTS20050703 2024-07-06 08:34:10 UTC
> The wav file which you provided is quite short. Is the result the same for longer files?

Yes. The result the same for longer files.

> Is the audio volume set loud enough to hear it? If you use the volume setting in KAlarm, this can only play as loud as the system volume setting.

Yes. The weird thing is that when I press "test the sound" KAlarm doesn't even show up in the applications list of the audio control panel. I only see speech-dispatcher-dummy, whatever that is.
Comment 6 David Jarvie 2024-07-09 19:44:26 UTC
KAlarm has now been converted to use the VLC library to play sound files, which will hopefully fix this bug. The fix will be in KAlarm version 3.9, which will be in the KDE Gear 24.08 release. If the new version doesn't fix it, please reopen this bug report.

Commit https://invent.kde.org/pim/kalarm/-/commit/a3ce5043f2074829156f414cc32075579b3bbf94