Widora_NEO: 3个声卡同时播放不同节目

有个朋友问起,今天实验了一下,还真的可以!
好吧,我只有3个声卡。
!

步骤也很简单:
1) 编辑 /etc/asound.conf 做成如下:

pcm.dmix0 {
type dmix
ipc_key 102466
slave {
pcm "hw:0,0"
period_time 0
period_size 1024
buffer_size 1024
rate 8000
}
bindings {
0 0
1 1
}
}

pcm.dmix1 {
type dmix
ipc_key 102488
slave {
pcm "hw:1,0"
period_time 1024
period_size 1024
buffer_size 1024
rate 8000
}
bindings {
0 0
1 1
}
}

pcm.dmix2 {
type dmix
ipc_key 102499
slave {
pcm "hw:2,0"
period_time 1024
period_size 1024
buffer_size 1024
rate 8000
}
bindings {
0 0
1 1
}
}

2) 用mplayer在后台播放不同节目:

screen -dmS DIMX0 mplayer -ao alsa:device=dmix0 mms://60.199.213.68/15
screen -dmS DIMX1 mplayer -ao alsa:device=dmix1 mms://60.199.213.68/16
screen -dmS DIMX2 mplayer -ao alsa:device=dmix2 mms://60.199.213.68/18

有一个声卡会比较卡一点。效果如下: