Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 638585
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 13, 20262026-05-13T20:44:54+00:00 2026-05-13T20:44:54+00:00

I am trying to write an audio application using PortAudio, but if any other

  • 0

I am trying to write an audio application using PortAudio, but if any other audio programs (usually Firefox) are running at the time which I try to run my program, I get the following error:

PaHost_OpenStream: could not open /dev/dsp for O_WRONLY
PaHost_OpenStream: ERROR - result = -10000
An error occured while using the portaudio stream
Error number: -10000
Error message: Host error.

Obviously, this makes my program pretty useless since it won’t work if another program is using sound. Is there a way to get around this or should I just not use PortAudio?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-13T20:44:54+00:00Added an answer on May 13, 2026 at 8:44 pm

    You need to choose a device named “pulse” for PortAudio to work with PulseAudio, which is the sound server used for sound card sharing on the biggest Linux distros nowadays. The error message suggests that it is trying to use the OSS /dev/dsp interface, which does not support card sharing at all.

    You can use code like this for listing the devices:

    for (int i = 0, end = Pa_GetDeviceCount(); i != end; ++i) {
        PaDeviceInfo const* info = Pa_GetDeviceInfo(i);
        if (!info) continue;
        printf("%d: %s\n", i, info->name);
    }
    

    Then supply the right number to OpenStream within stream parameter.

    Notice that you need PortAudio v19. The older v18 only supported OSS.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am trying to write a C++ program which plays real-time processed audio. I
I'm trying to write a simple command line audio player using the Python Gstreamer
I've been trying to write a video+audio using AVAssetWriter and AVAssetWriterInputs. I read multiple
I am trying to make a peer 2 peer audio/video application, but behind NAT
I am trying write a function that generates simulated data but if the simulated
Trying to write out syslog entries containing strings but they don't register. // person.name
I'm trying to write an .m file to extract energy features from an audio
I'm trying to write a voip app for Android, using the Android SIP API
I am trying to write a app.config / web.config error correcting app which will
I'm trying to write something like Perl Audio Converter , so I need to

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.