Linux-Noob Forums
alsa.. multiple sound streams - Printable Version

+- Linux-Noob Forums (https://www.linux-noob.com/forums)
+-- Forum: Linux Noob (https://www.linux-noob.com/forums/forum-3.html)
+--- Forum: Tips and Tricks (https://www.linux-noob.com/forums/forum-59.html)
+---- Forum: Audio and Video (https://www.linux-noob.com/forums/forum-27.html)
+---- Thread: alsa.. multiple sound streams (/thread-2585.html)



alsa.. multiple sound streams - hijinks - 2005-06-21


I know slackware doesn't default to any alsa rc file. Its possible to use the PCM layer of alsa to have more then 1 sound stream doing at the same time. By default all alsa enabled alsa apps look for a file in your home dir called .asoundrc

 

So just use my contents .. results may vary

 



Code:
pcm.ossmix {
   type dmix
   ipc_key 1021          # must be unique!
   slave {
       pcm "hw:0,0"
       period_time 0
       period_size 1024  # must be power of 2
       buffer_size 8192  # dito. It
       #format "S32_LE"
       #periods 128      # dito.
       rate 48000
   }

# bindings are cool. This says, that only the first
# two channels are to be used by dmix, which is enough for
# (most) oss apps and also lets multichannel chios work
# much faster:

   bindings {
       0 0   # from 0 => to 0
       1 1   # from 1 => to 1
   }
}

# Redirect to ossmix
pcm.!default {
   type plug
   slave.pcm "ossmix"     # use our new PCM here
}

# Redirect to ossmix
pcm.dsp0 {
   type plug
   slave.pcm "ossmix"     # use our new PCM here
}

# mixer0 like above
ctl.mixer0 {
   type hw
   card 0
}