Buzzing noise when changing volume while the audio is playing
Categories
(Core :: Audio/Video, defect, P3)
Tracking
()
People
(Reporter: sefeng, Unassigned)
Details
Attachments
(3 files)
I am using Linux and running Firefox 66.0.3
Please play the attached file in Firefox.
While the audio is playing, changing the volume would cause the audio start buzzing.
This issues seems only happen on Linux, and I don't see the same issue on Chrome. Actually, Chrome does it smart, it turned off the volume entirely during the volume is changing.
I feel this could be a Linux thing because I experience the same issue when I play the file in a music player locally.
Reporter | ||
Comment 1•6 years ago
|
||
I noticed this url returns 403 (However it works fine on my personal machine). I'll update the bug.
Reporter | ||
Comment 2•5 years ago
|
||
Added a test file that can reproduce the problem.
Reporter | ||
Updated•5 years ago
|
Comment 3•5 years ago
|
||
Based on this getting more actionable only in comment 2, Nico - could you triage this?
Comment 4•5 years ago
|
||
Sean, does your linux desktop environment make an indicator noise when you change your volume? I suspect we are configuring the pulse audio output to a 48Khz sample rate, and when the system plays a sound it reverts the device to its default sample rate which is probably 44.1Khz.
The pulse audio config is usually in /etc/pulse/daemon.conf
. You may want to make a copy of that before proceeding. Would you be willing to try looking for the line ;default-sample-rate = 44100
and adding a new line default-sample-rate = 48000
under it? (Note the lack of ; at the beginning.) Then you can restart your machine, and test again.
Reporter | ||
Comment 5•5 years ago
|
||
Hi Nico, I tried the that, it didn't work. I still hear the same noise, and I don't think it is indicator noise. I just tried to play the same audio on Brave Browser, and it didn't produce this buzzing noise, so I feel it is our problem...
Comment 6•5 years ago
|
||
FWIW I cannot reproduce this on Ubuntu 18.04. Sean, can you share more specifics about your machine setup? Would you be able to record the buzzing noise as it happens to you?
Paul, does this ring any bells to you?
Comment 7•5 years ago
|
||
Also, are you changing system volume or media element volume?
Comment 8•5 years ago
|
||
Sean, would you mind giving us the following info:
- the result of
grep "flat-volume" /etc/pulse/daemon.conf
on the affected system. - the result of
pactl list
on the affected system
in addition to Andreas' question above (system or application volume).
Reporter | ||
Comment 9•5 years ago
|
||
Reporter | ||
Comment 10•5 years ago
|
||
the result of grep "flat-volume" /etc/pulse/daemon.conf on the affected system: https://pastebin.com/MmVy04bH
the result of pactl list on the affected system: https://pastebin.com/GwtAfWCq
I was changing media element volume.
In terms of the setup, I didn't do anything special, I was running PopOS which was based on Ubuntu 19.04.
I attached a video to show what I heard.
Please feel free to ask me to provide more info.
Comment 11•5 years ago
•
|
||
Can you flip with the pref media.cubeb.sandbox
to false and retry ?
Reporter | ||
Comment 12•5 years ago
|
||
Still the same issue.
Comment 13•5 years ago
|
||
If that still happens after restart it's a bug in pulse. Maybe we should just stop trying to use their volume API altogether.
Reporter | ||
Comment 14•5 years ago
|
||
It became even worse after I did a restart withmedia.cubeb.sandbox
set to false. I heard the noises regularly and I didn't event need to adjust volume.
Do we know what Chromium does? It works perfectly for me in Brave Browser.
Comment 15•5 years ago
|
||
I aligned the samples in audacity, the noisy sample is the right channel, and the clean sample is the left channel. You can see that there is a significant sync drift in only 11 seconds of playout.,
Comment 16•5 years ago
|
||
Yeah it's under-runs, thanks for confirming it Nico. This might be because we lock the pulse main loop and wait for the volume operation to complete, in the pulse backend.
I'll try to get you a build today to check things, as I can't repro.
Chromium applies the volume on the client side (i.e. in the Chromium process), instead of using the PulseAudio API. This works, but the following scenario:
- Play with volume to 1.0
- Pause
- Set volume to 0.0
- Play
results in an audible burst of audio after muting (unlike using the PulseAudio API, where the gain is applied in the PulseAudio mixer). This is what we do is flat-volume
is enabled, because it has other problems.
Reporter | ||
Comment 17•5 years ago
|
||
When I played the music in Brave, it didn't pause the audio and didn't produce any noises, so it sounds like they made some adjustments?
Comment 18•5 years ago
|
||
No they simply do the volume in their process. I don't know why Chrome pauses the media.
Comment 19•5 years ago
|
||
It seems that this issue is not reproducible for everyone, so I am going to make it as P3. Free feel to re-prioritize it.
Updated•2 years ago
|
Description
•