Bug 409525 - Weird noise when moving the Speakers slider
Summary: Weird noise when moving the Speakers slider
Status: RESOLVED FIXED
Alias: None
Product: plasma-pa
Classification: Plasma
Component: applet (show other bugs)
Version: 5.16.2
Platform: Arch Linux Linux
: NOR minor
Target Milestone: ---
Assignee: David Rosca
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2019-07-05 11:46 UTC by steddy
Modified: 2019-08-08 16:35 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In: 5.17.0


Attachments
When you drag the Speakers slider, there is a weird noise. (1.66 MB, video/mp4)
2019-07-05 11:46 UTC, steddy
Details

Note You need to log in before you can comment on or make changes to this bug.
Description steddy 2019-07-05 11:46:17 UTC
Created attachment 121334 [details]
When you drag the Speakers slider, there is a weird noise.

SUMMARY
When you drag the Speakers slider, there is a weird noise.

STEPS TO REPRODUCE
Just drag the slider.

OBSERVED RESULT
The noise is similar to this one: https://www.youtube.com/watch?v=S4Mp1vzb8K8

EXPECTED RESULT
A "better" sound effect.

SOFTWARE/OS VERSIONS
Operating System: Arch Linux 
KDE Plasma Version: 5.16.2
KDE Frameworks Version: 5.59.0
Qt Version: 5.13.0
Kernel Version: 5.1.15-arch1-1-ARCH
OS Type: 64-bit
Processors: 8 × Intel® Core™ i7-8565U CPU @ 1.80GHz
Memory: 7.5 GiB of RAM
ssss
ADDITIONAL INFORMATION
If you turn up the volume with the keyboard, there is the usual the popping sound. If you listen carefully, it has a subtle white noise transient at the beginning. I believe that the weird noise that is produced when dragging the slider is because the system reproduces the popping sound an abnormal amount of times in a short time frame. Perhaps, this could be solved by lowering the amount of times that the popping sound is emitted; or by removing the white noise transient.
Comment 1 Christoph Feck 2019-07-25 12:22:04 UTC
Remove the noise in the following file (using audacity or kwave):

/usr/share/sounds/freedesktop/stereo/audio-volume-change.oga

When the sound is played faster than it durates it still causes crackling noise. Either the rate should be limited to the length of the sound, or some mixing needs to be done to avoid the crackling noise between pulses, but I am not sure if the pulseaudio daemon emits the sounds on volume changes, or if plasma-pa handles it itself.
Comment 2 Nate Graham 2019-08-08 16:35:34 UTC
Git commit a420dd6be1a9a5b51c50074ce9d09b77a0a5cbbe by Nate Graham, on behalf of Kezi Olio.
Committed on 08/08/2019 at 16:35.
Pushed by ngraham into branch 'master'.

Avoid garbling the sound if the volume slider is moved fast

Summary:
The audio should not be garbled if you move fast the audio slider  (it distorts because it stops and plays the feedback sound every few milliseconds)

An alternative approach is to `return`; if the `ca_context_playing` says that the sound is still playing, but that gives less "resolution"
Related: bug 410716
FIXED-IN: 5.17.0

Reviewers: #plasma, drosca, davidedmundson, ngraham

Reviewed By: #plasma, davidedmundson, ngraham

Subscribers: anthonyfieroni, filipf, ngraham, davidedmundson, plasma-devel, kezik

Tags: #plasma

Differential Revision: https://phabricator.kde.org/D22316

M  +4    -4    applet/contents/ui/ListItemBase.qml

https://commits.kde.org/plasma-pa/a420dd6be1a9a5b51c50074ce9d09b77a0a5cbbe