参考网上关于alsa的资料,针对俺的两块声卡写的配置文件/etc/asound.conf
pcm.soundcard0 {
type hw
card 0
device 0
}
pcm.dmixer0 {
type dmix
ipc_key 1024
slave {
pcm "soundcard0"
period_time 0
period_size 1024
buffer_size 4096
rate 48000
}
bindings {
0 0
1 1
}
}
pcm.mixin0 {
type dsnoop
ipc_key 5978293 #must be unique for all dmix plugins!!!!
ipc_key_add_uid yes
slave {
pcm "hw:0,0"
channels 2
period_size 1024
buffer_size 4096
rate 48000
periods 0
period_time 0
}
bindings {
0 0
0 1
}
}
pcm.asymed0 {
type asym
playback.pcm "dmixer0"
capture.pcm "mixin0"
}
pcm.plugsoundcard0 {
type plug
slave.pcm "dmixer0"
}
pcm.dsp0 {
type plug
slave.pcm "asymed0"
}
ctl.mixer0 {
type hw
card 0
}
pcm.soundcard1 {
type hw
card 1
device 0
}
pcm.dmixer1 {
type dmix
ipc_key 1024
slave {
pcm "soundcard1"
period_time 0
period_size 1024
buffer_size 4096
rate 48000
}
bindings {
0 0
1 1
}
}
pcm.mixin1 {
type dsnoop
ipc_key 5978293 #must be unique for all dmix plugins!!!!
ipc_key_add_uid yes
slave {
pcm "hw:1,0"
channels 2
period_size 1024
buffer_size 4096
rate 48000
periods 0
period_time 0
}
bindings {
0 0
0 1
}
}
pcm.asymed1 {
type asym
playback.pcm "dmixer1"
capture.pcm "mixin1"
}
pcm.plugsoundcard1 {
type plug
slave.pcm "dmixer1"
}
pcm.dsp1 {
type plug
slave.pcm "asymed1"
}
ctl.mixer1 {
type hw
card 1
}
mplayer配置文件中关于声音输出设备的一行
ao=alsa:device=plugsoundcard1
阅读(1066) | 评论(0) | 转发(0) |