问题描述
当我尝试执行附带的audioOutputExample时,会收到
设备(hw:0,0),设备或资源忙时,
即使我以前使用过Rhythmbox,Grooveshark或Youtube。
我如何解决这个冲突,允许同时使用audioOutputExample和Rythmbox。 p>
PS我在Ubuntu 11.04上,使用 ...
我找到了一个解决方案。问题是,我有两个内部声音设备注册 - HDMI和PCH。 HDMI设备始终分配为 card0 ,可以通过键入
然后我使用
更改了alsa配置。 gksudo gedit /etc/modprobe.d/alsa-base.conf
并在end
options snd-hda-intel index = -2
从而强制将HDMI分配给card1,将另一个设备分配给card0。
另一个选项是
选项snd-hda-intel id = PCH,HDMI索引= 0,1
分配卡索引。不过,我在这里阅读了,这并不适合所有人。
注意此方法的详细信息取决于您在计算机中使用的设备。通过键入 aplay -l 找到alsa已知的那些。
When I try executing the audioOutputExample shipped with openFrameworks, I get
when
- Rhythmbox is playing
- Rhythmbox has played recently (under ~5 seconds ago)
- Firefox has a tab with Grooveshark, either playing a tune or on pause
- The Groovshark tab has been recently closed (under ~5 seconds ago)
- Firefox has a tab with a Youtube Video, either playing or on pause
- The Youtube tab has been recently closed (under ~5 seconds ago)
Otherwise, the example works fine, even if I've used Rhythmbox, Grooveshark or Youtube before.
How can I solve this conflict to allow simultaneous use of audioOutputExample and, say, Rythmbox.
P.S. I am on Ubuntu 11.04, using openFrameworks_v0062_linux64_FAt...
I found a solution. The problem was, that I have two internal sound devices registered - HDMI and PCH. The HDMI device was always assigned to be card0, which can be checked by typing
aplay -l
into the terminal. This will list the different devices.
I then changed my alsa configuration using
gksudo gedit /etc/modprobe.d/alsa-base.conf
and adding at the end
options snd-hda-intel index=-2
thereby forcing the HDMI to be assigned to card1 and the other device to card0.Another option there is to put
options snd-hda-intel id=PCH,HDMI index=0,1
assigning the card index. However, I read here HDMI,PCH that this did not work for everybody.
Note the details of this method depend on the devices that you have in your computer. Find those known to alsa by typing aplay -l.
这篇关于如何解决openFrameworks和其他音频应用程序之间的冲突?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!