You are not logged in.

#1 2018-06-12 15:09:49

alexanders916
Member
Registered: 2017-05-30
Posts: 42

[SOLVED] Music gets distorted when opening Firefox or Android Emulator

While playing music from spotify (didn't try another music player) and opening Firefox simultaneously, the sound given out of the speakers gets distorted. This behaviour also occurs when opening the android emulator from Android Studio.
You are able to hear to "real music" but also a metallic noise, that's on top of the music. When pausing, the metallic noise needs about 2 seconds to stop and I also noticed that this metallic noise was the music playing, but lagging behind the real progress of the current track. This behaviour is not always reproducable but occurs most of the time. Currently I'm using PA v11.1 with following configuration file:

; /etc/pulse/daemon.conf
; all other properties are left as default
resample-method = src-sinc-best-quality
flat-volumes = no
default-sample-format = float32le
default-sample-rate = 192000
alternate-sample-rate = 192000

When starting a youtube video, or more general, playing music from Firefox, the noise stops. The Emulator is behaving more bizarre - after playing with for some time (turn off/on display, go into apps, rotate screen) the noise stops also. You can't know what event you have to trigger, but you got to trigger one always. While being on Windows my anti virus asked me whether it is okay if the emulator can send/receive audio signals (I don't know which kind of data it transfers by audio), so I'm sure that the Android emulator also affects pulse.

Last edited by alexanders916 (2018-06-12 19:15:30)

Offline

#2 2018-06-12 17:02:14

V1del
Forum Moderator
Registered: 2012-10-16
Posts: 21,676

Re: [SOLVED] Music gets distorted when opening Firefox or Android Emulator

Why are you using that kind of a configuration?  Nearly no source material comes in 192KHz there's a reason the default values are 44KHz and 48KHz you unnecessarily activate a huge resample effort during resampling for a majority of cases. In addition to that src-sinc-best-quality is a no-op and it will fall back to the bad trivial resampler as it has been removed because it wasn't actually better. For a "equivalent" value you will want to use speex-float-10 though lower qualities (like around 5) are often imperceptible anyway.

Offline

#3 2018-06-12 18:58:27

alexanders916
Member
Registered: 2017-05-30
Posts: 42

Re: [SOLVED] Music gets distorted when opening Firefox or Android Emulator

I googled for "make pulseaudio sound good" and found a resource which used this configuration too, but I can't find the resource now (maybe was deleted due to false/old information). So you are suggesting me to lower the resampling frequency and using "speex-float-5/10"? I didn't know that src-sinc-best-quality doesn't exist anymore (that's why I'm posting on Newbie Corner smile ). Why did I think that such a high frequency was needed? My receiver was capable of resampling this, so I though that Linux would get along with that. It worked with 192kHz on Windows (and actually sounded better to me, but maybe this was a placebo), so that's mainly how I justified the usage of it.

EDIT:
After changing my settings to your proposed one, one of my eight cores rises to 13% workload. (I already wondered about the fact that src-sinc-best-quality wasn't adding any workload for my cpu, so thank you for clearing that out)

EDIT 2:
Changing the resampler method alone, didn't help much. The solution was to lower my frequency from 192000Hz to 48000Hz, which sounds similiar I guess. (So my setup now: speex-float-10 (doesn't hit hard when frequency is low) and default resampling frequency is now 48000Hz)

Last edited by alexanders916 (2018-06-12 19:11:12)

Offline

#4 2018-06-12 19:16:42

loqs
Member
Registered: 2014-03-06
Posts: 17,328

Re: [SOLVED] Music gets distorted when opening Firefox or Android Emulator

If the sound sink natively supported 192000Hz and the source material was in that format then there would be no resample and no overhead although pulse mixing other sources in could cancel that out again.

Offline

#5 2018-06-12 19:38:46

alexanders916
Member
Registered: 2017-05-30
Posts: 42

Re: [SOLVED] Music gets distorted when opening Firefox or Android Emulator

loqs wrote:

If the sound sink natively supported 192000Hz and the source material was in that format then there would be no resample and no overhead although pulse mixing other sources in could cancel that out again.

It does support 192kHz natively but spotify doesn't support it natively so that's why pulse has done trouble. Spotify tracks should (after reading the resource) be sampled at 48000Hz, which is why I got low cpu workload (because it doesn't resample).

Last edited by alexanders916 (2018-06-12 19:39:42)

Offline

Board footer

Powered by FluxBB