Fuzzy audio after starting Audacity

Hello,

I am running Audacity 2.0.5 on Ubuntu 14.04. Recording and playing back through pulseaudio. Whenever I start Audacity, whether it is to record a track or play a previously recorded track, I hear audio that is fuzzy and distorted in a way to suggest that it is being poorly resampled. This happens to all of my system audio, not just the playback from Audacity. After quitting the program, the problem persists with all of the other audio that I try to play. The only way to restore the sound quality is to either restart the computer, or reload ALSA using

pulseaudio -k && sudo alsa force-reload

which sometimes works and sometimes doesn’t.

From what I can tell, this issue does not affect recording audio. That is, I can record a track, export to a wav file, quit audacity and restart ALSA, and then play the wav file in my media player and it sounds fine. It seems like the ALSA or pulseaudio playback settings are getting messed up by Audacity, but I have checked that all the default sample rates are the same and I don’t know what else to try. No matter what settings I put in Audacity, the audio playback is messed up as soon as I start the program. Does anyone have any suggestions as to what could be going on here?

Thanks,
Gawain

Does the problem occur if you only, start Audacity and then shut down Audacity? (without playing, recording or anything with Audacity)?

Yes, it happens as the program is starting. In fact I just tested that by playing music in the background while loading audacity, there was a brief hesitation in the playback during the splash screen, and it came back fuzzy just as the main window was appearing. After that, pressing record or play or stop or changing settings does not affect the playback at all.

I’m guessing that Audacity is loading some module that isn’t interfacing properly with either pulseaudio or ALSA. But I’m stumped as to what it could be.

That is to be expected because Audacity (or to be more precise, “PortAudio”) is looking to see what audio devices are available. However the disturbance should not last more than a few moments. It sounds to me like the sound card drivers are responding in an unexpected way to the scan. What sound card(s) do you have in your computer?

Yes the hesitation was brief, basically just a slight blip in the playback. However that is definitely when it started sounding different
My soundcard:

05:03.0 Multimedia audio controller: Creative Labs SB Audigy (rev 04)
	Subsystem: Creative Labs Device 2006
	Flags: bus master, medium devsel, latency 64, IRQ 19
	I/O ports at c8c0 [size=64]
	Capabilities: [dc] Power Management version 2
	Kernel driver in use: snd_emu10k1

05:03.1 Input device controller: Creative Labs SB Audigy Game Port (rev 04)

As far as I know, there are no proprietary drivers being used and the sound drivers installed by ubuntu have worked perfectly out of the box until now.

If I had been asked to guess, I would have guessed that it was an Audigy sound card.
Unfortunately Audigy sound cards have known problems on Linux. Basic features usually work without issue, but the advanced features are frequently buggy. The situation is not helped by a lack of technical information from Creative Labs, making it difficult for Linux developers to provide good drivers (and no drivers for Linux provided by Creative Labs).

After launching Audacity, open Alsa Mixer in a terminal window.
To do that, open a Terminal window and enter:

alsamixer

Press F6 and select the Audigy device.

Press F5 to view all controls (you will probably need to scroll to see all of them).

Check that none of the controls are maxed out. Settings that are turned up into the red (about 70%) are likely to distort.

Are you able to find settings that give clear recording and playback?

I went into alsamixer after starting audacity and there were several controls maxed out (Including PCM front, center, side, as well as Headphones). However, adjusting them did not seem to have any effect on playback, the only one that had any effect was “master” which just changed the overall volume. Changing the others did not seem to noticeably change the volume, balance, or distortion of the playback either. For example, turing the Bass/treble all the way up or down didn’t do anything, even after stopping and restarting playback in Audacity.

Is it possible that something else (pulseaudio?) is taking control of the sound card and is there a way I can look at the level settings for that? the “PulseAudio control panel” has everything set to a normal level and the meters don’t show any clipping.

You can make Audacity bypass PulseAudio and use the ALSA drivers directly by selecting the “hw” options for the recording and playback devices in the device toolbar.

Ok, selecting the direct output does allow me to use alsamixer. However adjusting those levels does not restore the quality of sound but instead just changes the volume. Also, I noticed that if I adjust the master volume level (using the volume up/down buttons on my keyboard), the along with all the different surround channel levels immediately go to 100% and stay there until I adjust them back down individually. Is that normal?

I still haven’t found anything that restores the audio quality apart from reloading ALSA.

That definitely looks like buggy drivers to me, but I think we knew that anyway.

The commands cat /proc/asound/cards and aplay -L will give you information about your sound card.
Armed with that information, I’d suggest searching the Ubuntu forums for similar issues (and hopefully a solution).

I don’t think the problems will be insurmountable because there are millions of SoundBlaster cards in use, but there are also very many models, versions and hardware revisions with little official (manufacturer) documentation, so finding the right solution for your specific sound card could require heavy use of Google Search. Because the main issue that you report is with playback - I can’t hear that, so it is difficult for me to even guess what the actual problem is.

If all else fails, it could be worth trying your sound card on a different Linux distribution, or even running the Windows version of Audacity in Wine. (The performance of Audacity in Wine may be sluggish, so it’s not at the top of my recommendations, but it could provide a usable workaround).

Same here with Xubuntu 14.04 + Audigy 2 ZS. Looks like it wasn’t quite the best choice of discrete sound card. :slight_smile:
But it’s good to know the problem goes away after a reboot - I hadn’t noticed that since I was re-testing with Audacity every time, so thank you for the information.