**Small update: [Oct.13.19] Remember to also plug your audio into another speaker system as well. Today I thought I had this issue again so I ran the fix and was getting frustrated that it wasn't working. Turns out that my speakers on my old monitor that I am using finally went and now I have to find a low powered replacement so remember to also try hardware as well to make sure it is working (I could have run my phone into the monitor to test it which I eventually did after to double check it was the issue after resetting the monitor as well.)
So recently I have been installing a bunch of programs and been finding some have been causing a weird audio issue with my pi 4 but not to fear instead of wiping the pi and starting over I decided to investigate further and see what I could do to get it to work.
If your audio should be working but isn't on the pi 4 this might be something to try before you reset it.
Now I had it configured properly but still was not getting sound out after installing a few different programs and even had a issue playing with sdr and some games but finally got it working the following way.
First off your audio setting are probably all set back to where they were working before but still no audio.
First thing we will do is run open terminal ctrl + alt + t (or from your quick launch)
type the following in bold.
sudo apt-get remove pulseaudio
now if it comes back that pulseaudio is not installed you will have to install it with:
sudo apt-get install pulseaudio
sudo reboot
after the reboot you will run the removal up top.
Test in terminal if you have sound now it might not be working quite yet we have one more line to run but you should hear something
when played through terminal.
aplay /usr/share/sounds/alsa/Noise.wav
alright a few more quick steps to complete now pulseaudio should be removed we are going to run the following
sudo apt autoremove
sudo /etc/init.d/alsa-utils reset
you can test again before reboot if you hear sound with the aplay command above.
sudo reboot
Now that the unit is rebooted we will select our analogue or HDMI as our default whichever you were using. for me it was the 3.5mm jack
Now open a web browser and go to youtube.com and play a video you should now have sound.
I had tested many different configs for getting the audio to work but this was the method I had to do each time to get my audio back even rasp-config wouldn't play nice with me on this one
So hopefully will help someone and if you have any questions about it or having issues let me know.
If I find any other workaround or fixes for this I will post them up here.
Top Comments