Find the answer to your Linux question:
Results 1 to 8 of 8
I've had this annoyance for quite some time now, and I think it's time I solved it. When I try to play multiple sounds on my system, it doesn't work. ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Linux Engineer Javasnob's Avatar
    Join Date
    Jul 2005
    Location
    Wisconsin
    Posts
    942

    Multiple sounds with ALSA


    I've had this annoyance for quite some time now, and I think it's time I solved it.

    When I try to play multiple sounds on my system, it doesn't work. For example, if I'm running XMMS, and I wanted to play something with MPlayer for some reason, I'd start it up, and MPlayer would inform me that the audio device /dev/dsp was busy. This problem is minor; such occasions are few and far between. However, it comes in handy with IM alarms and other such things. So, I guess my question is...how can I configure ALSA to allow multiple programs access to /dev/dsp?

    Thanks in advance for any and all help you can offer!

  2. #2
    Just Joined!
    Join Date
    Dec 2005
    Posts
    13
    http://alsa.opensrc.org/index.php?page=DmixPlugin

    But you would have to configure your programs to use ALSA as the sound output and not OSS, for this to work smoothly.

  3. #3
    Linux Engineer Zelmo's Avatar
    Join Date
    Jan 2006
    Location
    Riverton, UT, USA
    Posts
    1,001
    Sound daemons, such as ARTS in KDE and ESD in GNOME, are supposed to allow multiple simultaneous sounds for hardware that doesn't do its own sound mixing. Check to see if you have one of those running, and if not, start the appropriate one.
    Stand up and be counted as a Linux user!

  4. #4
    Linux Engineer
    Join Date
    Jul 2003
    Location
    Farnborough, UK
    Posts
    1,305
    Multiple processes accessing the sound server is one of my big bugbears in linux.

    I can't work without listening to music and with the advent of Skype / Gizmo I also need audi to work with them.

    In the past I've run both ALSA and OSS and bunged each process through one or t'other.

    Or in something like dynebolic used Jack to collect the inputs and bung them through ALSA.

    When linux can get an equivalent sound capability as Windows (not withstanding latency) will be a good day in my book.
    Lansbury's Lido

    thekiadriver on #linuxforums - fleetingly

  5. #5
    Linux Engineer Javasnob's Avatar
    Join Date
    Jul 2005
    Location
    Wisconsin
    Posts
    942
    I just got it working! Thanks to everyone for all your help!

  6. #6
    Linux Engineer Zelmo's Avatar
    Join Date
    Jan 2006
    Location
    Riverton, UT, USA
    Posts
    1,001
    Wonderful! Please tell us what you had to do, in case someone else also needs to know.
    Stand up and be counted as a Linux user!

  7. #7
    Just Joined!
    Join Date
    Nov 2005
    Location
    Belgium
    Posts
    22
    Quote Originally Posted by Zelmo
    Wonderful! Please tell us what you had to do, in case someone else also needs to know.
    I'm having the same problem right now. So yes, please tell us

  8. #8
    Linux Engineer Javasnob's Avatar
    Join Date
    Jul 2005
    Location
    Wisconsin
    Posts
    942
    Well, I made the following changes:

    - For XMMS, I used the ALSA output plugin with plug:dmix as the output.
    - For MPlayer, I added the following lines to /etc/mplayer.conf:
    Code:
    ao=alsa:device=plug=dmix
    adevice=dsp0
    - For everything else, I created the file ~/.asoundrc (Make sure you specify this in the files section of /usr/share/alsa/alsa.conf) and put this in it:
    Code:
     
    pcm.dsp0 {
       type plug
       slave.pcm "dmix"
    }
     
    ctl.mixer0 {
      type hw
      card 0
    }
    That's all there is to it! I hope this helps!

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •