Error opening sound device - Audacity Development Manual

# Error opening sound device

From Audacity Development Manual

This error message asks you to check the recording or playback device settings and the Audacity project sample rate. If the message mentions "recording device", it means there's a problem with your Audacity, operating system or sound device recording settings. If the message mentions "playback device", it means there is a problem with your playback settings.

Either message can suggest a problem with the drivers of the sound device, or possibly that you are asking the device to do something it cannot do. For example you will see this error if you attempt to Record to more channels than your device supports, or if you try to overdub on a device that can either record or play back but not both.

The recording device message most commonly occurs on Windows when one of the sound device inputs is not properly enabled or otherwise cannot respond to Audacity's request to start recording.

## Check Audacity Settings

It may be a good idea to try to play or record after checking or changing each of the following Audacity settings. Sometimes a project rate change is all that is needed.

- Set the project rate bottom left of the Audacity window to the standard rate of 44100 Hz (or if your soundcard only supports a particular rate such as 48000 Hz, set the project rate to that). Help > Diagnostics > Audio Device Info... should show the rates the device claims to support.

- Try turning off Transport > Transport Options > Software Playthrough (on/off) (this should never be enabled if recording computer playback).

- Try turning off Transport > Transport Options > Overdub (on/off) because recording while playing could stress your sound device or computer. If this solves the problem, read the Wiki pages Updating Sound Device Drivers and Managing Computer Resources and Drivers for advice on how to make your sound device or computer more capable.

- Check in Device Toolbar that the playback and recording devices are correctly and explicitly selected.
  - On Windows, do not choose "Microsoft Sound Mapper" or "Primary Sound Driver" which point to the current Windows default device; choose the required device by name. Try selecting "Windows Direct Sound" as the "Host" instead of "MME".

## Check operating system settings

- Windows: Follow the Wiki instructions for Windows to configure the Windows sound settings. The key points are:
  - Ensure all available inputs are listed and enabled in the Windows Control Panel.
  - Additionally for Windows: Ensure Default Format for the playback and recording devices contains the same sample rate and number of recording channels as in Audacity.
    - Very rarely, it can help to use 16-bit or 24-bit Default Format then change the Audacity Quality Preferences to that sample format.
    - If necessary, put a checkmark in both Exclusive Mode boxes then set the "Host" in Audacity's Device Toolbar to "Windows DirectSound" and choose a project rate that your playback and recording devices support. Audacity can then request that rate directly from the sound device.

- Mac: In Finder, choose Go > Utilities > Audio MIDI Setup.app. In "Audio Devices", select in turn the required Recording and Playback devices. Set "Format" to the same sample rate, bit-depth and number of recording channels as in Audacity.

- Linux:

While troubleshooting, ensure that Transport > Transport Options > Software Playthrough (on/off) is off. Only enable this option if you really need it, after you have established that Audacity is recording correctly.

1. In the first instance, try refreshing Audacity's list of audio devices at Transport > Rescan Audio Devices then select the default option in Device Toolbar. If the error still occurs, recheck the Audacity settings.
2. It is possible that another application may have exclusive access to the audio device. Try logging out and back in again, then re-check the Audacity settings before opening any other application that may use the audio device.
   - If pulse is an option in Device Toolbar, ensure that you have Pulse Audio Volume Control (pavucontrol) installed. If it is not installed, use your system's package manager to install it. Open Pulse Audio Volume Control and check that there is an available output device.
   - If Jack Audio System is running on the computer, ensure that it is selected as the Host in Device Toolbar.
3. Open the system Sound Preferences and check that a recording device is available. Sound Preferences is often available through a loudspeaker icon on the Desktop, Desktop panel, or in the system Preferences menu.
4. Open AlsaMixer (type alsamixer in a terminal window) and check the soundcard and recording device settings. To view the AlsaMixer manual, type man alsamixer in a terminal window.

## Check sound device drivers and firmware

The computer's built-in sound device should usually have the latest drivers for your operating system, supplied by the motherboard or computer manufacturer. A PCI or external soundcard should usually have the latest drivers and firmware supplied by the manufacturer of the device. See Updating Sound Device Drivers on the Wiki for help with correcting driver issues.

## Check PCI card or external sound device settings and connections

If you use a high-end PCI soundcard or external USB or Firewire interface, you must make the sample rate, bit-depth and number of input channels the same in all possible places. This is especially important if you are recording Multi-Track Overdubs where you play and record at the same time. Settings must match in:

- the Audacity Project Rate
- the track(s) in Audacity (to resample tracks to the Project Rate, select each track in turn then choose Tracks > Resample...).
- all inputs and outputs in the operating system sound control panel or application
- all inputs and outputs in any software or hardware control panel the sound device may have.

Make sure the device is connected properly. "Error opening sound device..." will occur if the device becomes disconnected during an Audacity session and you then try to play or record. Reconnect the device then choose Transport > Rescan Audio Devices

## Links

|< FAQ:Errors