如何使Chromium使用其他ALSA设备?


8

我需要在Linux上使用Chromium的一个实例来定位与默认实例不同的声卡,包括Flash。反正有容易做到这一点吗?

Answers:


5

首先,使用aplay -l获取要使用的备用声卡的标识符。在以下示例中,为AUDIO

$ aplay -l
**** List of PLAYBACK Hardware Devices ****
card 0: PCH [HDA Intel PCH], device 0: CONEXANT Analog [CONEXANT Analog]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 0: PCH [HDA Intel PCH], device 3: HDMI 0 [HDMI 0]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 0: PCH [HDA Intel PCH], device 7: HDMI 1 [HDMI 1]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 0: PCH [HDA Intel PCH], device 8: HDMI 2 [HDMI 2]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 1: AUDIO [USB  AUDIO], device 0: USB Audio [USB Audio]
  Subdevices: 1/1
  Subdevice #0: subdevice #0

接下来,创建一个替代的ALSA配置文件(我使用.asoundrc.usb),并用以下内容填充它(基于类似问题的解决方案)。不要忘记AUDIO用上一步中获得的标识符替换。

pcm.usb { type hw; card AUDIO; }
ctl.usb { type hw; card AUDIO; }

pcm.!default pcm.usb
ctl.!default ctl.usb

剩下的唯一事情就是修改浏览器的启动(桌面或菜单快捷方式,脚本,别名等),以将ALSA_CONFIG_PATH环境变量(记录在ALSA项目页面上)设置为您创建的文件。

By using our site, you acknowledge that you have read and understand our Cookie Policy and Privacy Policy.
Licensed under cc by-sa 3.0 with attribution required.