33

I didn't use to have this problem but lately, while I have Google's Android emulator running, my system audio (not talking about the emulator's audio) sounds very distorted and metallic. Sometimes it will work fine for a minute and then start to sound messed up again. As soon as I shut down the emulator, everything sounds fine. I'm having this problem whether I use speakers or headphones. I'm on Ubuntu 18.04 with the latest version of Android Studio.

Does anybody have any clue as to a fix or workaround?

Edit: As a workaround I'm starting the emulator from the terminal with

emulator -noaudio -avd my_avd

This seems to fix the sound issues but is obviously not an ideal solution.

Max
  • 541

2 Answers2

37

I did what was written on this link and it solved the problem for me.

In /etc/pulse/default.pa change load-module module-udev-detect to load-module module-udev-detect tsched=0

and in /etc/pulse/daemon.conf change ; default-sample-rate = 44100 to default-sample-rate = 48000

Finally, restart pulseaudio with pulseaudio -k (or you simply restart the computer)

1

it partially worked for me. I use a 25 inch monitor next to the notebook with my speakers connected to the monitor and with ubuntu 22.04.

When running both commands, I was no longer able to manually configure the speakers in the OS configuration menu and the sound only worked on the notebook (I didn't want that).

I deleted the second command (default-sample-rate = 48000) and kept the first one (load-module module-udev-detect tsched=0). After resetting pulseaudio it worked fine.

Detail: By default in the pulseaudio configuration of my PC, there was no 'default-sample-rate', not even in the old amount quoted in the post (default-sample-rate = 44100)