Error opening sound device

From Audacity Development Manual
Jump to: navigation, search
This error message asks you to check the recording or playback device settings and the Audacity project sample rate.

There are three forms of this message

  • Error opening recording device - Error code -xxxx this means there is a problem with your Audacity, operating system or sound device recording settings, where xxxx is replaced by a numeric code.
  • Error opening recording device - Error code -xxxx this means there is a problem with your playback settings, where xxxx is replaced by a numeric code.
  • Error opening sound device ... this is a generic message that is usually associated with a failure to start the audio stream.

These messages 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.

See the Numeric error codes section for details of the particular codes.

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.

Contents

  1. Microphone and input device problems
  2. Check Audacity settings
  3. Check sound device drivers and firmware
  4. Check sound device drivers and firmware
  5. Check PCI card or external sound device settings and connections
  6. Windows WASAPI: Recording from a USB device
  7. Numeric error codes



Microphone and input device problems

Windows

For some users Windows 10 is now blocking Audacity from using the microphone, on the basis of privacy settings.

After upgrading to version 1803 of Windows 10 (April 2018), a small number of users have been reporting that the microphone is getting detected, but it does not pick up any sound.

In order to get around this issue, Microsoft recommends that you need to enable the microphone in your Privacy settings using these steps:

  1. Open Settings
  2. Click on Privacy
  3. Click on Microphone
  4. Turn on the Allow apps to access your microphone toggle switch.

See this Microsoft website for more details.

Mac

A problem of no recording level in Audacity is occurring quite frequently on Mojave, Catalina and later, due to Apple changing the Privacy settings for recording devices (making it more conservative, "safer"). Note that, although macOS refers to this setting as Microphone, it applies to all recording devices, including external USB / Thunderbolt interfaces.

To fix this problem:

  1. On your Mac, choose Apple menu > System Preferences then click Security & Privacy in the left-hand menu and the click the Privacy tab.
  2. Click Microphone in the left-hand menu.
  3. Select the checkbox next to an application (Audacity) to allow it to access the microphone.


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 44,100 Hz (or if your audio interface only supports a particular rate such as 48,000 Hz, set the project rate to that). Help > Diagnostics > Audio Device Info... should show the rates the device claims to support.
  • 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 instructions for Windows to access and configure the Windows Sound settings. The key points are:
    • Ensure all available inputs are listed and enabled in the Windows Sound dialog.
    • 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 audio interface 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 sound card 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 sound card 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


Windows WASAPI: Recording from a USB device

You may get this error if you set Audacity to record from a USB device and playback through your onboard soundcard with the Audio Host set to WASAPI.

We believe that this is likely to be a problem with Microsoft's WASAPI not liking working with two devices at once. There is no fix that we can make in Audacity.

Workarounds

  • Use MME or Windows Direct Sound as your Audio Host
  • Use your USB device for both input and output (not possible if recording from a USB turntable or USB tapedeck)


Numeric error codes

  • -9996 Invalid device: this means that the sound device is not valid, if it is an external sound device:
    1. it may have been unplugged
    2. you may have a faulty or loose connection
    3. you may have a bad lead
    4. the device itself may be faulty.
  • -9997 Invalid sample rate: make sure that you have matched the sample rate in Audacity with that set on your device - both for playback and recording.
  • -9999 Unanticipated host error: this means means "something is wrong". And appears to most often be due to either:
    1. A lost connection to a USB audio device.
    2. Recent Windows / Mac update requiring that user gives permission for Audacity to access the microphone.

Links

|< FAQ:Errors