当前时区为 UTC + 8 小时



发表新帖 回复这个主题  [ 6 篇帖子 ] 
作者 内容
1 楼 
 文章标题 : [原创]让pulseaudio和KDE4一起工作
帖子发表于 : 2008-08-07 21:07 
头像

注册: 2007-03-13 11:23
帖子: 1343
送出感谢: 0 次
接收感谢: 0 次
当时在社区里发起这个讨论,因为参与的开发人员都是国外的,所以用英文.
代码:
A few days ago I transfer my desktop environment from gnome to KDE4.1
   release.Everything is good for use.But pulseaudio which has been working
   normally in gnome can not be initialized when KDE starts.
   Here is my default.pa:
   ------------------------------
----------------------------------------
   #!/usr/bin/pulseaudio -nF
   #
   # This file is part of PulseAudio.
   #
   # PulseAudio is free software; you can redistribute it and/or modify it
   # under the terms of the GNU Lesser General Public License as published by
   # the Free Software Foundation; either version 2 of the License, or
   # (at your option) any later version.
   #
   # PulseAudio is distributed in the hope that it will be useful, but
   # WITHOUT ANY WARRANTY; without even the implied warranty of
   # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
   # General Public License for more details.
   #
   # You should have received a copy of the GNU Lesser General Public License
   # along with PulseAudio; if not, write to the Free Software Foundation,
   # Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
   .nofail

- Ignored:

   ### Load something into the sample cache
   #load-sample-lazy x11-bell /usr/share/sounds/gtk-events/activate.wav
   load-sample-lazy pulse-hotplug /usr/share/sounds/startup3.wav
   #load-sample-lazy pulse-coldplug /usr/share/sounds/startup3.wav
   #load-sample-lazy pulse-access /usr/share/sounds/generic.wav

   .fail

   ### Load audio drivers statically (it's probably better to not load
   ### these drivers manually, but instead use module-hal-detect --
   ### see below -- for doing this automatically)
   #load-module module-alsa-sink
   #load-module module-alsa-sink device=equalized
   load-module module-alsa-sink device=dmix
   #load-module module-alsa-source device=hw:1,0
   #load-module module-oss device="/dev/dsp" sink_name=output source_name=input
   #load-module module-oss-mmap device="/dev/dsp" sink_name=output
   source_name=input
   #load-module module-null-sink
   #load-module module-pipe-sink

   ### Automatically load driver modules depending on the hardware available
   .ifexists module-hal-detect.so
   #load-module module-hal-detect
   .else
   ### Alternatively use the static hardware detection module (for systems that
   ### lack HAL support)
   load-module module-detect
   .endif

   ### Load several protocols
   .ifexists module-esound-protocol-unix.so
   load-module module-esound-protocol-unix
   .endif
   load-module module-native-protocol-unix

   ### Network access (may be configured with paprefs, so leave this commented
   ### here if you plan to use paprefs)
   #load-module module-esound-protocol-tcp
   #load-module module-native-protocol-tcp
   #load-module module-zeroconf-publish

   ### Load the RTP reciever module (also configured via paprefs, see above)
   #load-module module-rtp-recv

   ### Load the RTP sender module (also configured via paprefs, see above)
   #load-module module-null-sink sink_name=rtp format=s16be channels=2
   rate=44100 description="RTP Multicast Sink"
   #load-module module-rtp-send source=rtp.monitor

   ### Automatically restore the volume of playback streams
   load-module module-volume-restore

   ### Automatically restore the default sink/source when changed by the user
   during runtime
   load-module module-default-device-restore

   ### Automatically move streams to the default sink if the sink they are
   ### connected to dies, similar for sources
   load-module module-rescue-streams

   ### Automatically suspend sinks/sources that become idle for too long
   #load-module module-suspend-on-idle

   ### Load X11 bell module
   #load-module module-x11-bell sample=x11-bell

   ### Register ourselves in the X11 session manager
   # Deactivated by default, to avoid deadlock when PA is started as esd from
   gnome-session
   # Instead we load this via /etc/xdg/autostart/ and "pactl load-module" now
   # load-module module-x11-xsmp

   ### Load additional modules from GConf settings. This can be configured with
   the paprefs tool.
   ### Please keep in mind that the modules configured by paprefs might
   conflict with manually
   ### loaded modules.
   .ifexists module-gconf.so
   .nofail
   load-module module-gconf
   .fail
   .endif

   ### Publish connection data in the X11 root window
   .ifexists module-x11-publish.so
   .nofail
   load-module module-x11-publish
   .fail
   .endif

   ### Make some devices default
   #set-default-sink output
   #set-default-source input
   ----------------------------------------------------------------------
   My default alsa driver has been set as pulse.
   So when KDE starts , its phonon must iterate my sound drivers to choose what
   can be used.
   But pulseaudio can not start normally,it is passed by phonon.
   But if I type "pulseaudio -vv" in my terminal,it can be worked normally.
   I notice there are some information about start pulseaudio daemon in KDE4 in
   wiki.
   quota:
   KDE 4.x

   In KDE4, Fedora 9 uses an env script to start PulseAudio Daemon as part of
   the KDE environment.

   Any idea?

   Or some information about KDE41 and pulseaudio.

   thanks.

- Done.



---------------------------------------------------------------------------------------------------------------------
最后觉得Mandriva公司的解决方法最好
代码:
> Any idea?
>
> Or some information about KDE41 and pulseaudio.

In Mandriva we start it via a script in /etc/X11/xinit.d/

With pulseaudio 0.9.11 it autospawns successfully, so it's no longer
needed and an XDG autostart .desktop file takes care of X11 registration.

You could easily put pulseaudio in an .desktop file and put it in the
XDG autostart path.

I'd currently recommend the xine backend for Phonon and the xine-pulse
plugin... it's not the best integrated into Phonon, but I'll be looking
into this at somepoint in Mandriva for the upcoming 2009.0 release.

Col

--------------------------------------------------------------------------------
相关信息:
在ubuntu下面安装pulseaudio:
http://ubuntuforums.org/showthread.php?t=789578
存在的问题:
引用:
Audacity

Audacity doesn't support PulseAudio, nor Esound for the moment. You'll have to kill or suspend pulseaudio before you use this application. Audacity uses the PortAudio cross-platform Audio API which doesnt support pulseaudio. Some work was started on making portaudio support PulseAudio but this does not appear to be under active development currently and does not work in it's current state.

Using pasuspender to momentarily suspend pulseaudio is the most convenient way to use the non-beta versions (1.2.x) of Audacity at present.

pasuspender -- audacity <argument>

来自
引用:
http://pulseaudio.org/wiki/PerfectSetup

----------------------------------------------------------------------------------------------------------------
背景:
现在3大发行版都采用了pulseaudio作为声音服务.
下图是声音通过Gstreamer或是其他解码之后交给pulseaudio的处理过程.简单的说pulseaudio就是一个跨平台的音频服务,可以在Window,Linux,Mac下使用,简化编程,解决混音之类的问题


附件:
Pulseaudio-diagram.png
Pulseaudio-diagram.png [ 136.46 KiB | 被浏览 1196 次 ]



_________________
"We are all in the mud, but some of us are looking at the stars." (Oscar Wilde)
We are not born for ourselves.
人生天地间,并非为自己
Homepage:http://sites.google.com/site/polarisnotme/
页首
 用户资料  
 
2 楼 
 文章标题 :
帖子发表于 : 2008-08-07 22:21 

注册: 2007-01-13 1:02
帖子: 494
送出感谢: 0 次
接收感谢: 0 次
我以前System Setting ---> sound里面是没有PulseAudio的,前几天更新了以后突然就有了


页首
 用户资料  
 
3 楼 
 文章标题 :
帖子发表于 : 2008-08-07 23:04 
头像

注册: 2007-03-13 11:23
帖子: 1343
送出感谢: 0 次
接收感谢: 0 次
最近kubuntu更新了什么,我都不敢更新,其实自我编译libqt以后,整个依赖就被我破坏了.等我关注的那些东西稳定了,再去处理.bug还真是多,今天我看到有人键盘出现问题了,需要按键按很就才有输入


_________________
"We are all in the mud, but some of us are looking at the stars." (Oscar Wilde)
We are not born for ourselves.
人生天地间,并非为自己
Homepage:http://sites.google.com/site/polarisnotme/


页首
 用户资料  
 
4 楼 
 文章标题 :
帖子发表于 : 2008-08-07 23:06 

注册: 2007-01-13 1:02
帖子: 494
送出感谢: 0 次
接收感谢: 0 次
kofshower 写道:
最近kubuntu更新了什么,我都不敢更新,其实自我编译libqt以后,整个依赖就被我破坏了.等我关注的那些东西稳定了,再去处理.bug还真是多


KDE4.1感觉也很赶啊。。。赶出来的。。。


页首
 用户资料  
 
5 楼 
 文章标题 :
帖子发表于 : 2008-08-07 23:17 
头像

注册: 2007-03-13 11:23
帖子: 1343
送出感谢: 0 次
接收感谢: 0 次
依赖的qt4还有问题呢.
其实kde4再多干点活,扩展下plasma,提供一个通用的输入法框架,基于dbus的,不是有dbus的qt binding么.那就好了
声音解码框架phonon
虚拟终端kconsole
硬件solid
桌面shell,
这样通用的框架多些,就爽了.
还有pulseaudio,这不是KDE的.
软件什么的都基于这些开发.
-------------------------------
插一句,System tray empty on startup since the Qt 4.4.1 update这个你看看


_________________
"We are all in the mud, but some of us are looking at the stars." (Oscar Wilde)
We are not born for ourselves.
人生天地间,并非为自己
Homepage:http://sites.google.com/site/polarisnotme/


页首
 用户资料  
 
6 楼 
 文章标题 :
帖子发表于 : 2008-08-08 8:28 
头像

注册: 2006-10-21 12:03
帖子: 1746
地址: Shanghai
送出感谢: 0 次
接收感谢: 0 次
mandriva 的 pulseaudio 启动方式和 fcitx 一样~ :P


_________________
.

私人空间
附有 Magic Linux 2.1 最新开发日志~
引用:


미안하다, 사랑한다




欢迎来 #xfce-cn 中文频道~~


页首
 用户资料  
 
显示帖子 :  排序  
发表新帖 回复这个主题  [ 6 篇帖子 ] 

当前时区为 UTC + 8 小时


在线用户

正在浏览此版面的用户:没有注册用户 和 2 位游客


不能 在这个版面发表主题
不能 在这个版面回复主题
不能 在这个版面编辑帖子
不能 在这个版面删除帖子
不能 在这个版面提交附件

前往 :  
本站点为公益性站点,用于推广开源自由软件,由 DiaHosting VPSBudgetVM VPS 提供服务。
我们认为:软件应可免费取得,软件工具在各种语言环境下皆可使用,且不会有任何功能上的差异;
人们应有定制和修改软件的自由,且方式不受限制,只要他们自认为合适。

Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
简体中文语系由 王笑宇 翻译