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 6912811
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T09:08:19+00:00 2026-05-27T09:08:19+00:00

I want to playback some audio data using ALSA to a PCM device. As

  • 0

I want to playback some audio data using ALSA to a PCM device. As an example I have downloaded this sample example and run it in my PC. It works fine when no other process is currently using the sound card. But it doesn’t play anything when some other process uses the audio device (i.e., media player playing songs) and shows following error –

Playback open error: Device or resource busy

Looking at the source code of this example I could say that the snd_pcm_open function at line 882 is throwing this error. It finds the device busy since another process is currently using it.

I also tried the reverse way – first started the example then tried to start a song. In this case the media player stays idle, showing “idle” just beside the progress bar (I am using Banshee). I am assuming that snd_pcm_open gains exclusive right of the device resource so that no other process can use it.

But I don’t want that. I want to play sound to a audio device without requiring any exclusive rights so that other processes in the PC can share the same device for outputting audio data.

How can I do that? How can I open a PCM device so that other processes can also share the same device?

  • 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-27T09:08:19+00:00Added an answer on May 27, 2026 at 9:08 am

    I couldn’t find a way to share a device between multiple processes. I tried to use the dmix plugin to combine multiple playback streams using the .asoundrc configuration file but that didn’t work for some reason. I tried to use the default device of my sound card but that didn’t work too. According to a recommendation in ALSA mailing list I tried to open the default device using default:CARD=x as the device name parameter to the snd_pcm_open function which results in a device not found error in my system. Apparently there is no way to do this (if someone can find a way, please update this answer).

    Rather than using ALSA, I used PulseAudio next which solved my problem.

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

Sidebar

Related Questions

I have implemented audio playback using AVPlayer, playing a remote mp3 url. I want
I want to play audio files with different playback rates using GStreamer . This
I have an audio player and I want to show the current time of
I have a render loop that I want to run in the background so
I want to display videos using Flash (for older, non-HTML5 video browsers). This is
I want to play back WAV sound (audio track of some custom video format)
HI, Anyone suggest some sample and idea to post the video data to server.I
I am a newbie writing code for sound playback via alsa api. I have
want to know why String behaves like value type while using ==. String s1
want to have a Hyperlink-Button in a gridView in which I can display a

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.