Find the answer to your Linux question:
Results 1 to 2 of 2
hi all I want use my sound device with some program in same time how can i do that. for example: if i listening music and i want start a ...
  1. #1
    Linux User
    Join Date
    Feb 2006
    Posts
    484

    sound device multi acces pleas help

    hi all
    I want use my sound device with some program in same time how can i do that.
    for example:
    if i listening music and i want start a film i need to turn off the music player
    for the sound in the film.
    Can i do that?

    system: debian sarge , 2.6.14.6 , alsa 1.20 , nforce3 based motherboard with itegrated soundcard. i use the integrated card.

    thanks for all help

    have fun!

  2. #2
    Linux Guru antidrugue's Avatar
    Join Date
    Oct 2005
    Location
    Montreal, Canada
    Posts
    3,212
    Well you'll have to properly configure alsa dmix for that.

    It may not work for you (though I think it'll work perfect):

    a) Install the proper sound library (it will replace the old one):
    Code:
    sudo apt-get install libesd-alsa0
    b) Create /etc/asound.conf:
    Code:
    #/etc/asound.conf
    
    pcm.card0 {
    type hw
    card 0
    }
    
    pcm.!default {
    type plug
    slave.pcm "dmixer"
    }
    
    pcm.dmixer {
    type dmix
    ipc_key 1025
    slave {
            pcm             "hw:0,0"
            period_time     0
            period_size     2048 #1024
            buffer_size     32768 #4096
            #periods        128
            rate            48000 #44100
            }
    bindings {
            0 0
            1 1
            }
    }
    
    #done
    c) Now modify /etc/esound/esd.conf to make it look like that:

    Code:
    # /etc/esound/esd.conf
    
    [esd] auto_spawn=1 spawn_options=-terminate -nobeeps -as 2 -d default
    spawn_wait_ms=100
    # default options are used in spawned and non-spawned mode
    default_options=
    #done
    d) Now You need to change the sound server to alsa:
    Code:
    gstreamer-properties
    and change from OSS to ALSA

    e) Restart the computer
    "To express yourself in freedom, you must die to everything of yesterday. From the 'old', you derive security; from the 'new', you gain the flow."

    -Bruce Lee

Posting Permissions

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