by suxixb | 星期五, 10月 26, 2007 15:39

在 7.10 上实现混音

参考资料:《如何混音》

也许您会遇到这种情况,在打开两个应用程序时,如同时打开 Rhythmbox 播放音乐和 Smplayer 看电影,只能听到 Rhythmbox 或 Smplayer 其中一个的声音,两种声音不能同时出现,其实这是因为您的声卡需要“软混音”,如果您也是使用 ALSA 音效构架,解决这个问题并不难。

首先安装需要的软件包

sudo apt-get install alsa-oss

创建或修改下列的文件

sudo gedit /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 1024
buffer_size 4096
periods 128
rate 44100
}
bindings {
0 0
1 1
}
}

修改配置文件

sudo gedit /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=

到 “系统”—“首选项”—“音效” ,按照下图设置

screenshot-alsa-mixing.png

好了,现在再打开 Rhythmbox 播放音乐和 Smplayer 看电影,可以同时听到两个声音了,问题解决。

标签:,


延伸阅读

Tags: ,

Leave a Reply