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

The Archive Base Latest Questions

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

I have the following code in the .asoundrc file in my home directory –

  • 0

I have the following code in the .asoundrc file in my home directory –

pcm.lol
{
    type dmix
    ipc_key 1024
    ipc_key_add_uid true
    slave{
        pcm "hw:0,0"
        period_time 125000
        rate 48000
        format S32_LE
        channels 2
    }
}

When I run this sample example it works fine (I changed the device name to plug:lol). I can hear a sound playing in my headphones. The problem occurs when two or more processes try to output audio data at the same time. In this case, the later process cannot output its audio data properly.

For example, I ran a media player which was playing a song and then I tried running that example. I couldn’t hear any sound from it, all I could hear was the music playing in the media player. Similar thing happens when I run this example first and then the media player, in which case I only listen audio output from my example.

How can I solve this problem? Is there any error with my pcm device configuration? Or do I have to provide any additional PCM configuration parameters in the example code ?

Also, it would have been really nice if I could create this logical device configuration programmatically rather than using a configuration file like this.

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

    As far as I have searched and checked, there is apparently no concrete way to do this in ALSA. I can share the built-in default device between multiple processes, but any other configuration didn’t provide this functionality. Also, I couldn’t find any programmatic way to configure an ALSA device. The configuration file seems to be the only way to do this.

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

Sidebar

Related Questions

I have following code to serialize my data into a file: out = new
I have following code: $boxId = 1; $explainationBox='<input type=button id=<?php echo $boxId; ?> value=send
I have following code in the html file: <div class=navbar navbar-fixed-top> <div class=navbar-inner> <div
I have following code: package main import ( fmt ) type Point struct {
I have following code #file 1 a.pm package a; @Export=(test); print test; #hashing this
I have following code. It saves file but with empty content. What's wrong with
I have following code: div.accountPage div.acct-form.login div.acct-header Log-in form.loginForm.login input(id=username, type=text, name=User, placeholder=Username, value=)
I have following code: INPUT Input = { 0 }; Input.type = INPUT_KEYBOARD; Input.mi.dwFlags
I have following code : // Read properties file. Properties properties = new Properties();
I have following code for opening files programatically: Uri path = Uri.fromFile(file); Intent intent

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.