Error Opening Sound Device
- If you get an error like this "Error Initializing Audio: There was an error initializing the audio i/o layer. You will not be able to play or record audio. Error: Host error." then audacity cannot access your sound card. Audacity cannot use the audio i/o layer when it is in use by another application. If you are using Gnome, KDE or another window manager, be sure to disable the system sounds before starting Audacity.
- If this still happens when nothing else is using audacity then you may have a sample rate selected that your card does not support. You can alter this by changing the Project Rate at the bottom left of the screen.
- Another possibility is that somehow, the link to /dev/dsp, or its permissions, were changed without your knowledge by an unknown process. What you should do (as root) is:
$ rm /dev/dsp;ln -s /dev/dsp0 /dev/dsp #also try /dev/dsp1,2,etc. $ chmod 666 /dev/dsp0 $ chmod 666 /dev/dsp
If you are using udev in the 2.6 kernel then you may need to alter /etc/udev/rules.d/*.rules to set the correct permisions up permanently.
- If you are running a sound server as eSound, asd or aRts you will have to disable it before using Audacity. Check the last part of this URL: http://audacity.sourceforge.net/unix.php For users with OSS builds of audacity and aRts, you can also use the wrapper provided by aRts and run:
- $ artsdsp audacity
- to launch audacity.
OSS vs ALSA
One issue with using Audacity on Linux is that there are two different audio systems:
- OSS (Open Sound System) has been around for a long time and is built-in to most Linux kernels. It works fine for 44100 Hz, stereo, 16-bit audio with ordinary sound cards and typical requirements. It's rather inadequate for professional audio work(*1). Audacity fully supports OSS by default.
- ALSA (Advanced Linux Sound Architecture) is newer, and doesn't support quite as many older sound cards, but it supports many newer ones and supports many advanced and professional features(*1). It is standard in the current 2.6 kernel. Audacity supports ALSA in two ways:
- ALSA comes with an OSS emulation layer. This is what Audacity will use by default if you don't do anything special. Unfortunately the OSS emulation layer is buggy on some systems, and so performance will typically be worse than if you use ALSA or OSS natively. If your system doesn't load OSS emulation at boot-up, you may have to load it manaually by running audacity as
- $ aoss audacity
- Audacity can use ALSA natively if you compile it to use PortAudio v19 instead of the default, v18. Note that v19 is still evolving and not as well tested, but it is the only way that Audacity supports ALSA. Many users have reported good experiences with it. To use it, reconfigure Audacity like this:
- ./configure --with-portaudio=v19 --without-portmixer
(*1)- This is actually incorrect, ALSA does not provide support, yet, for highend professional audio cards that have both 4dB and 10dB stepping. ALSA only currently supports 10dB stepping, this is a well known ALSA mixer issue and frequently addressed on ALSA's forums. Search for envy24 or any of the M-audio cards)
If configure fails, with errors like:
- $ configure: warning: CC=gcc: invalid host type
- $ configure: error: can only configure for one host and one target at a time
- $ configure: error: /bin/sh './configure' failed for lib-src/portaudio-v19
then put "env -i" in front of the command to supress the CC and CXX environment variables.
- $ env -i ./configure --with-portaudio=v19 --without-portmixer
You may also need to make clean before re-compiling if you have already built audacity with different configure options.
- $ make clean
Portaudio v19 from repository
If you are having issues, try a newer portaudio snapshot:
- clear audacity-src-1.2.x/lib-src/portaudio-v19/
- download pa_snapshot_v19.tar.gz from http://www.portaudio.com
- untar into directory mentioned above
- go back to audacity-src and run ./configure..., make, make install again
There's a whole separate page on this: CompilingAudacity.
A more basic approach to the compiling business can be found at CompilingAudacityForBeginners
If you have troubles with recording audio through your USB-microphone, go here:
VST plugins in Linux
If you are really keen on trying VST plugins in Linux, you should check out this site:
Although it is a little outdated, perhaps it is possible to get something up and running.
Also check out http://www.joebutton.co.uk/fst/.
Testing Audacity 1.3.0b or CVS Head
Audacity 1.3.0 beta is not a stable release. However, it contains a number of improvements, among others; native ALSA support using portaudio v.19. If you have issues trying to compile Audacity beta versions take a look at Audacity_1.3_beta_testing.